summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-16 16:27:45 +0000
committertruebrain <truebrain@openttd.org>2011-12-16 16:27:45 +0000
commite9f584ac210913a404e246184c8d3c1f52428b63 (patch)
treedbeb19676245b06fde6921f26e31575ec6979fd2 /src/widgets
parentb90aa80e77e1321bcae2389a014fe7595301e0e2 (diff)
downloadopenttd-e9f584ac210913a404e246184c8d3c1f52428b63.tar.xz
(svn r23531) -Codechange: document and rename widgets to be consistent and understandable
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/ai_widget.h76
-rw-r--r--src/widgets/airport_widget.h28
-rw-r--r--src/widgets/autoreplace_widget.h32
-rw-r--r--src/widgets/bootstrap_widget.h6
-rw-r--r--src/widgets/bridge_widget.h10
-rw-r--r--src/widgets/build_vehicle_widget.h21
-rw-r--r--src/widgets/cheat_widget.h2
-rw-r--r--src/widgets/company_widget.h304
-rw-r--r--src/widgets/console_widget.h2
-rw-r--r--src/widgets/date_widget.h8
-rw-r--r--src/widgets/depot_widget.h38
-rw-r--r--src/widgets/dock_widget.h20
-rw-r--r--src/widgets/dropdown.cpp20
-rw-r--r--src/widgets/dropdown_widget.h6
-rw-r--r--src/widgets/engine_widget.h6
-rw-r--r--src/widgets/error_widget.h6
-rw-r--r--src/widgets/fios_widget.h36
-rw-r--r--src/widgets/genworld_widget.h137
-rw-r--r--src/widgets/graph_widget.h52
19 files changed, 401 insertions, 409 deletions
diff --git a/src/widgets/ai_widget.h b/src/widgets/ai_widget.h
index 51cab3f30..008790d3b 100644
--- a/src/widgets/ai_widget.h
+++ b/src/widgets/ai_widget.h
@@ -13,53 +13,53 @@
#define WIDGETS_AI_WIDGET_H
/** Widgets of the WC_AI_LIST. */
-enum AIListWindowWidgets {
- AIL_WIDGET_LIST, ///< The matrix with all available AIs
- AIL_WIDGET_SCROLLBAR, ///< Scrollbar next to the AI list
- AIL_WIDGET_INFO_BG, ///< Panel to draw some AI information on
- AIL_WIDGET_ACCEPT, ///< Accept button
- AIL_WIDGET_CANCEL, ///< Cancel button
+enum AIListWidgets {
+ WID_AIL_LIST, ///< The matrix with all available AIs.
+ WID_AIL_SCROLLBAR, ///< Scrollbar next to the AI list.
+ WID_AIL_INFO_BG, ///< Panel to draw some AI information on.
+ WID_AIL_ACCEPT, ///< Accept button.
+ WID_AIL_CANCEL, ///< Cancel button.
};
/** Widgets of the WC_AI_SETTINGS. */
-enum AISettingsWindowWidgets {
- AIS_WIDGET_BACKGROUND, ///< Panel to draw the settings on
- AIS_WIDGET_SCROLLBAR, ///< Scrollbar to scroll through all settings
- AIS_WIDGET_ACCEPT, ///< Accept button
- AIS_WIDGET_RESET, ///< Reset button
+enum AISettingsWidgets {
+ WID_AIS_BACKGROUND, ///< Panel to draw the settings on.
+ WID_AIS_SCROLLBAR, ///< Scrollbar to scroll through all settings.
+ WID_AIS_ACCEPT, ///< Accept button.
+ WID_AIS_RESET, ///< Reset button.
};
/** Widgets of the WC_GAME_OPTIONS (WC_GAME_OPTIONS is also used in others). */
-enum AIConfigWindowWidgets {
- AIC_WIDGET_BACKGROUND, ///< Window background
- AIC_WIDGET_DECREASE, ///< Decrease the number of AIs
- AIC_WIDGET_INCREASE, ///< Increase the number of AIs
- AIC_WIDGET_NUMBER, ///< Number of AIs
- AIC_WIDGET_LIST, ///< List with currently selected AIs
- AIC_WIDGET_SCROLLBAR, ///< Scrollbar to scroll through the selected AIs
- AIC_WIDGET_MOVE_UP, ///< Move up button
- AIC_WIDGET_MOVE_DOWN, ///< Move down button
- AIC_WIDGET_CHANGE, ///< Select another AI button
- AIC_WIDGET_CONFIGURE, ///< Change AI settings button
- AIC_WIDGET_CLOSE, ///< Close window button
- AIC_WIDGET_CONTENT_DOWNLOAD, ///< Download content button
+enum AIConfigWidgets {
+ WID_AIC_BACKGROUND, ///< Window background.
+ WID_AIC_DECREASE, ///< Decrease the number of AIs.
+ WID_AIC_INCREASE, ///< Increase the number of AIs.
+ WID_AIC_NUMBER, ///< Number of AIs.
+ WID_AIC_LIST, ///< List with currently selected AIs.
+ WID_AIC_SCROLLBAR, ///< Scrollbar to scroll through the selected AIs.
+ WID_AIC_MOVE_UP, ///< Move up button.
+ WID_AIC_MOVE_DOWN, ///< Move down button.
+ WID_AIC_CHANGE, ///< Select another AI button.
+ WID_AIC_CONFIGURE, ///< Change AI settings button.
+ WID_AIC_CLOSE, ///< Close window button.
+ WID_AIC_CONTENT_DOWNLOAD, ///< Download content button.
};
/** Widgets of the WC_AI_DEBUG. */
-enum AIDebugWindowWidgets {
- AID_WIDGET_VIEW,
- AID_WIDGET_NAME_TEXT,
- AID_WIDGET_SETTINGS,
- AID_WIDGET_RELOAD_TOGGLE,
- AID_WIDGET_LOG_PANEL,
- AID_WIDGET_SCROLLBAR,
- AID_WIDGET_COMPANY_BUTTON_START,
- AID_WIDGET_COMPANY_BUTTON_END = AID_WIDGET_COMPANY_BUTTON_START + MAX_COMPANIES - 1,
- AID_BREAK_STRING_WIDGETS,
- AID_WIDGET_BREAK_STR_ON_OFF_BTN,
- AID_WIDGET_BREAK_STR_EDIT_BOX,
- AID_WIDGET_MATCH_CASE_BTN,
- AID_WIDGET_CONTINUE_BTN,
+enum AIDebugWidgets {
+ WID_AID_VIEW, ///< The row of company buttons.
+ WID_AID_NAME_TEXT, ///< Name of the current selected.
+ WID_AID_SETTINGS, ///< Settings button.
+ WID_AID_RELOAD_TOGGLE, ///< Reload button.
+ WID_AID_LOG_PANEL, ///< Panel where the log is in.
+ WID_AID_SCROLLBAR, ///< Scrollbar of the log pannel.
+ WID_AID_COMPANY_BUTTON_START, ///< Buttons in the VIEW.
+ WID_AID_COMPANY_BUTTON_END = WID_AID_COMPANY_BUTTON_START + MAX_COMPANIES - 1, ///< Last possible button in the VIEW.
+ WID_AID_BREAK_STRING_WIDGETS, ///< The panel to handle the breaking on string.
+ WID_AID_BREAK_STR_ON_OFF_BTN, ///< Enable breaking on string.
+ WID_AID_BREAK_STR_EDIT_BOX, ///< Edit box for the string to break on.
+ WID_AID_MATCH_CASE_BTN, ///< Checkbox to use match caching or not.
+ WID_AID_CONTINUE_BTN, ///< Continue button.
};
#endif /* WIDGETS_AI_WIDGET_H */
diff --git a/src/widgets/airport_widget.h b/src/widgets/airport_widget.h
index 35df2e1a4..76c419738 100644
--- a/src/widgets/airport_widget.h
+++ b/src/widgets/airport_widget.h
@@ -14,24 +14,24 @@
/** Widgets of the WC_BUILD_TOOLBAR (WC_BUILD_TOOLBAR is also used in others). */
enum AirportToolbarWidgets {
- ATW_AIRPORT,
- ATW_DEMOLISH,
+ WID_AT_AIRPORT, ///< Build airport button.
+ WID_AT_DEMOLISH, ///< Demolish button.
};
/** Widgets of the WC_BUILD_STATION (WC_BUILD_STATION is also used in others). */
enum AirportPickerWidgets {
- BAIRW_CLASS_DROPDOWN,
- BAIRW_AIRPORT_LIST,
- BAIRW_SCROLLBAR,
- BAIRW_LAYOUT_NUM,
- BAIRW_LAYOUT_DECREASE,
- BAIRW_LAYOUT_INCREASE,
- BAIRW_AIRPORT_SPRITE,
- BAIRW_EXTRA_TEXT,
- BAIRW_BOTTOMPANEL,
- BAIRW_COVERAGE_LABEL,
- BAIRW_BTN_DONTHILIGHT,
- BAIRW_BTN_DOHILIGHT,
+ WID_AP_CLASS_DROPDOWN, ///< Dropdown of airport classes.
+ WID_AP_AIRPORT_LIST, ///< List of airports.
+ WID_AP_SCROLLBAR, ///< Scrollbar of the list.
+ WID_AP_LAYOUT_NUM, ///< Current number of the layout.
+ WID_AP_LAYOUT_DECREASE, ///< Decrease the layout number.
+ WID_AP_LAYOUT_INCREASE, ///< Increase the layout number.
+ WID_AP_AIRPORT_SPRITE, ///< A visual display of the airport currently selected.
+ WID_AP_EXTRA_TEXT, ///< Additional text about the airport.
+ WID_AP_BOTTOMPANEL, ///< Panel at the bottom.
+ WID_AP_COVERAGE_LABEL, ///< Label if you want to see the coverage.
+ WID_AP_BTN_DONTHILIGHT, ///< Don't show the coverage button.
+ WID_AP_BTN_DOHILIGHT, ///< Show the coverage button.
};
#endif /* WIDGETS_AIRPORT_WIDGET_H */
diff --git a/src/widgets/autoreplace_widget.h b/src/widgets/autoreplace_widget.h
index 51205a269..f74286f76 100644
--- a/src/widgets/autoreplace_widget.h
+++ b/src/widgets/autoreplace_widget.h
@@ -13,28 +13,28 @@
#define WIDGETS_AUTOREPLACE_WIDGET_H
/** Widgets of the WC_REPLACE_VEHICLE. */
-enum ReplaceVehicleWindowWidgets {
- RVW_WIDGET_CAPTION,
+enum ReplaceVehicleWidgets {
+ WID_RV_CAPTION, ///< Caption of the window.
/* Left and right matrix + details. */
- RVW_WIDGET_LEFT_MATRIX,
- RVW_WIDGET_LEFT_SCROLLBAR,
- RVW_WIDGET_RIGHT_MATRIX,
- RVW_WIDGET_RIGHT_SCROLLBAR,
- RVW_WIDGET_LEFT_DETAILS,
- RVW_WIDGET_RIGHT_DETAILS,
+ WID_RV_LEFT_MATRIX, ///< The matrix on the left.
+ WID_RV_LEFT_SCROLLBAR, ///< The scrollbar for the matrix on the left.
+ WID_RV_RIGHT_MATRIX, ///< The matrix on the right.
+ WID_RV_RIGHT_SCROLLBAR, ///< The scrollbar for the matrxi on the right.
+ WID_RV_LEFT_DETAILS, ///< Details of the entry on the left.
+ WID_RV_RIGHT_DETAILS, ///< Details of the entry on the right.
/* Button row. */
- RVW_WIDGET_START_REPLACE,
- RVW_WIDGET_INFO_TAB,
- RVW_WIDGET_STOP_REPLACE,
+ WID_RV_START_REPLACE, ///< Start Replacing button.
+ WID_RV_INFO_TAB, ///< Info tab.
+ WID_RV_STOP_REPLACE, ///< Stop Replacing button.
/* Train only widgets. */
- RVW_WIDGET_TRAIN_ENGINEWAGON_TOGGLE,
- RVW_WIDGET_TRAIN_FLUFF_LEFT,
- RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN,
- RVW_WIDGET_TRAIN_FLUFF_RIGHT,
- RVW_WIDGET_TRAIN_WAGONREMOVE_TOGGLE,
+ WID_RV_TRAIN_ENGINEWAGON_TOGGLE, ///< Button to toggle engines and/or wagons.
+ WID_RV_TRAIN_FLUFF_LEFT, ///< The fluff on the left.
+ WID_RV_TRAIN_RAILTYPE_DROPDOWN, ///< Dropdown menu about the railtype.
+ WID_RV_TRAIN_FLUFF_RIGHT, ///< The fluff on the right.
+ WID_RV_TRAIN_WAGONREMOVE_TOGGLE, ///< Button to toggle removing wagons.
};
#endif /* WIDGETS_AUTOREPLACE_WIDGET_H */
diff --git a/src/widgets/bootstrap_widget.h b/src/widgets/bootstrap_widget.h
index 9fd25d90e..1d3b7617b 100644
--- a/src/widgets/bootstrap_widget.h
+++ b/src/widgets/bootstrap_widget.h
@@ -14,9 +14,9 @@
/** Widgets of the WC_CONFIRM_POPUP_QUERY (WC_CONFIRM_POPUP_QUERY is also used in QueryWidgets). */
enum BootstrapAskForDownloadWidgets {
- BAFDW_QUESTION, ///< The question whether to download.
- BAFDW_YES, ///< An affirmative answer to the question.
- BAFDW_NO, ///< An negative answer to the question.
+ WID_BAFD_QUESTION, ///< The question whether to download.
+ WID_BAFD_YES, ///< An affirmative answer to the question.
+ WID_BAFD_NO, ///< An negative answer to the question.
};
#endif /* WIDGETS_BOOTSTRAP_WIDGET_H */
diff --git a/src/widgets/bridge_widget.h b/src/widgets/bridge_widget.h
index aa4a7cd4c..69792695d 100644
--- a/src/widgets/bridge_widget.h
+++ b/src/widgets/bridge_widget.h
@@ -14,11 +14,11 @@
/** Widgets of the WC_BUILD_BRIDGE. */
enum BuildBridgeSelectionWidgets {
- BBSW_CAPTION,
- BBSW_DROPDOWN_ORDER,
- BBSW_DROPDOWN_CRITERIA,
- BBSW_BRIDGE_LIST,
- BBSW_SCROLLBAR,
+ WID_BBS_CAPTION, ///< Caption of the window.
+ WID_BBS_DROPDOWN_ORDER, ///< Direction of sort dropdown.
+ WID_BBS_DROPDOWN_CRITERIA, ///< Criteria of sort dropdown.
+ WID_BBS_BRIDGE_LIST, ///< List of bridges.
+ WID_BBS_SCROLLBAR, ///< Scrollbar of the list.
};
#endif /* WIDGETS_BRIDGE_WIDGET_H */
diff --git a/src/widgets/build_vehicle_widget.h b/src/widgets/build_vehicle_widget.h
index 715f47d5c..a3a384227 100644
--- a/src/widgets/build_vehicle_widget.h
+++ b/src/widgets/build_vehicle_widget.h
@@ -14,17 +14,16 @@
/** Widgets of the WC_BUILD_VEHICLE. */
enum BuildVehicleWidgets {
- BUILD_VEHICLE_WIDGET_CAPTION,
- BUILD_VEHICLE_WIDGET_SORT_ASSENDING_DESCENDING,
- BUILD_VEHICLE_WIDGET_SORT_DROPDOWN,
- BUILD_VEHICLE_WIDGET_CARGO_FILTER_DROPDOWN,
- BUILD_VEHICLE_WIDGET_LIST,
- BUILD_VEHICLE_WIDGET_SCROLLBAR,
- BUILD_VEHICLE_WIDGET_PANEL,
- BUILD_VEHICLE_WIDGET_BUILD,
- BUILD_VEHICLE_WIDGET_BUILD_SEL,
- BUILD_VEHICLE_WIDGET_RENAME,
- BUILD_VEHICLE_WIDGET_END
+ WID_BV_CAPTION, ///< Caption of window.
+ WID_BV_SORT_ASSENDING_DESCENDING, ///< Sort direction.
+ WID_BV_SORT_DROPDOWN, ///< Criteria of sorting dropdown.
+ WID_BV_CARGO_FILTER_DROPDOWN, ///< Cargo filter dropdown.
+ WID_BV_LIST, ///< List of vehicles.
+ WID_BV_SCROLLBAR, ///< Scrollbar of list.
+ WID_BV_PANEL, ///< Button panel.
+ WID_BV_BUILD, ///< Build panel.
+ WID_BV_BUILD_SEL, ///< Build button.
+ WID_BV_RENAME, ///< Rename button.
};
#endif /* WIDGETS_BUILD_VEHICLE_WIDGET_H */
diff --git a/src/widgets/cheat_widget.h b/src/widgets/cheat_widget.h
index 64ebc588d..ba368dd50 100644
--- a/src/widgets/cheat_widget.h
+++ b/src/widgets/cheat_widget.h
@@ -14,7 +14,7 @@
/** Widgets of the WC_CHEATS. */
enum CheatWidgets {
- CW_PANEL,
+ WID_C_PANEL, ///< Panel where all cheats are shown in.
};
#endif /* WIDGETS_CHEAT_WIDGET_H */
diff --git a/src/widgets/company_widget.h b/src/widgets/company_widget.h
index 684df9376..e2cdcd447 100644
--- a/src/widgets/company_widget.h
+++ b/src/widgets/company_widget.h
@@ -13,179 +13,179 @@
#define WIDGETS_COMPANY_WIDGET_H
/** Widgets of the WC_COMPANY. */
-enum CompanyWindowWidgets {
- CW_WIDGET_CAPTION,
-
- CW_WIDGET_FACE,
- CW_WIDGET_FACE_TITLE,
-
- CW_WIDGET_DESC_INAUGURATION,
- CW_WIDGET_DESC_COLOUR_SCHEME,
- CW_WIDGET_DESC_COLOUR_SCHEME_EXAMPLE,
- CW_WIDGET_DESC_VEHICLE,
- CW_WIDGET_DESC_VEHICLE_COUNTS,
- CW_WIDGET_DESC_COMPANY_VALUE,
- CW_WIDGET_DESC_INFRASTRUCTURE,
- CW_WIDGET_DESC_INFRASTRUCTURE_COUNTS,
-
- CW_WIDGET_SELECT_DESC_OWNERS,
- CW_WIDGET_DESC_OWNERS,
-
- CW_WIDGET_SELECT_BUTTONS, ///< Selection widget for the button bar.
- CW_WIDGET_NEW_FACE,
- CW_WIDGET_COLOUR_SCHEME,
- CW_WIDGET_PRESIDENT_NAME,
- CW_WIDGET_COMPANY_NAME,
- CW_WIDGET_BUY_SHARE,
- CW_WIDGET_SELL_SHARE,
-
- CW_WIDGET_SELECT_VIEW_BUILD_HQ,
- CW_WIDGET_VIEW_HQ,
- CW_WIDGET_BUILD_HQ,
-
- CW_WIDGET_SELECT_RELOCATE, ///< View/hide the 'Relocate HQ' button.
- CW_WIDGET_RELOCATE_HQ,
-
- CW_WIDGET_VIEW_INFRASTRUCTURE,
-
- CW_WIDGET_HAS_PASSWORD, ///< Draw a lock when the company has a password
- CW_WIDGET_SELECT_MULTIPLAYER, ///< Multiplayer selection panel.
- CW_WIDGET_COMPANY_PASSWORD,
- CW_WIDGET_COMPANY_JOIN,
+enum CompanyWidgets {
+ WID_C_CAPTION, ///< Caption of the window.
+
+ WID_C_FACE, ///< View of the face.
+ WID_C_FACE_TITLE, ///< Title for the face.
+
+ WID_C_DESC_INAUGURATION, ///< Inauguration.
+ WID_C_DESC_COLOUR_SCHEME, ///< Colour scheme.
+ WID_C_DESC_COLOUR_SCHEME_EXAMPLE, ///< Colour scheme example.
+ WID_C_DESC_VEHICLE, ///< Vehicles.
+ WID_C_DESC_VEHICLE_COUNTS, ///< Vehicle count.
+ WID_C_DESC_COMPANY_VALUE, ///< Company value.
+ WID_C_DESC_INFRASTRUCTURE, ///< Infrastructure.
+ WID_C_DESC_INFRASTRUCTURE_COUNTS, ///< Infrastructure count.
+
+ WID_C_SELECT_DESC_OWNERS, ///< Owners.
+ WID_C_DESC_OWNERS, ///< Owner in Owners.
+
+ WID_C_SELECT_BUTTONS, ///< Selection widget for the button bar.
+ WID_C_NEW_FACE, ///< Button to make new face.
+ WID_C_COLOUR_SCHEME, ///< Button to change colour scheme.
+ WID_C_PRESIDENT_NAME, ///< Button to change president name.
+ WID_C_COMPANY_NAME, ///< Button to change company name.
+ WID_C_BUY_SHARE, ///< Button to buy a share.
+ WID_C_SELL_SHARE, ///< Button to sell a share.
+
+ WID_C_SELECT_VIEW_BUILD_HQ, ///< Panel about HQ.
+ WID_C_VIEW_HQ, ///< Button to view the HQ.
+ WID_C_BUILD_HQ, ///< Button to build the HQ.
+
+ WID_C_SELECT_RELOCATE, ///< Panel about 'Relocate HQ'.
+ WID_C_RELOCATE_HQ, ///< Button to relocate the HQ.
+
+ WID_C_VIEW_INFRASTRUCTURE, ///< Panel about infrastructure.
+
+ WID_C_HAS_PASSWORD, ///< Has company password lock.
+ WID_C_SELECT_MULTIPLAYER, ///< Multiplayer selection panel.
+ WID_C_COMPANY_PASSWORD, ///< Button to set company password.
+ WID_C_COMPANY_JOIN, ///< Button to join company.
};
/** Widgets of the WC_FINANCES. */
-enum CompanyFinancesWindowWidgets {
- CFW_CAPTION, ///< Caption of the window
- CFW_TOGGLE_SIZE, ///< Toggle windows size
- CFW_SEL_PANEL, ///< Select panel or nothing
- CFW_EXPS_CATEGORY, ///< Column for expenses category strings
- CFW_EXPS_PRICE1, ///< Column for year Y-2 expenses
- CFW_EXPS_PRICE2, ///< Column for year Y-1 expenses
- CFW_EXPS_PRICE3, ///< Column for year Y expenses
- CFW_TOTAL_PANEL, ///< Panel for totals
- CFW_SEL_MAXLOAN, ///< Selection of maxloan column
- CFW_BALANCE_VALUE, ///< Bank balance value
- CFW_LOAN_VALUE, ///< Loan
- CFW_LOAN_LINE, ///< Line for summing bank balance and loan
- CFW_TOTAL_VALUE, ///< Total
- CFW_MAXLOAN_GAP, ///< Gap above max loan widget
- CFW_MAXLOAN_VALUE, ///< Max loan widget
- CFW_SEL_BUTTONS, ///< Selection of buttons
- CFW_INCREASE_LOAN, ///< Increase loan
- CFW_REPAY_LOAN, ///< Decrease loan
- CFW_INFRASTRUCTURE,///< View company infrastructure
+enum CompanyFinancesWidgets {
+ WID_CF_CAPTION, ///< Caption of the window.
+ WID_CF_TOGGLE_SIZE, ///< Toggle windows size.
+ WID_CF_SEL_PANEL, ///< Select panel or nothing.
+ WID_CF_EXPS_CATEGORY, ///< Column for expenses category strings.
+ WID_CF_EXPS_PRICE1, ///< Column for year Y-2 expenses.
+ WID_CF_EXPS_PRICE2, ///< Column for year Y-1 expenses.
+ WID_CF_EXPS_PRICE3, ///< Column for year Y expenses.
+ WID_CF_TOTAL_PANEL, ///< Panel for totals.
+ WID_CF_SEL_MAXLOAN, ///< Selection of maxloan column.
+ WID_CF_BALANCE_VALUE, ///< Bank balance value.
+ WID_CF_LOAN_VALUE, ///< Loan.
+ WID_CF_LOAN_LINE, ///< Line for summing bank balance and loan.
+ WID_CF_TOTAL_VALUE, ///< Total.
+ WID_CF_MAXLOAN_GAP, ///< Gap above max loan widget.
+ WID_CF_MAXLOAN_VALUE, ///< Max loan widget.
+ WID_CF_SEL_BUTTONS, ///< Selection of buttons.
+ WID_CF_INCREASE_LOAN, ///< Increase loan.
+ WID_CF_REPAY_LOAN, ///< Decrease loan..
+ WID_CF_INFRASTRUCTURE,///< View company infrastructure.
};
/** Widgets of the WC_COMPANY_COLOUR. */
-enum SelectCompanyLiveryWindowWidgets {
- SCLW_WIDGET_CAPTION,
- SCLW_WIDGET_CLASS_GENERAL,
- SCLW_WIDGET_CLASS_RAIL,
- SCLW_WIDGET_CLASS_ROAD,
- SCLW_WIDGET_CLASS_SHIP,
- SCLW_WIDGET_CLASS_AIRCRAFT,
- SCLW_WIDGET_SPACER_DROPDOWN,
- SCLW_WIDGET_PRI_COL_DROPDOWN,
- SCLW_WIDGET_SEC_COL_DROPDOWN,
- SCLW_WIDGET_MATRIX,
+enum SelectCompanyLiveryWidgets {
+ WID_SCL_CAPTION, ///< Caption of window.
+ WID_SCL_CLASS_GENERAL, ///< Class general.
+ WID_SCL_CLASS_RAIL, ///< Class rail.
+ WID_SCL_CLASS_ROAD, ///< Class road.
+ WID_SCL_CLASS_SHIP, ///< Class ship.
+ WID_SCL_CLASS_AIRCRAFT, ///< Class aircraft.
+ WID_SCL_SPACER_DROPDOWN, ///< Spacer for dropdown.
+ WID_SCL_PRI_COL_DROPDOWN, ///< Dropdown for primary colour.
+ WID_SCL_SEC_COL_DROPDOWN, ///< Dropdown for secondary colour.
+ WID_SCL_MATRIX, ///< Matrix.
};
/** Widgets of the WC_COMPANY_MANAGER_FACE.
- * Do not change the order of the widgets from SCMFW_WIDGET_HAS_MOUSTACHE_EARRING to SCMFW_WIDGET_GLASSES_R,
+ * Do not change the order of the widgets from WID_SCMF_HAS_MOUSTACHE_EARRING to WID_SCMF_GLASSES_R,
* this order is needed for the WE_CLICK event of DrawFaceStringLabel().
*/
enum SelectCompanyManagerFaceWidgets {
- SCMFW_WIDGET_CAPTION,
- SCMFW_WIDGET_TOGGLE_LARGE_SMALL,
- SCMFW_WIDGET_SELECT_FACE,
- SCMFW_WIDGET_CANCEL,
- SCMFW_WIDGET_ACCEPT,
- SCMFW_WIDGET_MALE, ///< Male button in the simple view.
- SCMFW_WIDGET_FEMALE, ///< Female button in the simple view.
- SCMFW_WIDGET_MALE2, ///< Male button in the advanced view.
- SCMFW_WIDGET_FEMALE2, ///< Female button in the advanced view.
- SCMFW_WIDGET_SEL_LOADSAVE, ///< Selection to display the load/save/number buttons in the advanced view.
- SCMFW_WIDGET_SEL_MALEFEMALE, ///< Selection to display the male/female buttons in the simple view.
- SCMFW_WIDGET_SEL_PARTS, ///< Selection to display the buttons for setting each part of the face in the advanced view.
- SCMFW_WIDGET_RANDOM_NEW_FACE,
- SCMFW_WIDGET_TOGGLE_LARGE_SMALL_BUTTON,
- SCMFM_WIDGET_FACE,
- SCMFW_WIDGET_LOAD,
- SCMFW_WIDGET_FACECODE,
- SCMFW_WIDGET_SAVE,
- SCMFW_WIDGET_HAS_MOUSTACHE_EARRING_TEXT,
- SCMFW_WIDGET_TIE_EARRING_TEXT,
- SCMFW_WIDGET_LIPS_MOUSTACHE_TEXT,
- SCMFW_WIDGET_HAS_GLASSES_TEXT,
- SCMFW_WIDGET_HAIR_TEXT,
- SCMFW_WIDGET_EYEBROWS_TEXT,
- SCMFW_WIDGET_EYECOLOUR_TEXT,
- SCMFW_WIDGET_GLASSES_TEXT,
- SCMFW_WIDGET_NOSE_TEXT,
- SCMFW_WIDGET_CHIN_TEXT,
- SCMFW_WIDGET_JACKET_TEXT,
- SCMFW_WIDGET_COLLAR_TEXT,
- SCMFW_WIDGET_ETHNICITY_EUR,
- SCMFW_WIDGET_ETHNICITY_AFR,
- SCMFW_WIDGET_HAS_MOUSTACHE_EARRING,
- SCMFW_WIDGET_HAS_GLASSES,
- SCMFW_WIDGET_EYECOLOUR_L,
- SCMFW_WIDGET_EYECOLOUR,
- SCMFW_WIDGET_EYECOLOUR_R,
- SCMFW_WIDGET_CHIN_L,
- SCMFW_WIDGET_CHIN,
- SCMFW_WIDGET_CHIN_R,
- SCMFW_WIDGET_EYEBROWS_L,
- SCMFW_WIDGET_EYEBROWS,
- SCMFW_WIDGET_EYEBROWS_R,
- SCMFW_WIDGET_LIPS_MOUSTACHE_L,
- SCMFW_WIDGET_LIPS_MOUSTACHE,
- SCMFW_WIDGET_LIPS_MOUSTACHE_R,
- SCMFW_WIDGET_NOSE_L,
- SCMFW_WIDGET_NOSE,
- SCMFW_WIDGET_NOSE_R,
- SCMFW_WIDGET_HAIR_L,
- SCMFW_WIDGET_HAIR,
- SCMFW_WIDGET_HAIR_R,
- SCMFW_WIDGET_JACKET_L,
- SCMFW_WIDGET_JACKET,
- SCMFW_WIDGET_JACKET_R,
- SCMFW_WIDGET_COLLAR_L,
- SCMFW_WIDGET_COLLAR,
- SCMFW_WIDGET_COLLAR_R,
- SCMFW_WIDGET_TIE_EARRING_L,
- SCMFW_WIDGET_TIE_EARRING,
- SCMFW_WIDGET_TIE_EARRING_R,
- SCMFW_WIDGET_GLASSES_L,
- SCMFW_WIDGET_GLASSES,
- SCMFW_WIDGET_GLASSES_R,
+ WID_SCMF_CAPTION, ///< Caption of window.
+ WID_SCMF_TOGGLE_LARGE_SMALL, ///< Toggle for large or small.
+ WID_SCMF_SELECT_FACE, ///< Select face.
+ WID_SCMF_CANCEL, ///< Cancel.
+ WID_SCMF_ACCEPT, ///< Accept.
+ WID_SCMF_MALE, ///< Male button in the simple view.
+ WID_SCMF_FEMALE, ///< Female button in the simple view.
+ WID_SCMF_MALE2, ///< Male button in the advanced view.
+ WID_SCMF_FEMALE2, ///< Female button in the advanced view.
+ WID_SCMF_SEL_LOADSAVE, ///< Selection to display the load/save/number buttons in the advanced view.
+ WID_SCMF_SEL_MALEFEMALE, ///< Selection to display the male/female buttons in the simple view.
+ WID_SCMF_SEL_PARTS, ///< Selection to display the buttons for setting each part of the face in the advanced view.
+ WID_SCMF_RANDOM_NEW_FACE, ///< Create random new face.
+ WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON, ///< Toggle for large or small.
+ WID_SCMF_FACE, ///< Current face.
+ WID_SCMF_LOAD, ///< Load face.
+ WID_SCMF_FACECODE, ///< Get the face code.
+ WID_SCMF_SAVE, ///< Save face.
+ WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT, ///< Text about moustache and earring.
+ WID_SCMF_TIE_EARRING_TEXT, ///< Text about tie and earring.
+ WID_SCMF_LIPS_MOUSTACHE_TEXT, ///< Text about lips and moustache.
+ WID_SCMF_HAS_GLASSES_TEXT, ///< Text about glasses.
+ WID_SCMF_HAIR_TEXT, ///< Text about hair.
+ WID_SCMF_EYEBROWS_TEXT, ///< Text about eyebrows.
+ WID_SCMF_EYECOLOUR_TEXT, ///< Text about eyecolour.
+ WID_SCMF_GLASSES_TEXT, ///< Text about glasses.
+ WID_SCMF_NOSE_TEXT, ///< Text about nose.
+ WID_SCMF_CHIN_TEXT, ///< Text about chin.
+ WID_SCMF_JACKET_TEXT, ///< Text about jacket.
+ WID_SCMF_COLLAR_TEXT, ///< Text about collar.
+ WID_SCMF_ETHNICITY_EUR, ///< Text about ethnicity european.
+ WID_SCMF_ETHNICITY_AFR, ///< Text about ethnicity african.
+ WID_SCMF_HAS_MOUSTACHE_EARRING, ///< Has moustache or earring.
+ WID_SCMF_HAS_GLASSES, ///< Has glasses.
+ WID_SCMF_EYECOLOUR_L, ///< Eyecolour left.
+ WID_SCMF_EYECOLOUR, ///< Eyecolour.
+ WID_SCMF_EYECOLOUR_R, ///< Eyecolour right.
+ WID_SCMF_CHIN_L, ///< Chin left.
+ WID_SCMF_CHIN, ///< Chin.
+ WID_SCMF_CHIN_R, ///< Chin right.
+ WID_SCMF_EYEBROWS_L, ///< Eyebrows left.
+ WID_SCMF_EYEBROWS, ///< Eyebrows.
+ WID_SCMF_EYEBROWS_R, ///< Eyebrows right.
+ WID_SCMF_LIPS_MOUSTACHE_L, ///< Lips / Moustache left.
+ WID_SCMF_LIPS_MOUSTACHE, ///< Lips / Moustache.
+ WID_SCMF_LIPS_MOUSTACHE_R, ///< Lips / Moustache right.
+ WID_SCMF_NOSE_L, ///< Nose left.
+ WID_SCMF_NOSE, ///< Nose.
+ WID_SCMF_NOSE_R, ///< Nose right.
+ WID_SCMF_HAIR_L, ///< Hair left.
+ WID_SCMF_HAIR, ///< Hair.
+ WID_SCMF_HAIR_R, ///< Hair right.
+ WID_SCMF_JACKET_L, ///< Jacket left.
+ WID_SCMF_JACKET, ///< Jacket.
+ WID_SCMF_JACKET_R, ///< Jacket right.
+ WID_SCMF_COLLAR_L, ///< Collar left.
+ WID_SCMF_COLLAR, ///< Collar.
+ WID_SCMF_COLLAR_R, ///< Collar right.
+ WID_SCMF_TIE_EARRING_L, ///< Tie / Earring left.
+ WID_SCMF_TIE_EARRING, ///< Tie / Earring.
+ WID_SCMF_TIE_EARRING_R, ///< Tie / Earring right.
+ WID_SCMF_GLASSES_L, ///< Glasses left.
+ WID_SCMF_GLASSES, ///< Glasses.
+ WID_SCMF_GLASSES_R, ///< Glasses right.
};
/** Widgets of the WC_COMPANY_INFRASTRUCTURE. */
-enum CompanyInfrastructureWindowWidgets {
- CIW_WIDGET_CAPTION,
- CIW_WIDGET_RAIL_DESC,
- CIW_WIDGET_RAIL_COUNT,
- CIW_WIDGET_ROAD_DESC,
- CIW_WIDGET_ROAD_COUNT,
- CIW_WIDGET_WATER_DESC,
- CIW_WIDGET_WATER_COUNT,
- CIW_WIDGET_STATION_DESC,
- CIW_WIDGET_STATION_COUNT,
- CIW_WIDGET_TOTAL_DESC,
- CIW_WIDGET_TOTAL,
+enum CompanyInfrastructureWidgets {
+ WID_CI_CAPTION, ///< Caption of window.
+ WID_CI_RAIL_DESC, ///< Description of rail.
+ WID_CI_RAIL_COUNT, ///< Count of rail.
+ WID_CI_ROAD_DESC, ///< Description of road.
+ WID_CI_ROAD_COUNT, ///< Count of road.
+ WID_CI_WATER_DESC, ///< Description of water.
+ WID_CI_WATER_COUNT, ///< Count of water.
+ WID_CI_STATION_DESC, ///< Description of station.
+ WID_CI_STATION_COUNT, ///< Count of station.
+ WID_CI_TOTAL_DESC, ///< Description of total.
+ WID_CI_TOTAL, ///< Count of total.
};
/** Widgets of the WC_BUY_COMPANY. */
enum BuyCompanyWidgets {
- BCW_CAPTION,
- BCW_FACE,
- BCW_QUESTION,
- BCW_NO,
- BCW_YES,
+ WID_BC_CAPTION, ///< Caption of window.
+ WID_BC_FACE, ///< Face button.
+ WID_BC_QUESTION, ///< Question text.
+ WID_BC_NO, ///< No button.
+ WID_BC_YES, ///< Yes button.
};
#endif /* WIDGETS_COMPANY_WIDGET_H */
diff --git a/src/widgets/console_widget.h b/src/widgets/console_widget.h
index 773d9d572..53d2b5f93 100644
--- a/src/widgets/console_widget.h
+++ b/src/widgets/console_widget.h
@@ -14,7 +14,7 @@
/** Widgets of the WC_CONSOLE. */
enum ConsoleWidgets {
- CW_BACKGROUND, ///< Background of the console
+ WID_C_BACKGROUND, ///< Background of the console.
};
#endif /* WIDGETS_CONSOLE_WIDGET_H */
diff --git a/src/widgets/date_widget.h b/src/widgets/date_widget.h
index 78fd49080..a0b08922b 100644
--- a/src/widgets/date_widget.h
+++ b/src/widgets/date_widget.h
@@ -14,10 +14,10 @@
/** Widgets of the WC_SET_DATE. */
enum SetDateWidgets {
- SDW_DAY, ///< Dropdown for the day
- SDW_MONTH, ///< Dropdown for the month
- SDW_YEAR, ///< Dropdown for the year
- SDW_SET_DATE, ///< Actually set the date
+ WID_SD_DAY, ///< Dropdown for the day.
+ WID_SD_MONTH, ///< Dropdown for the month.
+ WID_SD_YEAR, ///< Dropdown for the year.
+ WID_SD_SET_DATE, ///< Actually set the date.
};
#endif /* WIDGETS_DATE_WIDGET_H */
diff --git a/src/widgets/depot_widget.h b/src/widgets/depot_widget.h
index 755a8be57..d849bcd18 100644
--- a/src/widgets/depot_widget.h
+++ b/src/widgets/depot_widget.h
@@ -13,25 +13,25 @@
#define WIDGETS_DEPOT_WIDGET_H
/** Widgets of the WC_VEHICLE_DEPOT. */
-enum DepotWindowWidgets {
- DEPOT_WIDGET_CAPTION,
- DEPOT_WIDGET_SELL,
- DEPOT_WIDGET_SHOW_SELL_CHAIN,
- DEPOT_WIDGET_SELL_CHAIN,
- DEPOT_WIDGET_SELL_ALL,
- DEPOT_WIDGET_AUTOREPLACE,
- DEPOT_WIDGET_MATRIX,
- DEPOT_WIDGET_V_SCROLL, ///< Vertical scrollbar
- DEPOT_WIDGET_SHOW_H_SCROLL,
- DEPOT_WIDGET_H_SCROLL, ///< Horizontal scrollbar
- DEPOT_WIDGET_BUILD,
- DEPOT_WIDGET_CLONE,
- DEPOT_WIDGET_LOCATION,
- DEPOT_WIDGET_SHOW_RENAME,
- DEPOT_WIDGET_RENAME,
- DEPOT_WIDGET_VEHICLE_LIST,
- DEPOT_WIDGET_STOP_ALL,
- DEPOT_WIDGET_START_ALL,
+enum VehicleDepotWidgets {
+ WID_VD_CAPTION, ///< Caption of window.
+ WID_VD_SELL, ///< Sell button.
+ WID_VD_SHOW_SELL_CHAIN, ///< Show sell chain panel.
+ WID_VD_SELL_CHAIN, ///< Sell chain button.
+ WID_VD_SELL_ALL, ///< Sell all button.
+ WID_VD_AUTOREPLACE, ///< Autoreplace button.
+ WID_VD_MATRIX, ///< Matrix of vehicles.
+ WID_VD_V_SCROLL, ///< Vertical scrollbar.
+ WID_VD_SHOW_H_SCROLL, ///< Show horizontal scrollbar panel.
+ WID_VD_H_SCROLL, ///< Horizontal scrollbar.
+ WID_VD_BUILD, ///< Build button.
+ WID_VD_CLONE, ///< Clone button.
+ WID_VD_LOCATION, ///< Location button.
+ WID_VD_SHOW_RENAME, ///< Show rename panel.
+ WID_VD_RENAME, ///< Rename button.
+ WID_VD_VEHICLE_LIST, ///< List of vehicles.
+ WID_VD_STOP_ALL, ///< Stop all button.
+ WID_VD_START_ALL, ///< Start all button.
};
#endif /* WIDGETS_DEPOT_WIDGET_H */
diff --git a/src/widgets/dock_widget.h b/src/widgets/dock_widget.h
index eedd42a25..010addfcc 100644
--- a/src/widgets/dock_widget.h
+++ b/src/widgets/dock_widget.h
@@ -14,16 +14,16 @@
/** Widgets of the WC_SCEN_BUILD_TOOLBAR / WC_BUILD_TOOLBAR (WC_SCEN_BUILD_TOOLBAR / WC_BUILD_TOOLBAR is also used in others). */
enum DockToolbarWidgets {
- DTW_BUTTONS_BEGIN, ///< Begin of clickable buttons (except seperating panel)
- DTW_CANAL = DTW_BUTTONS_BEGIN, ///< Build canal button
- DTW_LOCK, ///< Build lock button
- DTW_DEMOLISH, ///< Demolish aka dynamite button
- DTW_DEPOT, ///< Build depot button
- DTW_STATION, ///< Build station button
- DTW_BUOY, ///< Build buoy button
- DTW_RIVER, ///< Build river button (in scenario editor)
- DTW_BUILD_AQUEDUCT, ///< Build aqueduct button
- DTW_END, ///< End of toolbar widgets
+ WID_DT_CANAL, ///< Build canal button.
+ WID_DT_LOCK, ///< Build lock button.
+ WID_DT_DEMOLISH, ///< Demolish aka dynamite button.
+ WID_DT_DEPOT, ///< Build depot button.
+ WID_DT_STATION, ///< Build station button.
+ WID_DT_BUOY, ///< Build buoy button.
+ WID_DT_RIVER, ///< Build river button (in scenario editor).
+ WID_DT_BUILD_AQUEDUCT, ///< Build aqueduct button.
+
+ WID_DT_INVALID, ///< Used to initialize a variable.
};
#endif /* WIDGETS_DOCK_WIDGET_H */
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 54294796d..9c73d3fb3 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -83,9 +83,9 @@ static void DeleteDropDownList(DropDownList *list)
static const NWidgetPart _nested_dropdown_menu_widgets[] = {
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PANEL, COLOUR_END, DDM_ITEMS), SetMinimalSize(1, 1), SetScrollbar(DDM_SCROLL), EndContainer(),
- NWidget(NWID_SELECTION, INVALID_COLOUR, DDM_SHOW_SCROLL),
- NWidget(NWID_VSCROLLBAR, COLOUR_END, DDM_SCROLL),
+ NWidget(WWT_PANEL, COLOUR_END, WID_DM_ITEMS), SetMinimalSize(1, 1), SetScrollbar(WID_DM_SCROLL), EndContainer(),
+ NWidget(NWID_SELECTION, INVALID_COLOUR, WID_DM_SHOW_SCROLL),
+ NWidget(NWID_VSCROLLBAR, COLOUR_END, WID_DM_SCROLL),
EndContainer(),
EndContainer(),
};
@@ -130,17 +130,17 @@ struct DropdownWindow : Window {
this->CreateNestedTree(&_dropdown_desc);
- this->vscroll = this->GetScrollbar(DDM_SCROLL);
+ this->vscroll = this->GetScrollbar(WID_DM_SCROLL);
uint items_width = size.width - (scroll ? NWidgetScrollbar::GetVerticalDimension().width : 0);
- NWidgetCore *nwi = this->GetWidget<NWidgetCore>(DDM_ITEMS);
+ NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_DM_ITEMS);
nwi->SetMinimalSize(items_width, size.height + 4);
nwi->colour = wi_colour;
- nwi = this->GetWidget<NWidgetCore>(DDM_SCROLL);
+ nwi = this->GetWidget<NWidgetCore>(WID_DM_SCROLL);
nwi->colour = wi_colour;
- this->GetWidget<NWidgetStacked>(DDM_SHOW_SCROLL)->SetDisplayedPlane(scroll ? 0 : SZSP_NONE);
+ this->GetWidget<NWidgetStacked>(WID_DM_SHOW_SCROLL)->SetDisplayedPlane(scroll ? 0 : SZSP_NONE);
this->FinishInitNested(&_dropdown_desc, 0);
CLRBITS(this->flags, WF_WHITE_BORDER);
@@ -200,7 +200,7 @@ struct DropdownWindow : Window {
{
if (GetWidgetFromPos(this, _cursor.pos.x - this->left, _cursor.pos.y - this->top) < 0) return false;
- NWidgetBase *nwi = this->GetWidget<NWidgetBase>(DDM_ITEMS);
+ NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_DM_ITEMS);
int y = _cursor.pos.y - this->top - nwi->pos_y - 2;
int width = nwi->current_x - 4;
int pos = this->vscroll->GetPosition();
@@ -228,7 +228,7 @@ struct DropdownWindow : Window {
virtual void DrawWidget(const Rect &r, int widget) const
{
- if (widget != DDM_ITEMS) return;
+ if (widget != WID_DM_ITEMS) return;
TextColour colour = (TextColour)this->GetWidget<NWidgetCore>(widget)->colour;
@@ -257,7 +257,7 @@ struct DropdownWindow : Window {
virtual void OnClick(Point pt, int widget, int click_count)
{
- if (widget != DDM_ITEMS) return;
+ if (widget != WID_DM_ITEMS) return;
int item;
if (this->GetDropDownItem(item)) {
this->click_delay = 4;
diff --git a/src/widgets/dropdown_widget.h b/src/widgets/dropdown_widget.h
index 58ea586fe..9c5a64702 100644
--- a/src/widgets/dropdown_widget.h
+++ b/src/widgets/dropdown_widget.h
@@ -14,9 +14,9 @@
/** Widgets of the WC_DROPDOWN_MENU. */
enum DropdownMenuWidgets {
- DDM_ITEMS, ///< Panel showing the dropdown items.
- DDM_SHOW_SCROLL, ///< Hide scrollbar if too few items.
- DDM_SCROLL, ///< Scrollbar.
+ WID_DM_ITEMS, ///< Panel showing the dropdown items.
+ WID_DM_SHOW_SCROLL, ///< Hide scrollbar if too few items.
+ WID_DM_SCROLL, ///< Scrollbar.
};
#endif /* WIDGETS_DROPDOWN_WIDGET_H */
diff --git a/src/widgets/engine_widget.h b/src/widgets/engine_widget.h
index 32297b432..85b6060f4 100644
--- a/src/widgets/engine_widget.h
+++ b/src/widgets/engine_widget.h
@@ -14,9 +14,9 @@
/** Widgets of the WC_ENGINE_PREVIEW. */
enum EnginePreviewWidgets {
- EPW_QUESTION, ///< The container for the question
- EPW_NO, ///< No button
- EPW_YES, ///< Yes button
+ WID_EP_QUESTION, ///< The container for the question.
+ WID_EP_NO, ///< No button.
+ WID_EP_YES, ///< Yes button.
};
#endif /* WIDGETS_ENGINE_WIDGET_H */
diff --git a/src/widgets/error_widget.h b/src/widgets/error_widget.h
index 6a45aa75b..736f25437 100644
--- a/src/widgets/error_widget.h
+++ b/src/widgets/error_widget.h
@@ -14,9 +14,9 @@
/** Widgets of the WC_ERRMSG. */
enum ErrorMessageWidgets {
- EMW_CAPTION,
- EMW_FACE,
- EMW_MESSAGE,
+ WID_EM_CAPTION, ///< Caption of the window.
+ WID_EM_FACE, ///< Error title.
+ WID_EM_MESSAGE, ///< Error message.
};
#endif /* WIDGETS_ERROR_WIDGET_H */
diff --git a/src/widgets/fios_widget.h b/src/widgets/fios_widget.h
index 74012abff..f1f066eee 100644
--- a/src/widgets/fios_widget.h
+++ b/src/widgets/fios_widget.h
@@ -13,24 +13,24 @@
#define WIDGETS_FIOS_WIDGET_H
/** Widgets of the WC_SAVELOAD. */
-enum SaveLoadWindowWidgets {
- SLWW_WINDOWTITLE,
- SLWW_SORT_BYNAME,
- SLWW_SORT_BYDATE,
- SLWW_BACKGROUND,
- SLWW_FILE_BACKGROUND,
- SLWW_HOME_BUTTON,
- SLWW_DRIVES_DIRECTORIES_LIST,
- SLWW_SCROLLBAR,
- SLWW_CONTENT_DOWNLOAD, ///< only available for play scenario/heightmap (content download)
- SLWW_SAVE_OSK_TITLE, ///< only available for save operations
- SLWW_DELETE_SELECTION, ///< same in here
- SLWW_SAVE_GAME, ///< not to mention in here too
- SLWW_CONTENT_DOWNLOAD_SEL, ///< Selection 'stack' to 'hide' the content download
- SLWW_DETAILS, ///< Panel with game details
- SLWW_NEWGRF_INFO, ///< Button to open NewGgrf configuration
- SLWW_LOAD_BUTTON, ///< Button to load game/scenario
- SLWW_MISSING_NEWGRFS, ///< Button to find missing NewGRFs online
+enum SaveLoadWidgets {
+ WID_SL_CAPTION, ///< Caption of the window.
+ WID_SL_SORT_BYNAME, ///< Sort by name button.
+ WID_SL_SORT_BYDATE, ///< Sort by date button.
+ WID_SL_BACKGROUND, ///< Background of window.
+ WID_SL_FILE_BACKGROUND, ///< Background of file selection.
+ WID_SL_HOME_BUTTON, ///< Home button.
+ WID_SL_DRIVES_DIRECTORIES_LIST, ///< Drives list.
+ WID_SL_SCROLLBAR, ///< Scrollbar of the file list.
+ WID_SL_CONTENT_DOWNLOAD, ///< Content download button, only available for play scenario/heightmap.
+ WID_SL_SAVE_OSK_TITLE, ///< Title textbox, only available for save operations.
+ WID_SL_DELETE_SELECTION, ///< Delete button, only available for save operations.
+ WID_SL_SAVE_GAME, ///< Save button, only available for save operations.
+ WID_SL_CONTENT_DOWNLOAD_SEL, ///< Selection 'stack' to 'hide' the content download.
+ WID_SL_DETAILS, ///< Panel with game details.
+ WID_SL_NEWGRF_INFO, ///< Button to open NewGgrf configuration.
+ WID_SL_LOAD_BUTTON, ///< Button to load game/scenario.
+ WID_SL_MISSING_NEWGRFS, ///< Button to find missing NewGRFs online.
};
#endif /* WIDGETS_FIOS_WIDGET_H */
diff --git a/src/widgets/genworld_widget.h b/src/widgets/genworld_widget.h
index 7ff0c5423..d6ecf6218 100644
--- a/src/widgets/genworld_widget.h
+++ b/src/widgets/genworld_widget.h
@@ -12,82 +12,75 @@
#ifndef WIDGETS_GENWORLD_WIDGET_H
#define WIDGETS_GENWORLD_WIDGET_H
-/** Widgets of the WC_GENERATE_LANDSCAPE (WC_GENERATE_LANDSCAPE is also used in GenerateLandscapeWindowWidgets and CreateScenarioWindowWidgets). */
-enum GenenerateLandscapeWindowMode {
- GLWM_GENERATE, ///< Generate new game
- GLWM_HEIGHTMAP, ///< Load from heightmap
- GLWM_SCENARIO, ///< Generate flat land
+/** Widgets of the WC_GENERATE_LANDSCAPE (WC_GENERATE_LANDSCAPE is also used in CreateScenarioWidgets). */
+enum GenerateLandscapeWidgets {
+ WID_GL_TEMPERATE, ///< Button with icon "Temperate".
+ WID_GL_ARCTIC, ///< Button with icon "Arctic".
+ WID_GL_TROPICAL, ///< Button with icon "Tropical".
+ WID_GL_TOYLAND, ///< Button with icon "Toyland".
+
+ WID_GL_MAPSIZE_X_PULLDOWN, ///< Dropdown 'map X size'.
+ WID_GL_MAPSIZE_Y_PULLDOWN, ///< Dropdown 'map Y size'.
+
+ WID_GL_TOWN_PULLDOWN, ///< Dropdown 'No. of towns'.
+ WID_GL_INDUSTRY_PULLDOWN, ///< Dropdown 'No. of industries'.
+
+ WID_GL_RANDOM_EDITBOX, ///< 'Random seed' editbox.
+ WID_GL_RANDOM_BUTTON, ///< 'Randomise' button.
+
+ WID_GL_GENERATE_BUTTON, ///< 'Generate' button.
+
+ WID_GL_START_DATE_DOWN, ///< Decrease start year.
+ WID_GL_START_DATE_TEXT, ///< Start year.
+ WID_GL_START_DATE_UP, ///< Increase start year.
+
+ WID_GL_SNOW_LEVEL_DOWN, ///< Decrease snow level.
+ WID_GL_SNOW_LEVEL_TEXT, ///< Snow level.
+ WID_GL_SNOW_LEVEL_UP, ///< Increase snow level.
+
+ WID_GL_TREE_PULLDOWN, ///< Dropdown 'Tree algorithm'.
+ WID_GL_LANDSCAPE_PULLDOWN, ///< Dropdown 'Land generator'.
+
+ WID_GL_HEIGHTMAP_NAME_TEXT, ///< Heightmap name.
+ WID_GL_HEIGHTMAP_SIZE_TEXT, ///< Size of heightmap.
+ WID_GL_HEIGHTMAP_ROTATION_PULLDOWN, ///< Dropdown 'Heightmap rotation'.
+
+ WID_GL_TERRAIN_PULLDOWN, ///< Dropdown 'Terrain type'.
+ WID_GL_WATER_PULLDOWN, ///< Dropdown 'Sea level'.
+ WID_GL_RIVER_PULLDOWN, ///< Dropdown 'Rivers'.
+ WID_GL_SMOOTHNESS_PULLDOWN, ///< Dropdown 'Smoothness'.
+ WID_GL_VARIETY_PULLDOWN, ///< Dropdown 'Variety distribution'.
+
+ WID_GL_BORDERS_RANDOM, ///< 'Random'/'Manual' borders.
+ WID_GL_WATER_NW, ///< NW 'Water'/'Freeform'.
+ WID_GL_WATER_NE, ///< NE 'Water'/'Freeform'.
+ WID_GL_WATER_SE, ///< SE 'Water'/'Freeform'.
+ WID_GL_WATER_SW, ///< SW 'Water'/'Freeform'.
};
-/** Widgets of the WC_GENERATE_LANDSCAPE (WC_GENERATE_LANDSCAPE is also used in GenenerateLandscapeWindowMode and CreateScenarioWindowWidgets). */
-enum GenerateLandscapeWindowWidgets {
- GLAND_TEMPERATE, ///< Button with icon "Temperate"
- GLAND_ARCTIC, ///< Button with icon "Arctic"
- GLAND_TROPICAL, ///< Button with icon "Tropical"
- GLAND_TOYLAND, ///< Button with icon "Toyland"
-
- GLAND_MAPSIZE_X_PULLDOWN, ///< Dropdown 'map X size'
- GLAND_MAPSIZE_Y_PULLDOWN, ///< Dropdown 'map Y size'
-
- GLAND_TOWN_PULLDOWN, ///< Dropdown 'No. of towns'
- GLAND_INDUSTRY_PULLDOWN, ///< Dropdown 'No. of industries'
-
- GLAND_RANDOM_EDITBOX, ///< 'Random seed' editbox
- GLAND_RANDOM_BUTTON, ///< 'Randomise' button
-
- GLAND_GENERATE_BUTTON, ///< 'Generate' button
-
- GLAND_START_DATE_DOWN, ///< Decrease start year
- GLAND_START_DATE_TEXT, ///< Start year
- GLAND_START_DATE_UP, ///< Increase start year
-
- GLAND_SNOW_LEVEL_DOWN, ///< Decrease snow level
- GLAND_SNOW_LEVEL_TEXT, ///< Snow level
- GLAND_SNOW_LEVEL_UP, ///< Increase snow level
-
- GLAND_TREE_PULLDOWN, ///< Dropdown 'Tree algorithm'
- GLAND_LANDSCAPE_PULLDOWN, ///< Dropdown 'Land generator'
-
- GLAND_HEIGHTMAP_NAME_TEXT, ///< Heightmap name
- GLAND_HEIGHTMAP_SIZE_TEXT, ///< Size of heightmap
- GLAND_HEIGHTMAP_ROTATION_PULLDOWN, ///< Dropdown 'Heightmap rotation'
-
- GLAND_TERRAIN_PULLDOWN, ///< Dropdown 'Terrain type'
- GLAND_WATER_PULLDOWN, ///< Dropdown 'Sea level'
- GLAND_RIVER_PULLDOWN, ///< Dropdown 'Rivers'
- GLAND_SMOOTHNESS_PULLDOWN, ///< Dropdown 'Smoothness'
- GLAND_VARIETY_PULLDOWN, ///< Dropdown 'Variety distribution'
-
- GLAND_BORDERS_RANDOM, ///< 'Random'/'Manual' borders
- GLAND_WATER_NW, ///< NW 'Water'/'Freeform'
- GLAND_WATER_NE, ///< NE 'Water'/'Freeform'
- GLAND_WATER_SE, ///< SE 'Water'/'Freeform'
- GLAND_WATER_SW, ///< SW 'Water'/'Freeform'
-};
-
-/** Widgets of the WC_GENERATE_LANDSCAPE (WC_GENERATE_LANDSCAPE is also used in GenerateLandscapeWindowWidgets and GenenerateLandscapeWindowMode). */
-enum CreateScenarioWindowWidgets {
- CSCEN_TEMPERATE, ///< Select temperate landscape style.
- CSCEN_ARCTIC, ///< Select arctic landscape style.
- CSCEN_TROPICAL, ///< Select tropical landscape style.
- CSCEN_TOYLAND, ///< Select toy-land landscape style.
- CSCEN_EMPTY_WORLD, ///< Generate an empty flat world.
- CSCEN_RANDOM_WORLD, ///< Generate random land button
- CSCEN_MAPSIZE_X_PULLDOWN, ///< Pull-down arrow for x map size.
- CSCEN_MAPSIZE_Y_PULLDOWN, ///< Pull-down arrow for y map size.
- CSCEN_START_DATE_DOWN, ///< Decrease start year (start earlier).
- CSCEN_START_DATE_TEXT, ///< Clickable start date value.
- CSCEN_START_DATE_UP, ///< Increase start year (start later).
- CSCEN_FLAT_LAND_HEIGHT_DOWN, ///< Decrease flat land height.
- CSCEN_FLAT_LAND_HEIGHT_TEXT, ///< Clickable flat land height value.
- CSCEN_FLAT_LAND_HEIGHT_UP ///< Increase flat land height.
+/** Widgets of the WC_GENERATE_LANDSCAPE (WC_GENERATE_LANDSCAPE is also used in GenerateLandscapeWidgets). */
+enum CreateScenarioWidgets {
+ WID_CS_TEMPERATE, ///< Select temperate landscape style.
+ WID_CS_ARCTIC, ///< Select arctic landscape style.
+ WID_CS_TROPICAL, ///< Select tropical landscape style.
+ WID_CS_TOYLAND, ///< Select toy-land landscape style.
+ WID_CS_EMPTY_WORLD, ///< Generate an empty flat world.
+ WID_CS_RANDOM_WORLD, ///< Generate random land button
+ WID_CS_MAPSIZE_X_PULLDOWN, ///< Pull-down arrow for x map size.
+ WID_CS_MAPSIZE_Y_PULLDOWN, ///< Pull-down arrow for y map size.
+ WID_CS_START_DATE_DOWN, ///< Decrease start year (start earlier).
+ WID_CS_START_DATE_TEXT, ///< Clickable start date value.
+ WID_CS_START_DATE_UP, ///< Increase start year (start later).
+ WID_CS_FLAT_LAND_HEIGHT_DOWN, ///< Decrease flat land height.
+ WID_CS_FLAT_LAND_HEIGHT_TEXT, ///< Clickable flat land height value.
+ WID_CS_FLAT_LAND_HEIGHT_UP ///< Increase flat land height.
};
-/** Widgets of the WC_MODAL_PROGRESS (WC_MODAL_PROGRESS is also used in ScanProgressWindowWidgets). */
-enum GenerationProgressWindowWidgets {
- GPWW_PROGRESS_BAR,
- GPWW_PROGRESS_TEXT,
- GPWW_ABORT,
+/** Widgets of the WC_MODAL_PROGRESS (WC_MODAL_PROGRESS is also used in ScanProgressWidgets). */
+enum GenerationProgressWidgets {
+ WID_GP_PROGRESS_BAR, ///< Progress bar.
+ WID_GP_PROGRESS_TEXT, ///< Text with the progress bar.
+ WID_GP_ABORT, ///< Abort button.
};
#endif /* WIDGETS_GENWORLD_WIDGET_H */
diff --git a/src/widgets/graph_widget.h b/src/widgets/graph_widget.h
index 66c637086..95a67446f 100644
--- a/src/widgets/graph_widget.h
+++ b/src/widgets/graph_widget.h
@@ -15,54 +15,54 @@
#include "../economy_type.h"
/** Widgets of the WC_GRAPH_LEGEND. */
-enum GraphLegendWidgetNumbers {
- GLW_BACKGROUND,
+enum GraphLegendWidgets {
+ WID_GL_BACKGROUND,
- GLW_FIRST_COMPANY,
- GLW_LAST_COMPANY = GLW_FIRST_COMPANY + MAX_COMPANIES - 1,
+ WID_GL_FIRST_COMPANY,
+ WID_GL_LAST_COMPANY = WID_GL_FIRST_COMPANY + MAX_COMPANIES - 1,
};
/** Widgets of the WC_OPERATING_PROFIT / WC_DELIVERED_CARGO / WC_COMPANY_VALUE / WC_INCOME_GRAPH. */
enum CompanyValueWidgets {
- BGW_KEY_BUTTON,
- BGW_BACKGROUND,
- BGW_GRAPH,
- BGW_RESIZE,
+ WID_CV_KEY_BUTTON, ///< Key button.
+ WID_CV_BACKGROUND, ///< Background of the window.
+ WID_CV_GRAPH, ///< Graph itself.
+ WID_CV_RESIZE, ///< Resize button.
};
/** Widget of the WC_PERFORMANCE_HISTORY. */
enum PerformanceHistoryGraphWidgets {
- PHW_KEY,
- PHW_DETAILED_PERFORMANCE,
- PHW_BACKGROUND,
- PHW_GRAPH,
- PHW_RESIZE,
+ WID_PHG_KEY, ///< Key button.
+ WID_PHG_DETAILED_PERFORMANCE, ///< Detailed performance.
+ WID_PHG_BACKGROUND, ///< Background of the window.
+ WID_PHG_GRAPH, ///< Graph itself.
+ WID_PHG_RESIZE, ///< Resize button.
};
/** Widget of the WC_PAYMENT_RATES. */
enum CargoPaymentRatesWidgets {
- CPW_BACKGROUND,
- CPW_HEADER,
- CPW_GRAPH,
- CPW_RESIZE,
- CPW_FOOTER,
- CPW_ENABLE_CARGOES,
- CPW_DISABLE_CARGOES,
- CPW_CARGO_FIRST,
+ WID_CPR_BACKGROUND, ///< Background of the window.
+ WID_CPR_HEADER, ///< Header.
+ WID_CPR_GRAPH, ///< Graph itself.
+ WID_CPR_RESIZE, ///< Resize button.
+ WID_CPR_FOOTER, ///< Footer.
+ WID_CPR_ENABLE_CARGOES, ///< Enable cargoes button.
+ WID_CPR_DISABLE_CARGOES, ///< Disable cargoes button.
+ WID_CPR_CARGO_FIRST, ///< First cargo in the list.
};
/** Widget of the WC_COMPANY_LEAGUE. */
enum CompanyLeagueWidgets {
- CLW_BACKGROUND,
+ WID_CL_BACKGROUND, ///< Background of the window.
};
/** Widget of the WC_PERFORMANCE_DETAIL. */
enum PerformanceRatingDetailsWidgets {
- PRW_SCORE_FIRST,
- PRW_SCORE_LAST = PRW_SCORE_FIRST + (SCORE_END - SCORE_BEGIN) - 1,
+ WID_PRD_SCORE_FIRST, ///< First entry in the score list.
+ WID_PRD_SCORE_LAST = WID_PRD_SCORE_FIRST + (SCORE_END - SCORE_BEGIN) - 1, ///< Last entry in the score list.
- PRW_COMPANY_FIRST,
- PRW_COMPANY_LAST = PRW_COMPANY_FIRST + MAX_COMPANIES - 1,
+ WID_PRD_COMPANY_FIRST, ///< First company.
+ WID_PRD_COMPANY_LAST = WID_PRD_COMPANY_FIRST + MAX_COMPANIES - 1, ///< Last company.
};
#endif /* WIDGETS_GRAPH_WIDGET_H */