OpenTTD

Data Structures | Functions | Variables
graph_gui.cpp File Reference

GUI that shows performance graphs. More...

`#include "stdafx.h"`
`#include "graph_gui.h"`
`#include "window_gui.h"`
`#include "company_base.h"`
`#include "company_gui.h"`
`#include "economy_func.h"`
`#include "cargotype.h"`
`#include "strings_func.h"`
`#include "window_func.h"`
`#include "date_func.h"`
`#include "gfx_func.h"`
`#include "sortlist_type.h"`
`#include "core/geometry_func.hpp"`
`#include "currency.h"`
`#include "widgets/graph_widget.h"`
`#include "table/strings.h"`
`#include "table/sprites.h"`
`#include <math.h>`
`#include "safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | GraphLegendWindow
struct | ValuesInterval
| Contains the interval of a graph's data. More...
struct | BaseGraphWindow
struct | OperatingProfitGraphWindow
struct | IncomeGraphWindow
struct | DeliveredCargoGraphWindow
struct | PerformanceHistoryGraphWindow
struct | CompanyValueGraphWindow
struct | PaymentRatesGraphWindow
class | CompanyLeagueWindow
struct | PerformanceRatingDetailWindow

## Functions
static NWidgetBase * | MakeNWidgetCompanyLines (int *biggest_index)
| Construct a vertical list of buttons, one for each company. More...
static void | ShowGraphLegend ()
void | ShowOperatingProfitGraph ()
void | ShowIncomeGraph ()
void | ShowDeliveredCargoGraph ()
void | ShowPerformanceHistoryGraph ()
void | ShowCompanyValueGraph ()
static NWidgetBase * | MakeCargoButtons (int *biggest_index)
| Construct the row containing the digit keys. More...
void | ShowCargoPaymentRates ()
static StringID | GetPerformanceTitleFromValue (uint value)
void | ShowCompanyLeagueTable ()
static NWidgetBase * | MakePerformanceDetailPanels (int *biggest_index)
| Make a vertical list of panels for outputting score details. More...
NWidgetBase * | MakeCompanyButtonRowsGraphGUI (int *biggest_index)
| Make a number of rows with buttons for each company for the performance rating detail window. More...
void | ShowPerformanceRatingDetail ()

## Variables
static uint | _legend_excluded_companies
static uint | _legend_excluded_cargo
static const OverflowSafeInt64 | INVALID_DATAPOINT (INT64_MAX)
static const uint | INVALID_DATAPOINT_POS = UINT_MAX
static const NWidgetPart | _nested_graph_legend_widgets []
static WindowDesc | _graph_legend_desc (WDP_AUTO, "graph_legend", 0, 0, WC_GRAPH_LEGEND, WC_NONE, 0, _nested_graph_legend_widgets, lengthof(_nested_graph_legend_widgets))
static const NWidgetPart | _nested_operating_profit_widgets []
static WindowDesc | _operating_profit_desc (WDP_AUTO, "graph_operating_profit", 0, 0, WC_OPERATING_PROFIT, WC_NONE, 0, _nested_operating_profit_widgets, lengthof(_nested_operating_profit_widgets))
static const NWidgetPart | _nested_income_graph_widgets []
static WindowDesc | _income_graph_desc (WDP_AUTO, "graph_income", 0, 0, WC_INCOME_GRAPH, WC_NONE, 0, _nested_income_graph_widgets, lengthof(_nested_income_graph_widgets))
static const NWidgetPart | _nested_delivered_cargo_graph_widgets []
static WindowDesc | _delivered_cargo_graph_desc (WDP_AUTO, "graph_delivered_cargo", 0, 0, WC_DELIVERED_CARGO, WC_NONE, 0, _nested_delivered_cargo_graph_widgets, lengthof(_nested_delivered_cargo_graph_widgets))
static const NWidgetPart | _nested_performance_history_widgets []
static WindowDesc | _performance_history_desc (WDP_AUTO, "graph_performance", 0, 0, WC_PERFORMANCE_HISTORY, WC_NONE, 0, _nested_performance_history_widgets, lengthof(_nested_performance_history_widgets))
static const NWidgetPart | _nested_company_value_graph_widgets []
static WindowDesc | _company_value_graph_desc (WDP_AUTO, "graph_company_value", 0, 0, WC_COMPANY_VALUE, WC_NONE, 0, _nested_company_value_graph_widgets, lengthof(_nested_company_value_graph_widgets))
static const NWidgetPart | _nested_cargo_payment_rates_widgets []
static WindowDesc | _cargo_payment_rates_desc (WDP_AUTO, "graph_cargo_payment_rates", 0, 0, WC_PAYMENT_RATES, WC_NONE, 0, _nested_cargo_payment_rates_widgets, lengthof(_nested_cargo_payment_rates_widgets))
static const StringID | _performance_titles []
static const NWidgetPart | _nested_company_league_widgets []
static WindowDesc | _company_league_desc (WDP_AUTO, "league", 0, 0, WC_COMPANY_LEAGUE, WC_NONE, 0, _nested_company_league_widgets, lengthof(_nested_company_league_widgets))
static const NWidgetPart | _nested_performance_rating_detail_widgets []
static WindowDesc | _performance_rating_detail_desc (WDP_AUTO, "league_details", 0, 0, WC_PERFORMANCE_DETAIL, WC_NONE, 0, _nested_performance_rating_detail_widgets, lengthof(_nested_performance_rating_detail_widgets))

## Detailed Description

GUI that shows performance graphs.

Definition in file graph_gui.cpp.

## Function Documentation

## ◆ MakeCargoButtons()

static NWidgetBase* MakeCargoButtons | ( | int * | biggest_index | ) |
| static

Construct the row containing the digit keys.

Definition at line 1035 of file graph_gui.cpp.

References _sorted_standard_cargo_specs_size, and WWT_PANEL.

## ◆ MakeCompanyButtonRowsGraphGUI()

NWidgetBase* MakeCompanyButtonRowsGraphGUI | ( | int * | biggest_index | ) |

Make a number of rows with buttons for each company for the performance rating detail window.

Definition at line 1556 of file graph_gui.cpp.

References MakeCompanyButtonRows(), WID_PRD_COMPANY_FIRST, and WID_PRD_COMPANY_LAST.

## ◆ MakeNWidgetCompanyLines()

static NWidgetBase* MakeNWidgetCompanyLines | ( | int * | biggest_index | ) |
| static

Construct a vertical list of buttons, one for each company.

Parameters

  biggest_index | Storage for collecting the biggest index used in the returned tree.

Returns
  Panel with company buttons.

Postcondition
  `*biggest_index` contains the largest used index in the tree.

Definition at line 112 of file graph_gui.cpp.

References GetSpriteSize().

## ◆ MakePerformanceDetailPanels()

static NWidgetBase* MakePerformanceDetailPanels | ( | int * | biggest_index | ) |
| static

Make a vertical list of panels for outputting score details.

Parameters

  biggest_index | Storage for collecting the biggest index used in the returned tree.

Returns
  Panel with performance details.

Postcondition
  `*biggest_index` contains the largest used index in the tree.

Definition at line 1527 of file graph_gui.cpp.

## Variable Documentation

## ◆ _nested_company_league_widgets

const NWidgetPart _nested_company_league_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_COMPANY_LEAGUE_TABLE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_CL_BACKGROUND), SetMinimalSize(400, 0), SetMinimalTextLines(15, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM),
}
WD_FRAMERECT_TOP
Offset at top to draw the frame rectangular area.
Definition: window_gui.h:64
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
WID_CL_BACKGROUND
Background of the window.
Definition: graph_widget.h:57
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
SetMinimalTextLines
static NWidgetPart SetMinimalTextLines(uint8 lines, uint8 spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition: widget_type.h:965
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:947
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WD_FRAMERECT_BOTTOM
Offset at bottom to draw the frame rectangular area.
Definition: window_gui.h:65
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64

Definition at line 1265 of file graph_gui.cpp.

## ◆ _nested_company_value_graph_widgets

const NWidgetPart _nested_company_value_graph_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_VALUES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_CV_BACKGROUND),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),
EndContainer(),
}
WWT_EMPTY
Empty widget, place holder to reserve space in widget array.
Definition: widget_type.h:48
SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:930
WD_FRAMERECT_TOP
Offset at top to draw the frame rectangular area.
Definition: window_gui.h:64
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
WID_CV_RESIZE
Resize button.
Definition: graph_widget.h:31
WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition: widget_type.h:68
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
SetMinimalTextLines
static NWidgetPart SetMinimalTextLines(uint8 lines, uint8 spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition: widget_type.h:965
NWID_SPACER
Invisible widget that takes some space.
Definition: widget_type.h:79
WWT_DEFSIZEBOX
Default window size box (at top-right of a window, between WWT_SHADEBOX and WWT_STICKYBOX) ...
Definition: widget_type.h:65
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:947
WID_CV_GRAPH
Graph itself.
Definition: graph_widget.h:30
WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition: widget_type.h:104
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WD_FRAMERECT_BOTTOM
Offset at bottom to draw the frame rectangular area.
Definition: window_gui.h:65
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
NWID_VERTICAL
Vertical container.
Definition: widget_type.h:77
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
WID_CV_BACKGROUND
Background of the window.
Definition: graph_widget.h:29
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:983
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WID_CV_KEY_BUTTON
Key button.
Definition: graph_widget.h:28

Definition at line 835 of file graph_gui.cpp.

## ◆ _nested_delivered_cargo_graph_widgets

const NWidgetPart _nested_delivered_cargo_graph_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_CARGO_DELIVERED_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_CV_BACKGROUND),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),
EndContainer(),
}
WWT_EMPTY
Empty widget, place holder to reserve space in widget array.
Definition: widget_type.h:48
SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:930
WD_FRAMERECT_TOP
Offset at top to draw the frame rectangular area.
Definition: window_gui.h:64
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
WID_CV_RESIZE
Resize button.
Definition: graph_widget.h:31
WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition: widget_type.h:68
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
SetMinimalTextLines
static NWidgetPart SetMinimalTextLines(uint8 lines, uint8 spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition: widget_type.h:965
NWID_SPACER
Invisible widget that takes some space.
Definition: widget_type.h:79
WWT_DEFSIZEBOX
Default window size box (at top-right of a window, between WWT_SHADEBOX and WWT_STICKYBOX) ...
Definition: widget_type.h:65
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:947
WID_CV_GRAPH
Graph itself.
Definition: graph_widget.h:30
WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition: widget_type.h:104
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WD_FRAMERECT_BOTTOM
Offset at bottom to draw the frame rectangular area.
Definition: window_gui.h:65
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
NWID_VERTICAL
Vertical container.
Definition: widget_type.h:77
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
WID_CV_BACKGROUND
Background of the window.
Definition: graph_widget.h:29
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:983
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WID_CV_KEY_BUTTON
Key button.
Definition: graph_widget.h:28

Definition at line 730 of file graph_gui.cpp.

## ◆ _nested_graph_legend_widgets

const NWidgetPart _nested_graph_legend_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_KEY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_GL_BACKGROUND),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetMinimalSize(2, 0),
NWidgetFunction(MakeNWidgetCompanyLines),
NWidget(NWID_SPACER), SetMinimalSize(2, 0),
EndContainer(),
EndContainer(),
}
NWidgetFunction
static NWidgetPart NWidgetFunction(NWidgetFunctionType *func_ptr)
Obtain a nested widget (sub)tree from an external source.
Definition: widget_type.h:1146
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
NWID_SPACER
Invisible widget that takes some space.
Definition: widget_type.h:79
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:947
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WID_GL_BACKGROUND
Background of the window.
Definition: graph_widget.h:20
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
MakeNWidgetCompanyLines
static NWidgetBase * MakeNWidgetCompanyLines(int *biggest_index)
Construct a vertical list of buttons, one for each company.
Definition: graph_gui.cpp:112
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64

Definition at line 128 of file graph_gui.cpp.

## ◆ _nested_income_graph_widgets

const NWidgetPart _nested_income_graph_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_INCOME_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_CV_BACKGROUND),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),
EndContainer(),
}
WWT_EMPTY
Empty widget, place holder to reserve space in widget array.
Definition: widget_type.h:48
SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:930
WD_FRAMERECT_TOP
Offset at top to draw the frame rectangular area.
Definition: window_gui.h:64
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
WID_CV_RESIZE
Resize button.
Definition: graph_widget.h:31
WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition: widget_type.h:68
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
SetMinimalTextLines
static NWidgetPart SetMinimalTextLines(uint8 lines, uint8 spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition: widget_type.h:965
NWID_SPACER
Invisible widget that takes some space.
Definition: widget_type.h:79
WWT_DEFSIZEBOX
Default window size box (at top-right of a window, between WWT_SHADEBOX and WWT_STICKYBOX) ...
Definition: widget_type.h:65
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:947
WID_CV_GRAPH
Graph itself.
Definition: graph_widget.h:30
WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition: widget_type.h:104
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WD_FRAMERECT_BOTTOM
Offset at bottom to draw the frame rectangular area.
Definition: window_gui.h:65
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
NWID_VERTICAL
Vertical container.
Definition: widget_type.h:77
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
WID_CV_BACKGROUND
Background of the window.
Definition: graph_widget.h:29
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:983
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WID_CV_KEY_BUTTON
Key button.
Definition: graph_widget.h:28

Definition at line 681 of file graph_gui.cpp.

## ◆ _nested_operating_profit_widgets

const NWidgetPart _nested_operating_profit_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_OPERATING_PROFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_CV_BACKGROUND),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 160), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),
EndContainer(),
}
WWT_EMPTY
Empty widget, place holder to reserve space in widget array.
Definition: widget_type.h:48
SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:930
WD_FRAMERECT_TOP
Offset at top to draw the frame rectangular area.
Definition: window_gui.h:64
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
WID_CV_RESIZE
Resize button.
Definition: graph_widget.h:31
WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition: widget_type.h:68
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
SetMinimalTextLines
static NWidgetPart SetMinimalTextLines(uint8 lines, uint8 spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition: widget_type.h:965
NWID_SPACER
Invisible widget that takes some space.
Definition: widget_type.h:79
WWT_DEFSIZEBOX
Default window size box (at top-right of a window, between WWT_SHADEBOX and WWT_STICKYBOX) ...
Definition: widget_type.h:65
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:947
WID_CV_GRAPH
Graph itself.
Definition: graph_widget.h:30
WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition: widget_type.h:104
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WD_FRAMERECT_BOTTOM
Offset at bottom to draw the frame rectangular area.
Definition: window_gui.h:65
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
NWID_VERTICAL
Vertical container.
Definition: widget_type.h:77
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
WID_CV_BACKGROUND
Background of the window.
Definition: graph_widget.h:29
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:983
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WID_CV_KEY_BUTTON
Key button.
Definition: graph_widget.h:28

Definition at line 630 of file graph_gui.cpp.

## ◆ _nested_performance_history_widgets

const NWidgetPart _nested_performance_history_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_DETAILED_PERFORMANCE), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_PERFORMANCE_DETAIL_KEY, STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_KEY), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_PHG_BACKGROUND),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, COLOUR_GREY, WID_PHG_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_PHG_RESIZE),
EndContainer(),
EndContainer(),
EndContainer(),
}
WWT_EMPTY
Empty widget, place holder to reserve space in widget array.
Definition: widget_type.h:48
WID_PHG_BACKGROUND
Background of the window.
Definition: graph_widget.h:38
SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:930
WD_FRAMERECT_TOP
Offset at top to draw the frame rectangular area.
Definition: window_gui.h:64
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition: widget_type.h:68
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
SetMinimalTextLines
static NWidgetPart SetMinimalTextLines(uint8 lines, uint8 spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition: widget_type.h:965
NWID_SPACER
Invisible widget that takes some space.
Definition: widget_type.h:79
WWT_DEFSIZEBOX
Default window size box (at top-right of a window, between WWT_SHADEBOX and WWT_STICKYBOX) ...
Definition: widget_type.h:65
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:947
WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition: widget_type.h:104
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
WID_PHG_DETAILED_PERFORMANCE
Detailed performance.
Definition: graph_widget.h:37
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WD_FRAMERECT_BOTTOM
Offset at bottom to draw the frame rectangular area.
Definition: window_gui.h:65
WID_PHG_GRAPH
Graph itself.
Definition: graph_widget.h:39
WID_PHG_RESIZE
Resize button.
Definition: graph_widget.h:40
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
NWID_VERTICAL
Vertical container.
Definition: widget_type.h:77
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:983
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WID_PHG_KEY
Key button.
Definition: graph_widget.h:36

Definition at line 785 of file graph_gui.cpp.

## ◆ _nested_performance_rating_detail_widgets

const NWidgetPart _nested_performance_rating_detail_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_PERFORMANCE_DETAIL, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidgetFunction(MakeCompanyButtonRowsGraphGUI), SetPadding(0, 1, 1, 2),
EndContainer(),
NWidgetFunction(MakePerformanceDetailPanels),
}
NWidgetFunction
static NWidgetPart NWidgetFunction(NWidgetFunctionType *func_ptr)
Obtain a nested widget (sub)tree from an external source.
Definition: widget_type.h:1146
NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
MakeCompanyButtonRowsGraphGUI
NWidgetBase * MakeCompanyButtonRowsGraphGUI(int *biggest_index)
Make a number of rows with buttons for each company for the performance rating detail window...
Definition: graph_gui.cpp:1556
WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
MakePerformanceDetailPanels
static NWidgetBase * MakePerformanceDetailPanels(int *biggest_index)
Make a vertical list of panels for outputting score details.
Definition: graph_gui.cpp:1527
SetPadding
static NWidgetPart SetPadding(uint8 top, uint8 right, uint8 bottom, uint8 left)
Widget part function for setting additional space around a widget.
Definition: widget_type.h:1046
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1014
WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new &#39;real&#39; widget.
Definition: widget_type.h:1114
WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL).
Definition: widget_type.h:999
WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:66
WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:64

Definition at line 1561 of file graph_gui.cpp.

## ◆ _performance_titles

const StringID _performance_titles[]
| static

Initial value:
= {
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRANSPORT_COORDINATOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRANSPORT_COORDINATOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ROUTE_SUPERVISOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ROUTE_SUPERVISOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_DIRECTOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_DIRECTOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHIEF_EXECUTIVE,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHIEF_EXECUTIVE,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHAIRMAN,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHAIRMAN,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_PRESIDENT,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TYCOON,
}

Definition at line 1103 of file graph_gui.cpp.