OpenTTD Source: ExpensesList Struct Reference

OpenTTD Source 15.0-beta1

Public Member Functions | Data Fields
ExpensesList Struct Reference

Expense list container. More...

## Public Member Functions
| ExpensesList (StringID title, const std::initializer_list< ExpensesType > &list)
uint | GetHeight () const
uint | GetListWidth () const
| Compute width of the expenses categories in pixels.

## Data Fields
const StringID | title
| StringID of list title.
const std::initializer_list< ExpensesType > & | items
| List of expenses types.

## Detailed Description

Expense list container.

Definition at line 85 of file company_gui.cpp.

## Constructor & Destructor Documentation

## ◆ ExpensesList()

ExpensesList::ExpensesList | ( | StringID | title,
|  | const std::initializer_list< ExpensesType > & | list
| ) |  |
| inline

Definition at line 89 of file company_gui.cpp.

## Member Function Documentation

## ◆ GetHeight()

uint ExpensesList::GetHeight | ( |  | ) | const
| inline

Definition at line 93 of file company_gui.cpp.

## ◆ GetListWidth()

uint ExpensesList::GetListWidth | ( |  | ) | const
| inline

Compute width of the expenses categories in pixels.

Definition at line 100 of file company_gui.cpp.

References GetStringBoundingBox(), and items.

## Field Documentation

## ◆ items

const std::initializer_list<ExpensesType>& ExpensesList::items

List of expenses types.

Definition at line 87 of file company_gui.cpp.

Referenced by DrawCategory(), DrawYearCategory(), and GetListWidth().

## ◆ title

const StringID ExpensesList::title

StringID of list title.

Definition at line 86 of file company_gui.cpp.

The documentation for this struct was generated from the following file:

- src/company_gui.cpp