summaryrefslogtreecommitdiff
path: root/src/graph_gui.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-15 22:22:55 +0000
committertruebrain <truebrain@openttd.org>2011-12-15 22:22:55 +0000
commit2aa774e831ad1cb7849c998759449ef777c5c664 (patch)
tree37293298be999cb3446fe4af7f11e107bfa17c3d /src/graph_gui.cpp
parentfd559171b4ab5ce09b67aa8c4e9f2d0482a09558 (diff)
downloadopenttd-2aa774e831ad1cb7849c998759449ef777c5c664.tar.xz
(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h
Diffstat (limited to 'src/graph_gui.cpp')
-rw-r--r--src/graph_gui.cpp54
1 files changed, 2 insertions, 52 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index 31e3f6b32..2ab5d75f8 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -25,6 +25,8 @@
#include "math.h"
#include "currency.h"
+#include "widgets/graph_widget.h"
+
#include "table/strings.h"
#include "table/sprites.h"
@@ -40,14 +42,6 @@ static const uint INVALID_DATAPOINT_POS = UINT_MAX; // Used to determine if the
/* GRAPH LEGEND */
/****************/
-/** Widget numbers of the graph legend window. */
-enum GraphLegendWidgetNumbers {
- GLW_BACKGROUND,
-
- GLW_FIRST_COMPANY,
- GLW_LAST_COMPANY = GLW_FIRST_COMPANY + MAX_COMPANIES - 1,
-};
-
struct GraphLegendWindow : Window {
GraphLegendWindow(const WindowDesc *desc, WindowNumber window_number) : Window()
{
@@ -168,14 +162,6 @@ struct ValuesInterval {
/* BASE OF GRAPHS */
/*****************/
-/** Widget numbers of a base graph window. */
-enum CompanyValueWidgets {
- BGW_KEY_BUTTON,
- BGW_BACKGROUND,
- BGW_GRAPH,
- BGW_RESIZE,
-};
-
struct BaseGraphWindow : Window {
protected:
static const int GRAPH_MAX_DATASETS = 32;
@@ -706,7 +692,6 @@ static const NWidgetPart _nested_income_graph_widgets[] = {
EndContainer(),
};
-
static const WindowDesc _income_graph_desc(
WDP_AUTO, 0, 0,
WC_INCOME_GRAPH, WC_NONE,
@@ -771,15 +756,6 @@ void ShowDeliveredCargoGraph()
/* PERFORMANCE HISTORY */
/***********************/
-/** Widget numbers of the performance history window. */
-enum PerformanceHistoryGraphWidgets {
- PHW_KEY,
- PHW_DETAILED_PERFORMANCE,
- PHW_BACKGROUND,
- PHW_GRAPH,
- PHW_RESIZE,
-};
-
struct PerformanceHistoryGraphWindow : BaseGraphWindow {
PerformanceHistoryGraphWindow(const WindowDesc *desc, WindowNumber window_number) :
BaseGraphWindow(PHW_GRAPH, STR_JUST_COMMA)
@@ -883,18 +859,6 @@ void ShowCompanyValueGraph()
/* PAYMENT RATES */
/*****************/
-/** Widget numbers of the cargo payment rates. */
-enum CargoPaymentRatesWidgets {
- CPW_BACKGROUND,
- CPW_HEADER,
- CPW_GRAPH,
- CPW_RESIZE,
- CPW_FOOTER,
- CPW_ENABLE_CARGOES,
- CPW_DISABLE_CARGOES,
- CPW_CARGO_FIRST,
-};
-
struct PaymentRatesGraphWindow : BaseGraphWindow {
bool first_init; ///< This value is true until the first initialization of the window has finished.
PaymentRatesGraphWindow(const WindowDesc *desc, WindowNumber window_number) :
@@ -1126,11 +1090,6 @@ void ShowCargoPaymentRates()
/* COMPANY LEAGUE TABLE */
/************************/
-/** Widget numbers for the company league window. */
-enum CompanyLeagueWidgets {
- CLW_BACKGROUND,
-};
-
static const StringID _performance_titles[] = {
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER,
@@ -1319,15 +1278,6 @@ void ShowCompanyLeagueTable()
/* PERFORMANCE RATING DETAIL */
/*****************************/
-/** Widget numbers of the performance rating details window. */
-enum PerformanceRatingDetailsWidgets {
- PRW_SCORE_FIRST,
- PRW_SCORE_LAST = PRW_SCORE_FIRST + (SCORE_END - SCORE_BEGIN) - 1,
-
- PRW_COMPANY_FIRST,
- PRW_COMPANY_LAST = PRW_COMPANY_FIRST + MAX_COMPANIES - 1,
-};
-
struct PerformanceRatingDetailWindow : Window {
static CompanyID company;
int timeout;