OpenTTD Source  14.0-beta1
company_gui.cpp File Reference
#include "stdafx.h"
#include "currency.h"
#include "error.h"
#include "gui.h"
#include "window_gui.h"
#include "textbuf_gui.h"
#include "viewport_func.h"
#include "company_func.h"
#include "command_func.h"
#include "network/network.h"
#include "network/network_gui.h"
#include "network/network_func.h"
#include "newgrf.h"
#include "company_manager_face.h"
#include "strings_func.h"
#include "timer/timer_game_economy.h"
#include "widgets/dropdown_type.h"
#include "tilehighlight_func.h"
#include "company_base.h"
#include "core/geometry_func.hpp"
#include "object_type.h"
#include "rail.h"
#include "road.h"
#include "engine_base.h"
#include "window_func.h"
#include "road_func.h"
#include "water.h"
#include "station_func.h"
#include "zoom_func.h"
#include "sortlist_type.h"
#include "company_cmd.h"
#include "economy_cmd.h"
#include "group_cmd.h"
#include "misc_cmd.h"
#include "object_cmd.h"
#include "timer/timer.h"
#include "timer/timer_window.h"
#include "widgets/company_widget.h"
#include "safeguards.h"

Go to the source code of this file.

Data Structures

struct  ExpensesList
 Expense list container. More...
 
struct  CompanyFinancesWindow
 Window class displaying the company finances. More...
 
class  DropDownListColourItem< TSprite >
 Colour selection list item, with icon and string components. More...
 
struct  SelectCompanyLiveryWindow
 Company livery colour scheme window. More...
 
class  SelectCompanyManagerFaceWindow
 Management class for customizing the face of the company manager. More...
 
struct  CompanyInfrastructureWindow
 Window with detailed information about the company's infrastructure. More...
 
struct  CompanyWindow
 Window with general information about a company. More...
 
struct  BuyCompanyWindow
 

Typedefs

typedef GUIList< const Group * > GUIGroupList
 

Functions

static void DoSelectCompanyManagerFace (Window *parent)
 Company GUI constants. More...
 
static void ShowCompanyInfrastructure (CompanyID company)
 Open the infrastructure window of a company. More...
 
static uint GetTotalCategoriesHeight ()
 Get the total height of the "categories" column. More...
 
static uint GetMaxCategoriesWidth ()
 Get the required width of the "categories" column, equal to the widest element. More...
 
static void DrawCategory (const Rect &r, int start_y, const ExpensesList &list)
 Draw a category of expenses (revenue, operating expenses, capital expenses).
 
static void DrawCategories (const Rect &r)
 Draw the expenses categories. More...
 
static void DrawPrice (Money amount, int left, int right, int top, TextColour colour)
 Draw an amount of money. More...
 
static Money DrawYearCategory (const Rect &r, int start_y, const ExpensesList &list, const Expenses &tbl)
 Draw a category of expenses/revenues in the year column. More...
 
static void DrawYearColumn (const Rect &r, TimerGameEconomy::Year year, const Expenses &tbl)
 Draw a column with prices. More...
 
void ShowCompanyFinances (CompanyID company)
 Open the finances window of a company. More...
 
void ShowCompanyLiveryWindow (CompanyID company, GroupID group)
 
void DrawCompanyManagerFace (CompanyManagerFace cmf, Colours colour, const Rect &r)
 Draws the face of a company manager's face. More...
 
void ShowCompany (CompanyID company)
 Show the window with the overview of the company. More...
 
void DirtyCompanyInfrastructureWindows (CompanyID company)
 Redraw all windows with company infrastructure counts. More...
 
void ShowBuyCompanyDialog (CompanyID company, bool hostile_takeover)
 Show the query to buy another company. More...
 

Variables

static const std::initializer_list< ExpensesType_expenses_list_revenue
 List of revenues. More...
 
static const std::initializer_list< ExpensesType_expenses_list_operating_costs
 List of operating expenses. More...
 
static const std::initializer_list< ExpensesType_expenses_list_capital_costs
 List of capital expenses. More...
 
static const std::initializer_list< ExpensesList_expenses_list_types
 Types of expense lists. More...
 
static constexpr NWidgetPart _nested_company_finances_widgets []
 
