Mercurial > hg > openttd
annotate src/station_gui.h @ 8338:133b06cabee8 draft
(svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Thu, 17 Jan 2008 18:49:39 +0000 |
parents | ab53b3bf7100 |
children | 370ea805f591 |
rev | line source |
---|---|
8016
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
1 /* $Id$ */ |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
2 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
3 /** @file station_gui.h Contains enums and function declarations connected with stations GUI */ |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
4 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
5 #ifndef STATION_GUI_H |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
6 #define STATION_GUI_H |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
7 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
8 /** Enum for PlayerStations, referring to _player_stations_widgets */ |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
9 enum StationListWidgets { |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
10 SLW_CLOSEBOX = 0, ///< Close 'X' button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
11 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
12 SLW_LIST = 3, ///< The main panel, list of stations |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
13 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
14 SLW_TRAIN = 6, ///< 'TRAIN' button - list only facilities where is a railroad station |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
15 SLW_TRUCK, |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
16 SLW_BUS, |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
17 SLW_AIRPLANE, |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
18 SLW_SHIP, |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
19 SLW_FACILALL, ///< 'ALL' button - list all facilities |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
20 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
21 SLW_PAN_BETWEEN = 12, ///< Small panel between list of types of ficilities and list of cargo types |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
22 SLW_NOCARGOWAITING = 13, ///< 'NO' button - list stations where no cargo is waiting |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
23 SLW_CARGOALL = 14, ///< 'ALL' button - list all stations |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
24 SLW_PAN_RIGHT = 15, ///< Panel right of list of cargo types |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
25 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
26 SLW_SORTBY = 16, ///< 'Sort by' button - reverse sort direction |
8338
133b06cabee8
(svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
peter1138 <peter1138@openttd.org>
parents:
8268
diff
changeset
|
27 SLW_SORTDROPBTN = 17, ///< Dropdown button |
133b06cabee8
(svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
peter1138 <peter1138@openttd.org>
parents:
8268
diff
changeset
|
28 SLW_PAN_SORT_RIGHT = 18, ///< Panel right of sorting options |
8016
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
29 |
8338
133b06cabee8
(svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
peter1138 <peter1138@openttd.org>
parents:
8268
diff
changeset
|
30 SLW_CARGOSTART = 19, ///< Widget numbers used for list of cargo types (not present in _player_stations_widgets) |
8016
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
31 }; |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
32 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
33 /** Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets */ |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
34 enum StationViewWidgets { |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
35 SVW_CLOSEBOX = 0, ///< Close 'X' button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
36 SVW_CAPTION = 1, ///< Caption of the window |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
37 SVW_WAITING = 3, ///< List of waiting cargo |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
38 SVW_ACCEPTLIST = 5, ///< List of accepted cargos |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
39 SVW_RATINGLIST = 6, ///< Ratings of cargos |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
40 SVW_LOCATION = 7, ///< 'Location' button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
41 SVW_RATINGS = 8, ///< 'Ratings' button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
42 SVW_ACCEPTS = 8, ///< 'Accepts' button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
43 SVW_RENAME = 9, ///< 'Rename' button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
44 SVW_TRAINS = 10, ///< List of scheduled trains button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
45 SVW_ROADVEHS, ///< List of scheduled road vehs button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
46 SVW_PLANES, ///< List of scheduled planes button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
47 SVW_SHIPS, ///< List of scheduled ships button |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
48 }; |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
49 |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
50 /* sorter stuff */ |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
51 void RebuildStationLists(); |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
52 void ResortStationLists(); |
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
53 |
8107
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
54 enum StationCoverageType { |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
55 SCT_PASSENGERS_ONLY, |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
56 SCT_NON_PASSENGERS_ONLY, |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
57 SCT_ALL |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
58 }; |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
59 |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
60 void DrawStationCoverageAreaText(int sx, int sy, StationCoverageType sct, int rad); |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
61 void CheckRedrawStationCoverage(const Window *w); |
f65cf2bc3255
(svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium <rubidium@openttd.org>
parents:
8016
diff
changeset
|
62 |
8268
ab53b3bf7100
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium <rubidium@openttd.org>
parents:
8107
diff
changeset
|
63 extern bool _station_show_coverage; |
ab53b3bf7100
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium <rubidium@openttd.org>
parents:
8107
diff
changeset
|
64 |
8016
f60addd19e1a
(svn r11576) -Codechange: enumerize and comment station GUI
smatz <smatz@openttd.org>
parents:
diff
changeset
|
65 #endif /* STATION_GUI_H */ |