OpenTTD

window_type.h
Go to the documentation of this file.
1 /* $Id: window_type.h 27286 2015-05-16 12:08:06Z alberth $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef WINDOW_TYPE_H
13 #define WINDOW_TYPE_H
14
16 enum WindowNumberEnum {
17 WN_GAME_OPTIONS_AI = 0,
18 WN_GAME_OPTIONS_ABOUT,
19 WN_GAME_OPTIONS_NEWGRF_STATE,
20 WN_GAME_OPTIONS_GAME_OPTIONS,
21 WN_GAME_OPTIONS_GAME_SETTINGS,
22
23 WN_QUERY_STRING = 0,
24 WN_QUERY_STRING_SIGN,
25
26 WN_CONFIRM_POPUP_QUERY = 0,
27 WN_CONFIRM_POPUP_QUERY_BOOTSTRAP,
28
29 WN_NETWORK_WINDOW_GAME = 0,
30 WN_NETWORK_WINDOW_LOBBY,
31 WN_NETWORK_WINDOW_CONTENT_LIST,
32 WN_NETWORK_WINDOW_START,
33
34 WN_NETWORK_STATUS_WINDOW_JOIN = 0,
35 WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD,
36 };
37
39 enum WindowClass {
40 WC_NONE,
41
46 WC_MAIN_WINDOW = WC_NONE,
47
53 WC_MAIN_TOOLBAR,
54
59 WC_STATUS_BAR,
60
68 WC_BUILD_TOOLBAR,
69
75 WC_SCEN_BUILD_TOOLBAR,
76
81 WC_BUILD_TREES,
82
87 WC_TRANSPARENCY_TOOLBAR,
88
93 WC_BUILD_SIGNAL,
94
99 WC_SMALLMAP,
100
105 WC_ERRMSG,
106
111 WC_TOOLTIPS,
112
118 WC_QUERY_STRING,
119
125 WC_CONFIRM_POPUP_QUERY,
126
132 WC_GOAL_QUESTION,
133
134
139 WC_SAVELOAD,
140
145 WC_LAND_INFO,
146
151 WC_DROPDOWN_MENU,
152
157 WC_OSK,
158
163 WC_SET_DATE,
164
165
170 WC_AI_SETTINGS,
171
176 WC_GRF_PARAMETERS,
177
182 WC_TEXTFILE,
183
184
189 WC_TOWN_AUTHORITY,
190
195 WC_VEHICLE_DETAILS,
196
201 WC_VEHICLE_REFIT,
202
207 WC_VEHICLE_ORDERS,
208
213 WC_REPLACE_VEHICLE,
214
219 WC_VEHICLE_TIMETABLE,
220
225 WC_COMPANY_COLOUR,
226
231 WC_COMPANY_MANAGER_FACE,
232
237 WC_SELECT_STATION,
238
243 WC_NEWS_WINDOW,
244
249 WC_TOWN_DIRECTORY,
250
255 WC_SUBSIDIES_LIST,
256
261 WC_INDUSTRY_DIRECTORY,
262
267 WC_MESSAGE_HISTORY,
268
273 WC_SIGN_LIST,
274
279 WC_AI_LIST,
280
285 WC_GOALS_LIST,
286
291 WC_STORY_BOOK,
292
297 WC_STATION_LIST,
298
303 WC_TRAINS_LIST,
304
309 WC_ROADVEH_LIST,
310
315 WC_SHIPS_LIST,
316
321 WC_AIRCRAFT_LIST,
322
323
328 WC_TOWN_VIEW,
329
334 WC_VEHICLE_VIEW,
335
340 WC_STATION_VIEW,
341
346 WC_VEHICLE_DEPOT,
347
352 WC_WAYPOINT_VIEW,
353
358 WC_INDUSTRY_VIEW,
359
364 WC_COMPANY,
365
366
371 WC_BUILD_OBJECT,
372
378 WC_BUILD_VEHICLE,
379
384 WC_BUILD_BRIDGE,
385
392 WC_BUILD_STATION,
393
398 WC_BUS_STATION,
399
404 WC_TRUCK_STATION,
405
412 WC_BUILD_DEPOT,
413
418 WC_BUILD_WAYPOINT,
419
424 WC_FOUND_TOWN,
425
430 WC_BUILD_INDUSTRY,
431
432
437 WC_SELECT_GAME,
438
444 WC_SCEN_LAND_GEN,
445
451 WC_GENERATE_LANDSCAPE,
452
458 WC_MODAL_PROGRESS,
459
460
468 WC_NETWORK_WINDOW,
469
474 WC_CLIENT_LIST,
475
480 WC_CLIENT_LIST_POPUP,
481
487 WC_NETWORK_STATUS_WINDOW,
488
493 WC_SEND_NETWORK_MSG,
494
499 WC_COMPANY_PASSWORD_WINDOW,
500
501
506 WC_INDUSTRY_CARGOES,
507
512 WC_GRAPH_LEGEND,
513
518 WC_FINANCES,
519
524 WC_INCOME_GRAPH,
525
530 WC_OPERATING_PROFIT,
531
536 WC_DELIVERED_CARGO,
537
542 WC_PERFORMANCE_HISTORY,
543
548 WC_COMPANY_VALUE,
549
554 WC_COMPANY_LEAGUE,
555
560 WC_PAYMENT_RATES,
561
566 WC_PERFORMANCE_DETAIL,
567
572 WC_COMPANY_INFRASTRUCTURE,
573
574
579 WC_BUY_COMPANY,
580
585 WC_ENGINE_PREVIEW,
586
587
592 WC_MUSIC_WINDOW,
593
598 WC_MUSIC_TRACK_SELECTION,
599
608 WC_GAME_OPTIONS,
609
614 WC_CUSTOM_CURRENCY,
615
620 WC_CHEATS,
621
626 WC_EXTRA_VIEW_PORT,
627
628
633 WC_CONSOLE,
634
639 WC_BOOTSTRAP,
640
645 WC_HIGHSCORE,
646
651 WC_ENDSCREEN,
652
653
658 WC_AI_DEBUG,
659
664 WC_NEWGRF_INSPECT,
665
670 WC_SPRITE_ALIGNER,
671
676 WC_LINKGRAPH_LEGEND,
677
682 WC_SAVE_PRESET,
683
684 WC_INVALID = 0xFFFF,
685 };
686
688 enum GameOptionsInvalidationData {
689 GOID_DEFAULT = 0,
690 GOID_NEWGRF_RESCANNED,
691 GOID_NEWGRF_LIST_EDITED,
692 GOID_NEWGRF_PRESET_LOADED,
693 };
694
695 struct Window;
696
698 typedef int32 WindowNumber;
699
701 enum EventState {
702 ES_HANDLED,
703 ES_NOT_HANDLED,
704 };
705
706 #endif /* WINDOW_TYPE_H */
EventState
EventState
State of handling an event.
Definition: window_type.h:701
WC_GENERATE_LANDSCAPE
Generate landscape (newgame); Window numbers:
Definition: window_type.h:451
WN_NETWORK_WINDOW_GAME
Network game window.
Definition: window_type.h:29
WN_QUERY_STRING_SIGN
Query string for signs.
Definition: window_type.h:24
WC_SELECT_STATION
Select station (when joining stations); Window numbers:
Definition: window_type.h:237
WC_MUSIC_WINDOW
Music window; Window numbers:
Definition: window_type.h:592
WC_CLIENT_LIST
Client list; Window numbers:
Definition: window_type.h:474
WC_SAVELOAD
Saveload window; Window numbers:
Definition: window_type.h:139
GOID_NEWGRF_RESCANNED
NewGRFs were just rescanned.
Definition: window_type.h:690
WC_BOOTSTRAP
Bootstrap; Window numbers:
Definition: window_type.h:639
WC_SCEN_LAND_GEN
Landscape generation (in Scenario Editor); Window numbers:
Definition: window_type.h:444
WC_SCEN_BUILD_TOOLBAR
Scenario build toolbar; Window numbers:
Definition: window_type.h:75
WC_MODAL_PROGRESS
Progress report of landscape generation; Window numbers:
Definition: window_type.h:458
WC_TEXTFILE
textfile; Window numbers:
Definition: window_type.h:182
WC_GOAL_QUESTION
Popup with a set of buttons, designed to ask the user a question from a GameScript.
Definition: window_type.h:132
ES_NOT_HANDLED
The passed event is not handled.
Definition: window_type.h:703
WC_VEHICLE_DEPOT
Depot view; Window numbers:
Definition: window_type.h:346
WC_REPLACE_VEHICLE
Replace vehicle window; Window numbers:
Definition: window_type.h:213
WC_CLIENT_LIST_POPUP
Popup for the client list; Window numbers:
Definition: window_type.h:480
WC_MUSIC_TRACK_SELECTION
Music track selection; Window numbers:
Definition: window_type.h:598
WC_SIGN_LIST
Sign list; Window numbers:
Definition: window_type.h:273
WC_GOALS_LIST
Goals list; Window numbers:
Definition: window_type.h:285
WC_BUY_COMPANY
Buyout company (merger); Window numbers:
Definition: window_type.h:579
WC_BUILD_VEHICLE
Build vehicle; Window numbers:
Definition: window_type.h:378
WC_BUILD_DEPOT
Build depot; Window numbers:
Definition: window_type.h:412
WC_PAYMENT_RATES
Payment rates graph; Window numbers:
Definition: window_type.h:560
WC_COMPANY_VALUE
Company value graph; Window numbers:
Definition: window_type.h:548
WindowClass
WindowClass
Window classes.
Definition: window_type.h:39
WC_INVALID
Invalid window.
Definition: window_type.h:684
WC_AI_DEBUG
AI debug window; Window numbers:
Definition: window_type.h:658
WC_TOWN_DIRECTORY
Town directory; Window numbers:
Definition: window_type.h:249
WN_GAME_OPTIONS_AI
AI settings.
Definition: window_type.h:17
WC_INDUSTRY_DIRECTORY
Industry directory; Window numbers:
Definition: window_type.h:261
GOID_NEWGRF_PRESET_LOADED
A NewGRF preset was picked.
Definition: window_type.h:692
WN_NETWORK_WINDOW_LOBBY
Network lobby window.
Definition: window_type.h:30
WC_CONSOLE
Console; Window numbers:
Definition: window_type.h:633
WC_SPRITE_ALIGNER
Sprite aligner (debug); Window numbers:
Definition: window_type.h:670
Window
Data structure for an opened window.
Definition: window_gui.h:271
WC_INCOME_GRAPH
Income graph; Window numbers:
Definition: window_type.h:524
WC_MAIN_WINDOW
Main window; Window numbers:
Definition: window_type.h:46
WC_VEHICLE_ORDERS
Vehicle orders; Window numbers:
Definition: window_type.h:207
WC_WAYPOINT_VIEW
Waypoint view; Window numbers:
Definition: window_type.h:352
WC_ENGINE_PREVIEW
Engine preview window; Window numbers:
Definition: window_type.h:585
WC_TRANSPARENCY_TOOLBAR
Transparency toolbar; Window numbers:
Definition: window_type.h:87
WindowNumberEnum
WindowNumberEnum
Window numbers.
Definition: window_type.h:16
WC_ERRMSG
Error message; Window numbers:
Definition: window_type.h:105
WC_SEND_NETWORK_MSG
Chatbox; Window numbers:
Definition: window_type.h:493
WC_TOOLTIPS
Tooltip window; Window numbers:
Definition: window_type.h:111
WC_NEWGRF_INSPECT
NewGRF inspect (debug); Window numbers:
Definition: window_type.h:664
WC_SMALLMAP
Small map; Window numbers:
Definition: window_type.h:99
WC_OSK
On Screen Keyboard; Window numbers:
Definition: window_type.h:157
WC_LINKGRAPH_LEGEND
Linkgraph legend; Window numbers:
Definition: window_type.h:676
WC_BUILD_WAYPOINT
Build waypoint; Window numbers:
Definition: window_type.h:418
WN_CONFIRM_POPUP_QUERY_BOOTSTRAP
Query popup confirm for bootstrap.
Definition: window_type.h:27
WC_VEHICLE_REFIT
Vehicle refit; Window numbers:
Definition: window_type.h:201
WC_CUSTOM_CURRENCY
Custom currency; Window numbers:
Definition: window_type.h:614
WC_OPERATING_PROFIT
Operating profit graph; Window numbers:
Definition: window_type.h:530
WC_COMPANY_LEAGUE
Company league window; Window numbers:
Definition: window_type.h:554
WC_FINANCES
Finances of a company; Window numbers:
Definition: window_type.h:518
WN_CONFIRM_POPUP_QUERY
Query popup confirm.
Definition: window_type.h:26
WC_VEHICLE_VIEW
Vehicle view; Window numbers:
Definition: window_type.h:334
WC_COMPANY_COLOUR
Company colour selection; Window numbers:
Definition: window_type.h:225
WC_HIGHSCORE
Highscore; Window numbers:
Definition: window_type.h:645
WC_SET_DATE
Set date; Window numbers:
Definition: window_type.h:163
WC_SUBSIDIES_LIST
Subsidies list; Window numbers:
Definition: window_type.h:255
WC_ROADVEH_LIST
Road vehicle list; Window numbers:
Definition: window_type.h:309
WC_VEHICLE_TIMETABLE
Vehicle timetable; Window numbers:
Definition: window_type.h:219
WC_FOUND_TOWN
Found a town; Window numbers:
Definition: window_type.h:424
WC_STATION_VIEW
Station view; Window numbers:
Definition: window_type.h:340
WC_BUILD_STATION
Build station; Window numbers:
Definition: window_type.h:392
WC_INDUSTRY_VIEW
Industry view; Window numbers:
Definition: window_type.h:358
WN_GAME_OPTIONS_ABOUT
About window.
Definition: window_type.h:18
WC_BUILD_BRIDGE
Build bridge; Window numbers:
Definition: window_type.h:384
WC_LAND_INFO
Land info window; Window numbers:
Definition: window_type.h:145
WN_GAME_OPTIONS_GAME_SETTINGS
Game settings.
Definition: window_type.h:21
WC_BUILD_OBJECT
Build object; Window numbers:
Definition: window_type.h:371
WN_NETWORK_WINDOW_START
Network start server.
Definition: window_type.h:32
WC_BUILD_TREES
Build trees toolbar; Window numbers:
Definition: window_type.h:81
GOID_NEWGRF_LIST_EDITED
List of active NewGRFs is being edited.
Definition: window_type.h:691
WC_STATION_LIST
Station list; Window numbers:
Definition: window_type.h:297
WC_BUILD_INDUSTRY
Build industry; Window numbers:
Definition: window_type.h:430
WC_BUILD_TOOLBAR
Build toolbar; Window numbers:
Definition: window_type.h:68
WC_BUILD_SIGNAL
Build signal toolbar; Window numbers:
Definition: window_type.h:93
WC_PERFORMANCE_DETAIL
Performance detail window; Window numbers:
Definition: window_type.h:566
WC_NETWORK_STATUS_WINDOW
Network status window; Window numbers:
Definition: window_type.h:487
WC_MESSAGE_HISTORY
News history list; Window numbers:
Definition: window_type.h:267
WC_SELECT_GAME
Select game window; Window numbers:
Definition: window_type.h:437
WC_NONE
No window, redirects to WC_MAIN_WINDOW.
Definition: window_type.h:40
WC_COMPANY_INFRASTRUCTURE
Company infrastructure overview; Window numbers:
Definition: window_type.h:572
WN_NETWORK_STATUS_WINDOW_JOIN
Network join status.
Definition: window_type.h:34
WC_SAVE_PRESET
Save preset; Window numbers:
Definition: window_type.h:682
WC_TOWN_AUTHORITY
Town authority; Window numbers:
Definition: window_type.h:189
WN_QUERY_STRING
Query string.
Definition: window_type.h:23
WC_CHEATS
Cheat window; Window numbers:
Definition: window_type.h:620
WC_SHIPS_LIST
Ships list; Window numbers:
Definition: window_type.h:315
WC_STORY_BOOK
Story book; Window numbers:
Definition: window_type.h:291
GameOptionsInvalidationData
GameOptionsInvalidationData
Data value for Window::OnInvalidateData() of windows with class WC_GAME_OPTIONS.
Definition: window_type.h:688
WC_TRUCK_STATION
Build truck station; Window numbers:
Definition: window_type.h:404
WC_TRAINS_LIST
Trains list; Window numbers:
Definition: window_type.h:303
WC_NETWORK_WINDOW
Network window; Window numbers:
Definition: window_type.h:468
WC_TOWN_VIEW
Town view; Window numbers:
Definition: window_type.h:328
WC_COMPANY_MANAGER_FACE
Alter company face window; Window numbers:
Definition: window_type.h:231
WC_AIRCRAFT_LIST
Aircraft list; Window numbers:
Definition: window_type.h:321
WC_VEHICLE_DETAILS
Vehicle details; Window numbers:
Definition: window_type.h:195
WC_STATUS_BAR
Statusbar (at the bottom of your screen); Window numbers:
Definition: window_type.h:59
WC_MAIN_TOOLBAR
Main toolbar (the long bar at the top); Window numbers:
Definition: window_type.h:53
WC_AI_LIST
AI list; Window numbers:
Definition: window_type.h:279
WC_ENDSCREEN
Endscreen; Window numbers:
Definition: window_type.h:651
WC_DELIVERED_CARGO
Delivered cargo graph; Window numbers:
Definition: window_type.h:536
WC_AI_SETTINGS
AI settings; Window numbers:
Definition: window_type.h:170
WC_CONFIRM_POPUP_QUERY
Popup with confirm question; Window numbers:
Definition: window_type.h:125
WC_COMPANY_PASSWORD_WINDOW
Company password query; Window numbers:
Definition: window_type.h:499
WC_GRF_PARAMETERS
NewGRF parameters; Window numbers:
Definition: window_type.h:176
WC_EXTRA_VIEW_PORT
Extra viewport; Window numbers:
Definition: window_type.h:626
WC_BUS_STATION
Build bus station; Window numbers:
Definition: window_type.h:398
WindowNumber
int32 WindowNumber
Number to differentiate different windows of the same class.
Definition: window_type.h:695
WN_NETWORK_WINDOW_CONTENT_LIST
Network content list.
Definition: window_type.h:31
ES_HANDLED
The passed event is handled.
Definition: window_type.h:702
WC_GRAPH_LEGEND
Legend for graphs; Window numbers:
Definition: window_type.h:512
WN_GAME_OPTIONS_GAME_OPTIONS
Game options.
Definition: window_type.h:20
WC_COMPANY
Company view; Window numbers:
Definition: window_type.h:364
WC_INDUSTRY_CARGOES
Industry cargoes chain; Window numbers:
Definition: window_type.h:506
WC_QUERY_STRING
Query string window; Window numbers:
Definition: window_type.h:118
WC_GAME_OPTIONS
Game options window; Window numbers:
Definition: window_type.h:608
WN_GAME_OPTIONS_NEWGRF_STATE
NewGRF settings.
Definition: window_type.h:19
WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD
Network content download status.
Definition: window_type.h:35
WC_PERFORMANCE_HISTORY
Performance history graph; Window numbers:
Definition: window_type.h:542
WC_DROPDOWN_MENU
Drop down menu; Window numbers:
Definition: window_type.h:151
WC_NEWS_WINDOW
News window; Window numbers:
Definition: window_type.h:243