static WindowDesc _company_finances_desc (__FILE__, __LINE__, WDP_AUTO, "company_finances", 0, 0, WC_FINANCES, WC_NONE, 0, std::begin(_nested_company_finances_widgets), std::end(_nested_company_finances_widgets))
 
static const StringID _colour_dropdown []
 
static const LiveryClass _livery_class [LS_END]
 
static constexpr NWidgetPart _nested_select_company_livery_widgets []
 
static WindowDesc _select_company_livery_desc (__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_COMPANY_COLOUR, WC_NONE, 0, std::begin(_nested_select_company_livery_widgets), std::end(_nested_select_company_livery_widgets))
 
static constexpr NWidgetPart _nested_select_company_manager_face_widgets []
 Nested widget description for the company manager face selection dialog.
 
static WindowDesc _select_company_manager_face_desc (__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_COMPANY_MANAGER_FACE, WC_NONE, WDF_CONSTRUCTION, std::begin(_nested_select_company_manager_face_widgets), std::end(_nested_select_company_manager_face_widgets))
 Company manager face selection window description.
 
static constexpr NWidgetPart _nested_company_infrastructure_widgets []
 
static WindowDesc _company_infrastructure_desc (__FILE__, __LINE__, WDP_AUTO, "company_infrastructure", 0, 0, WC_COMPANY_INFRASTRUCTURE, WC_NONE, 0, std::begin(_nested_company_infrastructure_widgets), std::end(_nested_company_infrastructure_widgets))
 
static constexpr NWidgetPart _nested_company_widgets []
 
static const StringID _company_view_vehicle_count_strings []
 Strings for the company vehicle counts. More...
 
static WindowDesc _company_desc (__FILE__, __LINE__, WDP_AUTO, "company", 0, 0, WC_COMPANY, WC_NONE, 0, std::begin(_nested_company_widgets), std::end(_nested_company_widgets))
 
static constexpr NWidgetPart _nested_buy_company_widgets []
 
static WindowDesc _buy_company_desc (__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUY_COMPANY, WC_NONE, WDF_CONSTRUCTION, std::begin(_nested_buy_company_widgets), std::end(_nested_buy_company_widgets))
 

Detailed Description

Company related GUIs.

Definition in file company_gui.cpp.

Function Documentation

◆ DirtyCompanyInfrastructureWindows()

void DirtyCompanyInfrastructureWindows ( CompanyID  company)

Redraw all windows with company infrastructure counts.

Parameters
companyThe company to redraw the windows of.

Definition at line 2651 of file company_gui.cpp.

References SetWindowDirty(), WC_COMPANY, and WC_COMPANY_INFRASTRUCTURE.

Referenced by Station::AfterStationTileSetChange(), CmdConvertRail(), RemoveLock(), and UpdateCompanyRoadInfrastructure().

◆ DoSelectCompanyManagerFace()

static void DoSelectCompanyManagerFace ( Window parent)
static

Company GUI constants.

Open the simple/advanced company manager face selection window.

Parameters
parentthe parent company window

Definition at line 1776 of file company_gui.cpp.

References _select_company_manager_face_desc, BringWindowToFrontById(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), WC_COMPANY_MANAGER_FACE, and Window::window_number.

◆ DrawCategories()

static void DrawCategories ( const Rect r)
static

Draw the expenses categories.

Parameters
rAvailable space for drawing.
Note
The environment must provide padding at the left and right of r.

Definition at line 174 of file company_gui.cpp.

◆ DrawCompanyManagerFace()

void DrawCompanyManagerFace ( CompanyManagerFace  cmf,
Colours  colour,
const Rect r 
)

Draws the face of a company manager's face.

Parameters
cmfthe company manager's face
colourthe (background) colour of the gradient
rposition to draw the face

Definition at line 1162 of file company_gui.cpp.

References GE_WM, GetCompanyManagerFaceBits(), and GetSpriteSize().

◆ DrawPrice()

static void DrawPrice ( Money  amount,
int  left,
int  right,
int  top,
TextColour  colour 
)
static

Draw an amount of money.

