summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-16 18:14:11 +0000
committertruebrain <truebrain@openttd.org>2011-12-16 18:14:11 +0000
commit9266bde593b359d1dd999a3c84f48f3b6981c983 (patch)
tree2251e6dad3759b1f24d21a44c1bea77265c019ed /src/widgets
parent985d178c37fd11afd2cdc4f44ad98a13c70727fe (diff)
downloadopenttd-9266bde593b359d1dd999a3c84f48f3b6981c983.tar.xz
(svn r23546) -Codechange: document and rename widgets to be consistent and understandable
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/smallmap_widget.h40
-rw-r--r--src/widgets/station_widget.h58
2 files changed, 48 insertions, 50 deletions
diff --git a/src/widgets/smallmap_widget.h b/src/widgets/smallmap_widget.h
index c23163ba3..00ae1faed 100644
--- a/src/widgets/smallmap_widget.h
+++ b/src/widgets/smallmap_widget.h
@@ -13,25 +13,25 @@
#define WIDGETS_SMALLMAP_WIDGET_H
/** Widgets of the WC_SMALLMAP. */
-enum SmallMapWindowWidgets {
- SM_WIDGET_CAPTION, ///< Caption widget.
- SM_WIDGET_MAP_BORDER, ///< Border around the smallmap.
- SM_WIDGET_MAP, ///< Panel containing the smallmap.
- SM_WIDGET_LEGEND, ///< Bottom panel to display smallmap legends.
- SM_WIDGET_ZOOM_IN, ///< Button to zoom in one step.
- SM_WIDGET_ZOOM_OUT, ///< Button to zoom out one step.
- SM_WIDGET_CONTOUR, ///< Button to select the contour view (height map).
- SM_WIDGET_VEHICLES, ///< Button to select the vehicles view.
- SM_WIDGET_INDUSTRIES, ///< Button to select the industries view.
- SM_WIDGET_ROUTES, ///< Button to select the routes view.
- SM_WIDGET_VEGETATION, ///< Button to select the vegetation view.
- SM_WIDGET_OWNERS, ///< Button to select the owners view.
- SM_WIDGET_CENTERMAP, ///< Button to move smallmap center to main window center.
- SM_WIDGET_TOGGLETOWNNAME, ///< Toggle button to display town names.
- SM_WIDGET_SELECT_BUTTONS, ///< Selection widget for the buttons present in some smallmap modes.
- SM_WIDGET_ENABLE_ALL, ///< Button to enable display of all legend entries.
- SM_WIDGET_DISABLE_ALL, ///< Button to disable display of all legend entries.
- SM_WIDGET_SHOW_HEIGHT, ///< Show heightmap toggle button.
+enum SmallMapWidgets {
+ WID_SM_CAPTION, ///< Caption of the window.
+ WID_SM_MAP_BORDER, ///< Border around the smallmap.
+ WID_SM_MAP, ///< Panel containing the smallmap.
+ WID_SM_LEGEND, ///< Bottom panel to display smallmap legends.
+ WID_SM_ZOOM_IN, ///< Button to zoom in one step.
+ WID_SM_ZOOM_OUT, ///< Button to zoom out one step.
+ WID_SM_CONTOUR, ///< Button to select the contour view (height map).
+ WID_SM_VEHICLES, ///< Button to select the vehicles view.
+ WID_SM_INDUSTRIES, ///< Button to select the industries view.
+ WID_SM_ROUTES, ///< Button to select the routes view.
+ WID_SM_VEGETATION, ///< Button to select the vegetation view.
+ WID_SM_OWNERS, ///< Button to select the owners view.
+ WID_SM_CENTERMAP, ///< Button to move smallmap center to main window center.
+ WID_SM_TOGGLETOWNNAME, ///< Toggle button to display town names.
+ WID_SM_SELECT_BUTTONS, ///< Selection widget for the buttons present in some smallmap modes.
+ WID_SM_ENABLE_ALL, ///< Button to enable display of all legend entries.
+ WID_SM_DISABLE_ALL, ///< Button to disable display of all legend entries.
+ WID_SM_SHOW_HEIGHT, ///< Show heightmap toggle button.
};
-#endif /* WIDGETS_SMALLPAM_WIDGET_H */
+#endif /* WIDGETS_SMALLMAP_WIDGET_H */
diff --git a/src/widgets/station_widget.h b/src/widgets/station_widget.h
index 67a60f54d..612eef777 100644
--- a/src/widgets/station_widget.h
+++ b/src/widgets/station_widget.h
@@ -14,49 +14,47 @@
/** Widgets of the WC_STATION_VIEW. */
enum StationViewWidgets {
- SVW_CAPTION = 0, ///< Caption of the window
- SVW_WAITING = 1, ///< List of waiting cargo
- SVW_SCROLLBAR = 2, ///< Scrollbar
- SVW_ACCEPTLIST = 3, ///< List of accepted cargoes
- SVW_RATINGLIST = 3, ///< Ratings of cargoes
- SVW_LOCATION = 4, ///< 'Location' button
- SVW_RATINGS = 5, ///< 'Ratings' button
- SVW_ACCEPTS = 5, ///< 'Accepts' button
- SVW_RENAME = 6, ///< 'Rename' button
- SVW_TRAINS = 7, ///< List of scheduled trains button
- SVW_ROADVEHS, ///< List of scheduled road vehs button
- SVW_SHIPS, ///< List of scheduled ships button
- SVW_PLANES, ///< List of scheduled planes button
+ WID_SV_CAPTION, ///< Caption of the window.
+ WID_SV_WAITING, ///< List of waiting cargo.
+ WID_SV_SCROLLBAR, ///< Scrollbar.
+ WID_SV_ACCEPT_RATING_LIST, ///< List of accepted cargoes / rating of cargoes.
+ WID_SV_LOCATION, ///< 'Location' button.
+ WID_SV_ACCEPTS_RATINGS, ///< 'Accepts' / 'Ratings' button.
+ WID_SV_RENAME, ///< 'Rename' button.
+ WID_SV_TRAINS, ///< List of scheduled trains button.
+ WID_SV_ROADVEHS, ///< List of scheduled road vehs button.
+ WID_SV_SHIPS, ///< List of scheduled ships button.
+ WID_SV_PLANES, ///< List of scheduled planes button.
};
/** Widgets of the WC_STATION_LIST. */
enum StationListWidgets {
- SLW_CAPTION, ///< Window caption
- SLW_LIST, ///< The main panel, list of stations
- SLW_SCROLLBAR, ///< Scrollbar next to the main panel
+ WID_SL_CAPTION, ///< Caption of the window.
+ WID_SL_LIST, ///< The main panel, list of stations.
+ WID_SL_SCROLLBAR, ///< Scrollbar next to the main panel.
/* Vehicletypes need to be in order of StationFacility due to bit magic */
- SLW_TRAIN, ///< 'TRAIN' button - list only facilities where is a railroad station
- SLW_TRUCK, ///< 'TRUCK' button - list only facilities where is a truck stop
- SLW_BUS, ///< 'BUS' button - list only facilities where is a bus stop
- SLW_AIRPLANE, ///< 'AIRPLANE' button - list only facilities where is an airport
- SLW_SHIP, ///< 'SHIP' button - list only facilities where is a dock
- SLW_FACILALL, ///< 'ALL' button - list all facilities
+ WID_SL_TRAIN, ///< 'TRAIN' button - list only facilities where is a railroad station.
+ WID_SL_TRUCK, ///< 'TRUCK' button - list only facilities where is a truck stop.
+ WID_SL_BUS, ///< 'BUS' button - list only facilities where is a bus stop.
+ WID_SL_AIRPLANE, ///< 'AIRPLANE' button - list only facilities where is an airport.
+ WID_SL_SHIP, ///< 'SHIP' button - list only facilities where is a dock.
+ WID_SL_FACILALL, ///< 'ALL' button - list all facilities.
- SLW_NOCARGOWAITING, ///< 'NO' button - list stations where no cargo is waiting
- SLW_CARGOALL, ///< 'ALL' button - list all stations
+ WID_SL_NOCARGOWAITING, ///< 'NO' button - list stations where no cargo is waiting.
+ WID_SL_CARGOALL, ///< 'ALL' button - list all stations.
- SLW_SORTBY, ///< 'Sort by' button - reverse sort direction
- SLW_SORTDROPBTN, ///< Dropdown button
+ WID_SL_SORTBY, ///< 'Sort by' button - reverse sort direction.
+ WID_SL_SORTDROPBTN, ///< Dropdown button.
- SLW_CARGOSTART, ///< Widget numbers used for list of cargo types (not present in _company_stations_widgets)
+ WID_SL_CARGOSTART, ///< Widget numbers used for list of cargo types (not present in _company_stations_widgets).
};
/** Widgets of the WC_SELECT_STATION. */
enum JoinStationWidgets {
- JSW_WIDGET_CAPTION,
- JSW_PANEL,
- JSW_SCROLLBAR,
+ WID_JS_CAPTION, // Caption of the window.
+ WID_JS_PANEL, // Main panel.
+ WID_JS_SCROLLBAR, // Scrollbar of the panel.
};
#endif /* WIDGETS_STATION_WIDGET_H */