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 * Station rating tooltip window; %Window numbers:
115 * - 0 = #ToolTipsWidgets
117 WC_STATION_RATING_TOOLTIP
,
120 * Query string window; %Window numbers:
121 * - #WN_QUERY_STRING = #QueryStringWidgets
122 * - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
127 * Popup with confirm question; %Window numbers:
128 * - #WN_CONFIRM_POPUP_QUERY = #QueryWidgets
129 * - #WN_CONFIRM_POPUP_QUERY_BOOTSTRAP = #BootstrapAskForDownloadWidgets
131 WC_CONFIRM_POPUP_QUERY
,
134 * Popup with a set of buttons, designed to ask the user a question
135 * from a GameScript. %Window numbers:
136 * - uniqueid = #GoalQuestionWidgets
142 * Saveload window; %Window numbers:
143 * - 0 = #SaveLoadWidgets
148 * Land info window; %Window numbers:
149 * - 0 = #LandInfoWidgets
154 * Drop down menu; %Window numbers:
155 * - 0 = #DropdownMenuWidgets
160 * On Screen Keyboard; %Window numbers:
161 * - 0 = #OnScreenKeyboardWidgets
166 * Set date; %Window numbers:
167 * - #VehicleID = #SetDateWidgets
173 * AI settings; %Window numbers:
174 * - 0 = #AISettingsWidgets
179 * NewGRF parameters; %Window numbers:
180 * - 0 = #NewGRFParametersWidgets
185 * textfile; %Window numbers:
186 * - 0 = #TextfileWidgets
192 * Town authority; %Window numbers:
193 * - #TownID = #TownAuthorityWidgets
198 * Vehicle details; %Window numbers:
199 * - #VehicleID = #VehicleDetailsWidgets
204 * Vehicle refit; %Window numbers:
205 * - #VehicleID = #VehicleRefitWidgets
210 * Vehicle orders; %Window numbers:
211 * - #VehicleID = #OrderWidgets
216 * Vehicle cargo type load orders; %Window numbers:
217 * - #VehicleID = #CargoTypeOrdersWidgets
219 WC_VEHICLE_CARGO_TYPE_LOAD_ORDERS
,
222 * Vehicle cargo type unload orders; %Window numbers:
223 * - #VehicleID = #CargoTypeOrdersWidgets
225 WC_VEHICLE_CARGO_TYPE_UNLOAD_ORDERS
,
228 * Replace vehicle window; %Window numbers:
229 * - #VehicleType = #ReplaceVehicleWidgets
234 * Vehicle timetable; %Window numbers:
235 * - #VehicleID = #VehicleTimetableWidgets
237 WC_VEHICLE_TIMETABLE
,
240 * Vehicle trip history; %Window numbers:
241 * - #VehicleID = #VehicleTripHistoryWidgets
243 WC_VEHICLE_TRIP_HISTORY
,
246 * Company colour selection; %Window numbers:
247 * - #CompanyID = #SelectCompanyLiveryWidgets
252 * Alter company face window; %Window numbers:
253 * - #CompanyID = #SelectCompanyManagerFaceWidgets
255 WC_COMPANY_MANAGER_FACE
,
258 * Select station (when joining stations); %Window numbers:
259 * - 0 = #JoinStationWidgets
264 * News window; %Window numbers:
270 * Town directory; %Window numbers:
271 * - 0 = #TownDirectoryWidgets
276 * Subsidies list; %Window numbers:
277 * - 0 = #SubsidyListWidgets
282 * Industry directory; %Window numbers:
283 * - 0 = #IndustryDirectoryWidgets
285 WC_INDUSTRY_DIRECTORY
,
288 * News history list; %Window numbers:
289 * - 0 = #MessageHistoryWidgets
294 * Sign list; %Window numbers:
295 * - 0 = #SignListWidgets
300 * AI list; %Window numbers:
301 * - 0 = #AIListWidgets
306 * Goals list; %Window numbers:
307 * - 0 ; #GoalListWidgets
312 * Story book; %Window numbers:
313 * - CompanyID = #StoryBookWidgets
318 * Station list; %Window numbers:
319 * - #CompanyID = #StationListWidgets
324 * Trains list; %Window numbers:
325 * - Packed value = #GroupListWidgets / #VehicleListWidgets
330 * Road vehicle list; %Window numbers:
331 * - Packed value = #GroupListWidgets / #VehicleListWidgets
336 * Ships list; %Window numbers:
337 * - Packed value = #GroupListWidgets / #VehicleListWidgets
342 * Aircraft list; %Window numbers:
343 * - Packed value = #GroupListWidgets / #VehicleListWidgets
349 * Town view; %Window numbers:
350 * - #TownID = #TownViewWidgets
355 * Vehicle view; %Window numbers:
356 * - #VehicleID = #VehicleViewWidgets
361 * Station view; %Window numbers:
362 * - #StationID = #StationViewWidgets
367 * Depot view; %Window numbers:
368 * - #TileIndex = #DepotWidgets
373 * Waypoint view; %Window numbers:
374 * - #WaypointID = #WaypointWidgets
379 * Industry view; %Window numbers:
380 * - #IndustryID = #IndustryViewWidgets
385 * Company view; %Window numbers:
386 * - #CompanyID = #CompanyWidgets
392 * Build object; %Window numbers:
393 * - 0 = #BuildObjectWidgets
398 * Build vehicle; %Window numbers:
399 * - #VehicleType = #BuildVehicleWidgets
400 * - #TileIndex = #BuildVehicleWidgets
405 * Build bridge; %Window numbers:
406 * - #TransportType = #BuildBridgeSelectionWidgets
411 * Build station; %Window numbers:
412 * - #TRANSPORT_AIR = #AirportPickerWidgets
413 * - #TRANSPORT_WATER = #DockToolbarWidgets
414 * - #TRANSPORT_RAIL = #BuildRailStationWidgets
419 * Build bus station; %Window numbers:
420 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
425 * Build truck station; %Window numbers:
426 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
431 * Build depot; %Window numbers:
432 * - #TRANSPORT_WATER = #BuildDockDepotWidgets
433 * - #TRANSPORT_RAIL = #BuildRailDepotWidgets
434 * - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
439 * Build waypoint; %Window numbers:
440 * - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
445 * Found a town; %Window numbers:
446 * - 0 = #TownFoundingWidgets
451 * Build industry; %Window numbers:
452 * - 0 = #DynamicPlaceIndustriesWidgets
458 * Select game window; %Window numbers:
459 * - 0 = #SelectGameIntroWidgets
464 * Landscape generation (in Scenario Editor); %Window numbers:
465 * - 0 = #TerraformToolbarWidgets
466 * - 0 = #EditorTerraformToolbarWidgets
471 * Generate landscape (newgame); %Window numbers:
472 * - GLWM_SCENARIO = #CreateScenarioWidgets
473 * - #GenerateLandscapeWindowMode = #GenerateLandscapeWidgets
475 WC_GENERATE_LANDSCAPE
,
478 * Progress report of landscape generation; %Window numbers:
479 * - 0 = #GenerationProgressWidgets
480 * - 1 = #ScanProgressWidgets
486 * Network window; %Window numbers:
487 * - #WN_NETWORK_WINDOW_GAME = #NetworkGameWidgets
488 * - #WN_NETWORK_WINDOW_LOBBY = #NetworkLobbyWidgets
489 * - #WN_NETWORK_WINDOW_CONTENT_LIST = #NetworkContentListWidgets
490 * - #WN_NETWORK_WINDOW_START = #NetworkStartServerWidgets
495 * Client list; %Window numbers:
496 * - 0 = #ClientListWidgets
501 * Popup for the client list; %Window numbers:
502 * - #ClientID = #ClientListPopupWidgets
504 WC_CLIENT_LIST_POPUP
,
507 * Network status window; %Window numbers:
508 * - #WN_NETWORK_STATUS_WINDOW_JOIN = #NetworkJoinStatusWidgets
509 * - #WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD = #NetworkContentDownloadStatusWidgets
511 WC_NETWORK_STATUS_WINDOW
,
514 * Chatbox; %Window numbers:
515 * - #DestType = #NetWorkChatWidgets
520 * Company password query; %Window numbers:
521 * - 0 = #NetworkCompanyPasswordWidgets
523 WC_COMPANY_PASSWORD_WINDOW
,
527 * Industry cargoes chain; %Window numbers:
528 * - 0 = #IndustryCargoesWidgets
533 * Legend for graphs; %Window numbers:
534 * - 0 = #GraphLegendWidgets
539 * Finances of a company; %Window numbers:
540 * - #CompanyID = #CompanyWidgets
545 * Income graph; %Window numbers:
546 * - 0 = #CompanyValueWidgets
551 * Operating profit graph; %Window numbers:
552 * - 0 = #CompanyValueWidgets
557 * Delivered cargo graph; %Window numbers:
558 * - 0 = #CompanyValueWidgets
563 * Performance history graph; %Window numbers:
564 * - 0 = #PerformanceHistoryGraphWidgets
566 WC_PERFORMANCE_HISTORY
,
569 * Company value graph; %Window numbers:
570 * - 0 = #CompanyValueWidgets
575 * Company league window; %Window numbers:
576 * - 0 = #CompanyLeagueWidgets
581 * Payment rates graph; %Window numbers:
582 * - 0 = #CargoPaymentRatesWidgets
587 * Performance detail window; %Window numbers:
588 * - 0 = #PerformanceRatingDetailsWidgets
590 WC_PERFORMANCE_DETAIL
,
593 * Company infrastructure overview; %Window numbers:
594 * - #CompanyID = #CompanyInfrastructureWidgets
596 WC_COMPANY_INFRASTRUCTURE
,
600 * Buyout company (merger); %Window numbers:
601 * - #CompanyID = #BuyCompanyWidgets
606 * Engine preview window; %Window numbers:
607 * - #EngineID = #EnginePreviewWidgets
613 * Music window; %Window numbers:
614 * - 0 = #MusicWidgets
619 * Music track selection; %Window numbers:
620 * - 0 = MusicTrackSelectionWidgets
622 WC_MUSIC_TRACK_SELECTION
,
625 * Game options window; %Window numbers:
626 * - #WN_GAME_OPTIONS_AI = #AIConfigWidgets
627 * - #WN_GAME_OPTIONS_ABOUT = #AboutWidgets
628 * - #WN_GAME_OPTIONS_NEWGRF_STATE = #NewGRFStateWidgets
629 * - #WN_GAME_OPTIONS_GAME_OPTIONS = #GameOptionsWidgets
630 * - #WN_GAME_OPTIONS_GAME_SETTINGS = #GameSettingsWidgets
635 * Custom currency; %Window numbers:
636 * - 0 = #CustomCurrencyWidgets
641 * Cheat window; %Window numbers:
642 * - 0 = #CheatWidgets
647 * Extra viewport; %Window numbers:
648 * - Ascending value = #ExtraViewportWidgets
654 * Console; %Window numbers:
655 * - 0 = #ConsoleWidgets
660 * Bootstrap; %Window numbers:
661 * - 0 = #BootstrapBackgroundWidgets
666 * Highscore; %Window numbers:
667 * - 0 = #HighscoreWidgets
672 * Endscreen; %Window numbers:
673 * - 0 = #HighscoreWidgets
679 * AI debug window; %Window numbers:
680 * - 0 = #AIDebugWidgets
685 * NewGRF inspect (debug); %Window numbers:
686 * - Packed value = #NewGRFInspectWidgets
691 * Sprite aligner (debug); %Window numbers:
692 * - 0 = #SpriteAlignerWidgets
702 * Linkgraph legend; Window numbers:
703 * - 0 = #LinkGraphWidgets
708 * Save preset; %Window numbers:
709 * - 0 = #SavePresetWidgets
719 * Trace restrict programme window; %Window numbers:
720 * - #TileIndex << 3 | #Track = #TraceRestrictWindow
725 * Trace restrict slot window; %Window numbers:
726 * - Packed value = #SlotListWidgets / #VehicleListWidgets
728 WC_TRACE_RESTRICT_SLOTS
,
731 WC_TEMPLATEGUI_RPLALL
,
732 WC_BUILD_VIRTUAL_TRAIN
,
737 * Signal program GUI; %Window numbers:
748 * Station cargo graph; %Window numbers:
749 * - #StationID = #StationCargoWidgets
753 WC_INVALID
= 0xFFFF, ///< Invalid window.
756 /** Data value for #Window::OnInvalidateData() of windows with class #WC_GAME_OPTIONS. */
757 enum GameOptionsInvalidationData
{
759 GOID_NEWGRF_RESCANNED
, ///< NewGRFs were just rescanned.
760 GOID_NEWGRF_LIST_EDITED
, ///< List of active NewGRFs is being edited.
761 GOID_NEWGRF_PRESET_LOADED
, ///< A NewGRF preset was picked.
766 /** Number to differentiate different windows of the same class */
767 typedef int32 WindowNumber
;
769 /** State of handling an event. */
771 ES_HANDLED
, ///< The passed event is handled.
772 ES_NOT_HANDLED
, ///< The passed event is not handled.
775 #endif /* WINDOW_TYPE_H */