Parameters
amountAmount of money to draw,
leftLeft coordinate of the space to draw in.
rightRight coordinate of the space to draw in.
topTop coordinate of the space to draw in.
colourThe TextColour of the string.

Definition at line 214 of file company_gui.cpp.

References DrawString(), SA_RIGHT, and SetDParam().

◆ DrawYearCategory()

static Money DrawYearCategory ( const Rect r,
int  start_y,
const ExpensesList list,
const Expenses tbl 
)
static

Draw a category of expenses/revenues in the year column.

Returns
The income sum of the category.

Definition at line 231 of file company_gui.cpp.

◆ DrawYearColumn()

static void DrawYearColumn ( const Rect r,
TimerGameEconomy::Year  year,
const Expenses tbl 
)
static

Draw a column with prices.

Parameters
rAvailable space for drawing.
yearYear being drawn.
tblReference to table of amounts for year.
Note
The environment must provide padding at the left and right of r.

Definition at line 260 of file company_gui.cpp.

◆ GetMaxCategoriesWidth()

static uint GetMaxCategoriesWidth ( )
static

Get the required width of the "categories" column, equal to the widest element.

Returns
The required width in pixels.

Definition at line 139 of file company_gui.cpp.

References _expenses_list_types, GetStringBoundingBox(), WidgetDimensions::hsep_indent, WidgetDimensions::scaled, and TimerGameEconomy::UsingWallclockUnits().

◆ GetTotalCategoriesHeight()

static uint GetTotalCategoriesHeight ( )
static

Get the total height of the "categories" column.

Returns
The total height in pixels.

Definition at line 119 of file company_gui.cpp.

References _expenses_list_types, FS_NORMAL, GetCharacterHeight(), WidgetDimensions::scaled, WidgetDimensions::vsep_normal, and WidgetDimensions::vsep_wide.

Referenced by CompanyFinancesWindow::OnPaint().

◆ ShowBuyCompanyDialog()

void ShowBuyCompanyDialog ( CompanyID  company,
bool  hostile_takeover 
)

Show the query to buy another company.

Parameters
companyThe company to buy.
hostile_takeoverWhether this is a hostile takeover.

Definition at line 2775 of file company_gui.cpp.

References BringWindowToFrontById(), and WC_BUY_COMPANY.

Referenced by HandleBankruptcyTakeover().

◆ ShowCompany()

void ShowCompany ( CompanyID  company)

Show the window with the overview of the company.

Parameters
companyThe company to show the window for.

Definition at line 2640 of file company_gui.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID().

Referenced by GoalListWindow::HandleClick().

◆ ShowCompanyFinances()

void ShowCompanyFinances ( CompanyID  company)

Open the finances window of a company.

Parameters
companyCompany to show finances of.
Precondition
is company a valid company.

Definition at line 544 of file company_gui.cpp.

References BringWindowToFrontById(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), and WC_FINANCES.

Referenced by MenuClickFinances().

◆ ShowCompanyInfrastructure()

static void ShowCompanyInfrastructure ( CompanyID  company)
static

Open the infrastructure window of a company.

Parameters
companyCompany to show infrastructure of.

Definition at line 2152 of file company_gui.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID().

Variable Documentation

◆ _colour_dropdown

const StringID _colour_dropdown[]
static
Initial value:
= {
STR_COLOUR_DARK_BLUE,
STR_COLOUR_PALE_GREEN,
STR_COLOUR_PINK,
STR_COLOUR_YELLOW,
STR_COLOUR_RED,
STR_COLOUR_LIGHT_BLUE,
STR_COLOUR_GREEN,
STR_COLOUR_DARK_GREEN,
STR_COLOUR_BLUE,
STR_COLOUR_CREAM,
STR_COLOUR_MAUVE,
STR_COLOUR_PURPLE,
STR_COLOUR_ORANGE,
STR_COLOUR_BROWN,
STR_COLOUR_GREY,
STR_COLOUR_WHITE,
}

Definition at line 553 of file company_gui.cpp.

◆ _company_view_vehicle_count_strings

const StringID _company_view_vehicle_count_strings[]
static
Initial value:
= {
STR_COMPANY_VIEW_TRAINS, STR_COMPANY_VIEW_ROAD_VEHICLES, STR_COMPANY_VIEW_SHIPS, STR_COMPANY_VIEW_AIRCRAFT
}

