| OpenTTD
    | 
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. | |
| 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. | |
| 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. | |
| NWidgetBase * | MakeCompanyButtonRowsGraphGUI (int *biggest_index) | 
| Make a number of rows with buttons for each company for the performance rating detail window. | |
| 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)) | 
GUI that shows performance graphs.
Definition in file graph_gui.cpp.
| 
 | static | 
Construct the row containing the digit keys.
Definition at line 1035 of file graph_gui.cpp.
References _sorted_standard_cargo_specs_size, NWidgetContainer::Add(), NWidgetResizeBase::SetFill(), NWidgetCore::SetLowered(), NWidgetCore::tool_tip, WID_CPR_CARGO_FIRST, and WWT_PANEL.
| 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.
| 
 | static | 
Construct a vertical list of buttons, one for each company.
| biggest_index | Storage for collecting the biggest index used in the returned tree. | 
*biggest_index contains the largest used index in the tree. Definition at line 112 of file graph_gui.cpp.
References NWidgetContainer::Add(), FONT_HEIGHT_NORMAL, GetSpriteSize(), NWidgetCore::SetDataTip(), NWidgetResizeBase::SetFill(), NWidgetResizeBase::SetMinimalSize(), WD_FRAMERECT_BOTTOM, WD_FRAMERECT_TOP, WID_GL_FIRST_COMPANY, WID_GL_LAST_COMPANY, and WWT_PANEL.
| 
 | static | 
Make a vertical list of panels for outputting score details.
| biggest_index | Storage for collecting the biggest index used in the returned tree. | 
*biggest_index contains the largest used index in the tree. Definition at line 1527 of file graph_gui.cpp.
References NWidgetContainer::Add(), lengthof, NC_EQUALSIZE, SCORE_END, NWidgetCore::SetDataTip(), NWidgetResizeBase::SetFill(), WID_PRD_SCORE_FIRST, WID_PRD_SCORE_LAST, and WWT_PANEL.
| 
 | static | 
Definition at line 1265 of file graph_gui.cpp.
| 
 | static | 
Definition at line 835 of file graph_gui.cpp.
| 
 | static | 
Definition at line 730 of file graph_gui.cpp.
| 
 | static | 
Definition at line 128 of file graph_gui.cpp.
| 
 | static | 
Definition at line 681 of file graph_gui.cpp.
| 
 | static | 
Definition at line 630 of file graph_gui.cpp.
| 
 | static | 
Definition at line 785 of file graph_gui.cpp.
| 
 | static | 
Definition at line 1561 of file graph_gui.cpp.
| 
 | static | 
Definition at line 1103 of file graph_gui.cpp.
 1.8.1.2
 1.8.1.2