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/>.
10 /** @file window_type.h Types related to windows */
15 /** %Window numbers. */
16 enum WindowNumberEnum
{
17 WN_GAME_OPTIONS_AI
= 0, ///< AI settings.
18 WN_GAME_OPTIONS_ABOUT
, ///< About window.
19 WN_GAME_OPTIONS_NEWGRF_STATE
, ///< NewGRF settings.
20 WN_GAME_OPTIONS_GAME_OPTIONS
, ///< Game options.
21 WN_GAME_OPTIONS_GAME_SETTINGS
, ///< Game settings.
23 WN_QUERY_STRING
= 0, ///< Query string.
24 WN_QUERY_STRING_SIGN
, ///< Query string for signs.
26 WN_CONFIRM_POPUP_QUERY
= 0, ///< Query popup confirm.
27 WN_CONFIRM_POPUP_QUERY_BOOTSTRAP
, ///< Query popup confirm for bootstrap.
29 WN_NETWORK_WINDOW_GAME
= 0, ///< Network game window.
30 WN_NETWORK_WINDOW_LOBBY
, ///< Network lobby window.
31 WN_NETWORK_WINDOW_CONTENT_LIST
, ///< Network content list.
32 WN_NETWORK_WINDOW_START
, ///< Network start server.
34 WN_NETWORK_STATUS_WINDOW_JOIN
= 0, ///< Network join status.
35 WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD
, ///< Network content download status.
38 /** %Window classes. */
40 WC_NONE
, ///< No window, redirects to WC_MAIN_WINDOW.
43 * Main window; %Window numbers:
46 WC_MAIN_WINDOW
= WC_NONE
,
49 * Main toolbar (the long bar at the top); %Window numbers:
50 * - 0 = #ToolbarNormalWidgets
51 * - 0 = #ToolbarEditorWidgets
56 * Statusbar (at the bottom of your screen); %Window numbers:
57 * - 0 = #StatusbarWidgets
62 * Build toolbar; %Window numbers:
63 * - #TRANSPORT_RAIL = #RailToolbarWidgets
64 * - #TRANSPORT_AIR = #AirportToolbarWidgets
65 * - #TRANSPORT_WATER = #DockToolbarWidgets
66 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
71 * Scenario build toolbar; %Window numbers:
72 * - #TRANSPORT_WATER = #DockToolbarWidgets
73 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
75 WC_SCEN_BUILD_TOOLBAR
,
78 * Build trees toolbar; %Window numbers:
79 * - 0 = #BuildTreesWidgets
84 * Transparency toolbar; %Window numbers:
85 * - 0 = #TransparencyToolbarWidgets
87 WC_TRANSPARENCY_TOOLBAR
,
90 * Build signal toolbar; %Window numbers:
91 * - #TRANSPORT_RAIL = #BuildSignalWidgets
96 * Small map; %Window numbers:
97 * - 0 = #SmallMapWidgets
102 * Error message; %Window numbers:
103 * - 0 = #ErrorMessageWidgets
108 * Tooltip window; %Window numbers:
109 * - 0 = #ToolTipsWidgets
114 * Query string window; %Window numbers:
115 * - #WN_QUERY_STRING = #QueryStringWidgets
116 * - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
121 * Popup with confirm question; %Window numbers:
122 * - #WN_CONFIRM_POPUP_QUERY = #QueryWidgets
123 * - #WN_CONFIRM_POPUP_QUERY_BOOTSTRAP = #BootstrapAskForDownloadWidgets
125 WC_CONFIRM_POPUP_QUERY
,
128 * Popup with a set of buttons, designed to ask the user a question
129 * from a GameScript. %Window numbers:
130 * - uniqueid = #GoalQuestionWidgets
136 * Saveload window; %Window numbers:
137 * - 0 = #SaveLoadWidgets
142 * Land info window; %Window numbers:
143 * - 0 = #LandInfoWidgets
148 * Drop down menu; %Window numbers:
149 * - 0 = #DropdownMenuWidgets
154 * On Screen Keyboard; %Window numbers:
155 * - 0 = #OnScreenKeyboardWidgets
160 * Set date; %Window numbers:
161 * - #VehicleID = #SetDateWidgets
167 * AI settings; %Window numbers:
168 * - 0 = #AISettingsWidgets
173 * NewGRF parameters; %Window numbers:
174 * - 0 = #NewGRFParametersWidgets
179 * textfile; %Window numbers:
180 * - 0 = #TextfileWidgets
186 * Town authority; %Window numbers:
187 * - #TownID = #TownAuthorityWidgets
192 * Vehicle details; %Window numbers:
193 * - #VehicleID = #VehicleDetailsWidgets
198 * Vehicle refit; %Window numbers:
199 * - #VehicleID = #VehicleRefitWidgets
204 * Vehicle orders; %Window numbers:
205 * - #VehicleID = #OrderWidgets
210 * Replace vehicle window; %Window numbers:
211 * - #VehicleType = #ReplaceVehicleWidgets
216 * Vehicle timetable; %Window numbers:
217 * - #VehicleID = #VehicleTimetableWidgets
219 WC_VEHICLE_TIMETABLE
,
222 * Company colour selection; %Window numbers:
223 * - #CompanyID = #SelectCompanyLiveryWidgets
228 * Alter company face window; %Window numbers:
229 * - #CompanyID = #SelectCompanyManagerFaceWidgets
231 WC_COMPANY_MANAGER_FACE
,
234 * Select station (when joining stations); %Window numbers:
235 * - 0 = #JoinStationWidgets
240 * Select town (when placing a house); %Window numbers:
241 * - 0 = #SelectTownWidgets
246 * News window; %Window numbers:
252 * Town directory; %Window numbers:
253 * - 0 = #TownDirectoryWidgets
258 * Subsidies list; %Window numbers:
259 * - 0 = #SubsidyListWidgets
264 * Industry directory; %Window numbers:
265 * - 0 = #IndustryDirectoryWidgets
267 WC_INDUSTRY_DIRECTORY
,
270 * News history list; %Window numbers:
271 * - 0 = #MessageHistoryWidgets
276 * Sign list; %Window numbers:
277 * - 0 = #SignListWidgets
282 * AI list; %Window numbers:
283 * - 0 = #AIListWidgets
288 * Goals list; %Window numbers:
289 * - 0 ; #GoalListWidgets
294 * Story book; %Window numbers:
295 * - CompanyID = #StoryBookWidgets
300 * Station list; %Window numbers:
301 * - #CompanyID = #StationListWidgets
306 * Trains list; %Window numbers:
307 * - Packed value = #GroupListWidgets / #VehicleListWidgets
312 * Road vehicle list; %Window numbers:
313 * - Packed value = #GroupListWidgets / #VehicleListWidgets
318 * Ships list; %Window numbers:
319 * - Packed value = #GroupListWidgets / #VehicleListWidgets
324 * Aircraft list; %Window numbers:
325 * - Packed value = #GroupListWidgets / #VehicleListWidgets
331 * Town view; %Window numbers:
332 * - #TownID = #TownViewWidgets
337 * Vehicle view; %Window numbers:
338 * - #VehicleID = #VehicleViewWidgets
343 * Station view; %Window numbers:
344 * - #StationID = #StationViewWidgets
349 * Depot view; %Window numbers:
350 * - #TileIndex = #DepotWidgets
355 * Waypoint view; %Window numbers:
356 * - #WaypointID = #WaypointWidgets
361 * Industry view; %Window numbers:
362 * - #IndustryID = #IndustryViewWidgets
367 * Company view; %Window numbers:
368 * - #CompanyID = #CompanyWidgets
374 * Build object; %Window numbers:
375 * - 0 = #BuildObjectWidgets
380 * Build house; %Window numbers:
381 * - 0 = #BuildHouseWidgets
386 * Build vehicle; %Window numbers:
387 * - #VehicleType = #BuildVehicleWidgets
388 * - #TileIndex = #BuildVehicleWidgets
393 * Build bridge; %Window numbers:
394 * - #TransportType = #BuildBridgeSelectionWidgets
399 * Build station; %Window numbers:
400 * - #TRANSPORT_AIR = #AirportPickerWidgets
401 * - #TRANSPORT_WATER = #DockToolbarWidgets
402 * - #TRANSPORT_RAIL = #BuildRailStationWidgets
407 * Build bus station; %Window numbers:
408 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
413 * Build truck station; %Window numbers:
414 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
419 * Build depot; %Window numbers:
420 * - #TRANSPORT_WATER = #BuildDockDepotWidgets
421 * - #TRANSPORT_RAIL = #BuildRailDepotWidgets
422 * - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
427 * Build waypoint; %Window numbers:
428 * - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
433 * Found a town; %Window numbers:
434 * - 0 = #TownFoundingWidgets
439 * Build industry; %Window numbers:
440 * - 0 = #DynamicPlaceIndustriesWidgets
446 * Select game window; %Window numbers:
447 * - 0 = #SelectGameIntroWidgets
452 * Landscape generation (in Scenario Editor); %Window numbers:
453 * - 0 = #TerraformToolbarWidgets
454 * - 0 = #EditorTerraformToolbarWidgets
459 * Generate landscape (newgame); %Window numbers:
460 * - GLWM_SCENARIO = #CreateScenarioWidgets
461 * - #GenerateLandscapeWindowMode = #GenerateLandscapeWidgets
463 WC_GENERATE_LANDSCAPE
,
466 * Progress report of landscape generation; %Window numbers:
467 * - 0 = #GenerationProgressWidgets
468 * - 1 = #ScanProgressWidgets
474 * Network window; %Window numbers:
475 * - #WN_NETWORK_WINDOW_GAME = #NetworkGameWidgets
476 * - #WN_NETWORK_WINDOW_LOBBY = #NetworkLobbyWidgets
477 * - #WN_NETWORK_WINDOW_CONTENT_LIST = #NetworkContentListWidgets
478 * - #WN_NETWORK_WINDOW_START = #NetworkStartServerWidgets
483 * Client list; %Window numbers:
484 * - 0 = #ClientListWidgets
489 * Popup for the client list; %Window numbers:
490 * - #ClientID = #ClientListPopupWidgets
492 WC_CLIENT_LIST_POPUP
,
495 * Network status window; %Window numbers:
496 * - #WN_NETWORK_STATUS_WINDOW_JOIN = #NetworkJoinStatusWidgets
497 * - #WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD = #NetworkContentDownloadStatusWidgets
499 WC_NETWORK_STATUS_WINDOW
,
502 * Chatbox; %Window numbers:
503 * - #DestType = #NetWorkChatWidgets
508 * Company password query; %Window numbers:
509 * - 0 = #NetworkCompanyPasswordWidgets
511 WC_COMPANY_PASSWORD_WINDOW
,
515 * Industry cargoes chain; %Window numbers:
516 * - 0 = #IndustryCargoesWidgets
521 * Legend for graphs; %Window numbers:
522 * - 0 = #GraphLegendWidgets
527 * Finances of a company; %Window numbers:
528 * - #CompanyID = #CompanyWidgets
533 * Income graph; %Window numbers:
534 * - 0 = #CompanyValueWidgets
539 * Operating profit graph; %Window numbers:
540 * - 0 = #CompanyValueWidgets
545 * Delivered cargo graph; %Window numbers:
546 * - 0 = #CompanyValueWidgets
551 * Performance history graph; %Window numbers:
552 * - 0 = #PerformanceHistoryGraphWidgets
554 WC_PERFORMANCE_HISTORY
,
557 * Company value graph; %Window numbers:
558 * - 0 = #CompanyValueWidgets
563 * Company league window; %Window numbers:
564 * - 0 = #CompanyLeagueWidgets
569 * Payment rates graph; %Window numbers:
570 * - 0 = #CargoPaymentRatesWidgets
575 * Performance detail window; %Window numbers:
576 * - 0 = #PerformanceRatingDetailsWidgets
578 WC_PERFORMANCE_DETAIL
,
581 * Company infrastructure overview; %Window numbers:
582 * - #CompanyID = #CompanyInfrastructureWidgets
584 WC_COMPANY_INFRASTRUCTURE
,
588 * Buyout company (merger); %Window numbers:
589 * - #CompanyID = #BuyCompanyWidgets
594 * Engine preview window; %Window numbers:
595 * - #EngineID = #EnginePreviewWidgets
601 * Music window; %Window numbers:
602 * - 0 = #MusicWidgets
607 * Music track selection; %Window numbers:
608 * - 0 = MusicTrackSelectionWidgets
610 WC_MUSIC_TRACK_SELECTION
,
613 * Game options window; %Window numbers:
614 * - #WN_GAME_OPTIONS_AI = #AIConfigWidgets
615 * - #WN_GAME_OPTIONS_ABOUT = #AboutWidgets
616 * - #WN_GAME_OPTIONS_NEWGRF_STATE = #NewGRFStateWidgets
617 * - #WN_GAME_OPTIONS_GAME_OPTIONS = #GameOptionsWidgets
618 * - #WN_GAME_OPTIONS_GAME_SETTINGS = #GameSettingsWidgets
623 * Custom currency; %Window numbers:
624 * - 0 = #CustomCurrencyWidgets
629 * Cheat window; %Window numbers:
630 * - 0 = #CheatWidgets
635 * Extra viewport; %Window numbers:
636 * - Ascending value = #ExtraViewportWidgets
642 * Console; %Window numbers:
643 * - 0 = #ConsoleWidgets
648 * Bootstrap; %Window numbers:
649 * - 0 = #BootstrapBackgroundWidgets
654 * Highscore; %Window numbers:
655 * - 0 = #HighscoreWidgets
660 * Endscreen; %Window numbers:
661 * - 0 = #HighscoreWidgets
667 * AI debug window; %Window numbers:
668 * - 0 = #AIDebugWidgets
673 * NewGRF inspect (debug); %Window numbers:
674 * - Packed value = #NewGRFInspectWidgets
679 * Sprite aligner (debug); %Window numbers:
680 * - 0 = #SpriteAlignerWidgets
685 * Linkgraph legend; %Window numbers:
686 * - 0 = #LinkGraphWidgets
691 * Save preset; %Window numbers:
692 * - 0 = #SavePresetWidgets
696 WC_INVALID
= 0xFFFF, ///< Invalid window.
699 /** Data value for #Window::OnInvalidateData() of windows with class #WC_GAME_OPTIONS. */
700 enum GameOptionsInvalidationData
{
702 GOID_NEWGRF_RESCANNED
, ///< NewGRFs were just rescanned.
703 GOID_NEWGRF_LIST_EDITED
, ///< List of active NewGRFs is being edited.
704 GOID_NEWGRF_PRESET_LOADED
, ///< A NewGRF preset was picked.
709 /** Number to differentiate different windows of the same class */
710 typedef int32 WindowNumber
;
712 /** State of handling an event. */
714 ES_HANDLED
, ///< The passed event is handled.
715 ES_NOT_HANDLED
, ///< The passed event is not handled.
718 #endif /* WINDOW_TYPE_H */