Strings for the company vehicle counts.

Definition at line 2239 of file company_gui.cpp.

◆ _expenses_list_capital_costs

const std::initializer_list<ExpensesType> _expenses_list_capital_costs
static
Initial value:

List of capital expenses.

Definition at line 76 of file company_gui.cpp.

◆ _expenses_list_operating_costs

const std::initializer_list<ExpensesType> _expenses_list_operating_costs
static
Initial value:

List of operating expenses.

Definition at line 66 of file company_gui.cpp.

◆ _expenses_list_revenue

const std::initializer_list<ExpensesType> _expenses_list_revenue
static
Initial value:

List of revenues.

Definition at line 58 of file company_gui.cpp.

◆ _expenses_list_types

const std::initializer_list<ExpensesList> _expenses_list_types
static
Initial value:
= {
{ STR_FINANCES_REVENUE_TITLE, _expenses_list_revenue },
{ STR_FINANCES_OPERATING_EXPENSES_TITLE, _expenses_list_operating_costs },
{ STR_FINANCES_CAPITAL_EXPENSES_TITLE, _expenses_list_capital_costs },
}

Types of expense lists.

Definition at line 109 of file company_gui.cpp.

Referenced by GetMaxCategoriesWidth(), and GetTotalCategoriesHeight().

◆ _livery_class

const LiveryClass _livery_class[LS_END]
static
Initial value:
= {
LC_OTHER,
LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL,
LC_ROAD, LC_ROAD,
LC_SHIP, LC_SHIP,
LC_AIRCRAFT, LC_AIRCRAFT, LC_AIRCRAFT,
LC_ROAD, LC_ROAD,
}

Definition at line 573 of file company_gui.cpp.

◆ _nested_buy_company_widgets

constexpr NWidgetPart _nested_buy_company_widgets[]
staticconstexpr
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE),
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, WID_BC_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_BC_FACE), SetFill(0, 1),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_BC_QUESTION), SetMinimalSize(240, 0), SetFill(1, 1),
NWidget(WWT_TEXTBTN, COLOUR_LIGHT_BLUE, WID_BC_NO), SetMinimalSize(60, 12), SetDataTip(STR_QUIT_NO, STR_NULL), SetFill(1, 0),
NWidget(WWT_TEXTBTN, COLOUR_LIGHT_BLUE, WID_BC_YES), SetMinimalSize(60, 12), SetDataTip(STR_QUIT_YES, STR_NULL), SetFill(1, 0),
}

Definition at line 2744 of file company_gui.cpp.

◆ _nested_select_company_livery_widgets

constexpr NWidgetPart _nested_select_company_livery_widgets[]
staticconstexpr
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SCL_CAPTION), SetDataTip(STR_LIVERY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_GENERAL), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_COMPANY_GENERAL, STR_LIVERY_GENERAL_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_RAIL), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRAINLIST, STR_LIVERY_TRAIN_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_ROAD), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRUCKLIST, STR_LIVERY_ROAD_VEHICLE_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_SHIP), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SHIPLIST, STR_LIVERY_SHIP_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_CLASS_AIRCRAFT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_AIRPLANESLIST, STR_LIVERY_AIRCRAFT_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_RAIL), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_TRAIN, STR_LIVERY_TRAIN_GROUP_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_ROAD), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_ROADVEH, STR_LIVERY_ROAD_VEHICLE_GROUP_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_SHIP), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_SHIP, STR_LIVERY_SHIP_GROUP_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCL_GROUPS_AIRCRAFT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_GROUP_LIVERY_AIRCRAFT, STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 0), EndContainer(),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_SCL_MATRIX), SetMinimalSize(275, 0), SetResize(1, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_LIVERY_PANEL_TOOLTIP), SetScrollbar(WID_SCL_MATRIX_SCROLLBAR),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_SCL_PRI_COL_DROPDOWN), SetFill(0, 1), SetDataTip(STR_JUST_STRING, STR_LIVERY_PRIMARY_TOOLTIP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_SCL_SEC_COL_DROPDOWN), SetFill(0, 1), SetDataTip(STR_JUST_STRING, STR_LIVERY_SECONDARY_TOOLTIP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
}

Definition at line 1110 of file company_gui.cpp.

SetFill
constexpr NWidgetPart SetFill(uint16_t fill_x, uint16_t fill_y)
Widget part function for setting filling.
Definition: widget_type.h:1141
EXPENSES_ROADVEH_RUN
@ EXPENSES_ROADVEH_RUN
Running costs road vehicles.
Definition: economy_type.h:176
WID_SCL_MATRIX
@ WID_SCL_MATRIX
Matrix.
Definition: company_widget.h:95
WID_SCL_GROUPS_AIRCRAFT
@ WID_SCL_GROUPS_AIRCRAFT
Aircraft groups.
Definition: company_widget.h:91
WID_BC_YES
@ WID_BC_YES
Yes button.
Definition: company_widget.h:195
WID_SCL_SEC_COL_DROPDOWN
@ WID_SCL_SEC_COL_DROPDOWN
Dropdown for secondary colour.
Definition: company_widget.h:94
EXPENSES_OTHER
@ EXPENSES_OTHER
Other expenses.
Definition: economy_type.h:185
WID_SCL_CLASS_GENERAL
@ WID_SCL_CLASS_GENERAL
Class general.
Definition: company_widget.h:83
WWT_CAPTION
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:63
WWT_IMGBTN
@ WWT_IMGBTN
(Toggle) Button with image
Definition: widget_type.h:54
EXPENSES_TRAIN_REVENUE
@ EXPENSES_TRAIN_REVENUE
Revenue from trains.
Definition: economy_type.h:180
WID_BC_NO
@ WID_BC_NO
No button.
Definition: company_widget.h:194
NWID_HORIZONTAL
@ NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:77
WWT_MATRIX
@ WWT_MATRIX
Grid of rows and columns.
Definition: widget_type.h:61
EndContainer
constexpr NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition: widget_type.h:1151
SetMatrixDataTip
constexpr NWidgetPart SetMatrixDataTip(uint8_t cols, uint8_t rows, StringID tip)
Widget part function for setting the data and tooltip of WWT_MATRIX widgets.
Definition: widget_type.h:1174
EXPENSES_AIRCRAFT_RUN
@ EXPENSES_AIRCRAFT_RUN
Running costs aircraft.
Definition: economy_type.h:177
WWT_EMPTY
@ WWT_EMPTY
Empty widget, place holder to reserve space in widget tree.
Definition: widget_type.h:50
WID_SCL_CLASS_ROAD
@ WID_SCL_CLASS_ROAD
Class road.
Definition: company_widget.h:85
WID_SCL_CAPTION
@ WID_SCL_CAPTION
Caption of window.
Definition: company_widget.h:82
_expenses_list_operating_costs
static const std::initializer_list< ExpensesType > _expenses_list_operating_costs
List of operating expenses.
Definition: company_gui.cpp:66
NC_EQUALSIZE
@ NC_EQUALSIZE
Value of the NCB_EQUALSIZE flag.
Definition: widget_type.h:508
SetPadding
constexpr NWidgetPart SetPadding(uint8_t top, uint8_t right, uint8_t bottom, uint8_t left)
Widget part function for setting additional space around a widget.
Definition: widget_type.h:1188
SetResize
constexpr NWidgetPart SetResize(int16_t dx, int16_t dy)
Widget part function for setting the resize step.
Definition: widget_type.h:1086
EXPENSES_CONSTRUCTION
@ EXPENSES_CONSTRUCTION
Construction costs.
Definition: economy_type.h:173
_expenses_list_capital_costs
static const std::initializer_list< ExpensesType > _expenses_list_capital_costs
List of capital expenses.
Definition: company_gui.cpp:76
SetScrollbar
constexpr NWidgetPart SetScrollbar(WidgetID index)
Attach a scrollbar to a widget.
Definition: widget_type.h:1244
WID_SCL_PRI_COL_DROPDOWN
@ WID_SCL_PRI_COL_DROPDOWN
Dropdown for primary colour.
Definition: company_widget.h:93
NWidget
constexpr NWidgetPart NWidget(WidgetType tp, Colours col, WidgetID idx=-1)
Widget part function for starting a new 'real' widget.
Definition: widget_type.h:1258
WID_SCL_CLASS_AIRCRAFT
@ WID_SCL_CLASS_AIRCRAFT
Class aircraft.
Definition: company_widget.h:87
WID_SCL_CLASS_SHIP
@ WID_SCL_CLASS_SHIP
Class ship.
Definition: company_widget.h:86
WID_SCL_GROUPS_SHIP
@ WID_SCL_GROUPS_SHIP
Ship groups.
Definition: company_widget.h:90
WID_SCL_GROUPS_RAIL
@ WID_SCL_GROUPS_RAIL
Rail groups.
Definition: company_widget.h:88
WID_BC_CAPTION
@ WID_BC_CAPTION
Caption of window.
Definition: company_widget.h:191
_expenses_list_revenue
static const std::initializer_list< ExpensesType > _expenses_list_revenue
List of revenues.
Definition: company_gui.cpp:58
NWID_VERTICAL
@ NWID_VERTICAL
Vertical container.
Definition: widget_type.h:79
WID_SCL_GROUPS_ROAD
@ WID_SCL_GROUPS_ROAD
Road groups.
Definition: company_widget.h:89
WidgetDimensions::unscaled
static const WidgetDimensions unscaled
Unscaled widget dimensions.
Definition: window_gui.h:67
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:71
WWT_RESIZEBOX
@ WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition: widget_type.h:70
WID_BC_FACE
@ WID_BC_FACE
Face button.
Definition: company_widget.h:192
WID_BC_QUESTION
@ WID_BC_QUESTION
Question text.
Definition: company_widget.h:193
NWID_VSCROLLBAR
@ NWID_VSCROLLBAR
Vertical scrollbar.
Definition: widget_type.h:86
WID_SCL_MATRIX_SCROLLBAR
@ WID_SCL_MATRIX_SCROLLBAR
Matrix scrollbar.
Definition: company_widget.h:96
SetPIP
constexpr NWidgetPart SetPIP(uint8_t pre, uint8_t inter, uint8_t post)
Widget part function for setting a pre/inter/post spaces.
Definition: widget_type.h:1220
WID_SCL_CLASS_RAIL
@ WID_SCL_CLASS_RAIL
Class rail.
Definition: company_widget.h:84
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:52
EXPENSES_PROPERTY
@ EXPENSES_PROPERTY
Property costs.
Definition: economy_type.h:179
EXPENSES_NEW_VEHICLES
@ EXPENSES_NEW_VEHICLES
New vehicles.
Definition: economy_type.h:174
SetMinimalSize
constexpr NWidgetPart SetMinimalSize(int16_t x, int16_t y)
Widget part function for setting the minimal size.
Definition: widget_type.h:1097
EXPENSES_TRAIN_RUN
@ EXPENSES_TRAIN_RUN
Running costs trains.
Definition: economy_type.h:175
WID_SCL_SPACER_DROPDOWN
@ WID_SCL_SPACER_DROPDOWN
Spacer for dropdown.
Definition: company_widget.h:92
SetDataTip
constexpr NWidgetPart SetDataTip(uint32_t data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1162
EXPENSES_ROADVEH_REVENUE
@ EXPENSES_ROADVEH_REVENUE
Revenue from road vehicles.
Definition: economy_type.h:181
EXPENSES_AIRCRAFT_REVENUE
@ EXPENSES_AIRCRAFT_REVENUE
Revenue from aircraft.
Definition: economy_type.h:182
EXPENSES_SHIP_RUN
@ EXPENSES_SHIP_RUN
Running costs ships.
Definition: economy_type.h:178
EXPENSES_LOAN_INTEREST
@ EXPENSES_LOAN_INTEREST
Interest payments over the loan.
Definition: economy_type.h:184
WWT_TEXTBTN
@ WWT_TEXTBTN
(Toggle) Button with text
Definition: widget_type.h:57
WWT_DROPDOWN
@ WWT_DROPDOWN
Drop down list.
Definition: widget_type.h:72
EXPENSES_SHIP_REVENUE
@ EXPENSES_SHIP_REVENUE
Revenue from ships.
Definition: economy_type.h:183