2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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 /** @file window_type.h Types related to windows */
13 /** %Window numbers. */
14 enum WindowNumberEnum
{
15 WN_GAME_OPTIONS_AI
= 0, ///< AI settings.
16 WN_GAME_OPTIONS_ABOUT
, ///< About window.
17 WN_GAME_OPTIONS_NEWGRF_STATE
, ///< NewGRF settings.
18 WN_GAME_OPTIONS_GAME_OPTIONS
, ///< Game options.
19 WN_GAME_OPTIONS_GAME_SETTINGS
, ///< Game settings.
21 WN_QUERY_STRING
= 0, ///< Query string.
22 WN_QUERY_STRING_SIGN
, ///< Query string for signs.
24 WN_CONFIRM_POPUP_QUERY
= 0, ///< Query popup confirm.
25 WN_CONFIRM_POPUP_QUERY_BOOTSTRAP
, ///< Query popup confirm for bootstrap.
27 WN_NETWORK_WINDOW_GAME
= 0, ///< Network game window.
28 WN_NETWORK_WINDOW_LOBBY
, ///< Network lobby window.
29 WN_NETWORK_WINDOW_CONTENT_LIST
, ///< Network content list.
30 WN_NETWORK_WINDOW_START
, ///< Network start server.
32 WN_NETWORK_STATUS_WINDOW_JOIN
= 0, ///< Network join status.
33 WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD
, ///< Network content download status.
36 /** %Window classes. */
38 WC_NONE
, ///< No window, redirects to WC_MAIN_WINDOW.
41 * Main window; %Window numbers:
44 WC_MAIN_WINDOW
= WC_NONE
,
47 * Main toolbar (the long bar at the top); %Window numbers:
48 * - 0 = #ToolbarNormalWidgets
49 * - 0 = #ToolbarEditorWidgets
54 * Statusbar (at the bottom of your screen); %Window numbers:
55 * - 0 = #StatusbarWidgets
60 * Build toolbar; %Window numbers:
61 * - #TRANSPORT_RAIL = #RailToolbarWidgets
62 * - #TRANSPORT_AIR = #AirportToolbarWidgets
63 * - #TRANSPORT_WATER = #DockToolbarWidgets
64 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
69 * Scenario build toolbar; %Window numbers:
70 * - #TRANSPORT_WATER = #DockToolbarWidgets
71 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
73 WC_SCEN_BUILD_TOOLBAR
,
76 * Build trees toolbar; %Window numbers:
77 * - 0 = #BuildTreesWidgets
82 * Transparency toolbar; %Window numbers:
83 * - 0 = #TransparencyToolbarWidgets
85 WC_TRANSPARENCY_TOOLBAR
,
88 * Build signal toolbar; %Window numbers:
89 * - #TRANSPORT_RAIL = #BuildSignalWidgets
94 * Small map; %Window numbers:
95 * - 0 = #SmallMapWidgets
100 * Error message; %Window numbers:
101 * - 0 = #ErrorMessageWidgets
106 * Tooltip window; %Window numbers:
107 * - 0 = #ToolTipsWidgets
112 * Query string window; %Window numbers:
113 * - #WN_QUERY_STRING = #QueryStringWidgets
114 * - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
119 * Popup with confirm question; %Window numbers:
120 * - #WN_CONFIRM_POPUP_QUERY = #QueryWidgets
121 * - #WN_CONFIRM_POPUP_QUERY_BOOTSTRAP = #BootstrapAskForDownloadWidgets
123 WC_CONFIRM_POPUP_QUERY
,
126 * Popup with a set of buttons, designed to ask the user a question
127 * from a GameScript. %Window numbers:
128 * - uniqueid = #GoalQuestionWidgets
134 * Saveload window; %Window numbers:
135 * - 0 = #SaveLoadWidgets
140 * Land info window; %Window numbers:
141 * - 0 = #LandInfoWidgets
146 * Drop down menu; %Window numbers:
147 * - 0 = #DropdownMenuWidgets
152 * On Screen Keyboard; %Window numbers:
153 * - 0 = #OnScreenKeyboardWidgets
158 * Set date; %Window numbers:
159 * - #VehicleID = #SetDateWidgets
165 * AI settings; %Window numbers:
166 * - 0 = #AISettingsWidgets
171 * NewGRF parameters; %Window numbers:
172 * - 0 = #NewGRFParametersWidgets
177 * textfile; %Window numbers:
178 * - 0 = #TextfileWidgets
184 * Town authority; %Window numbers:
185 * - #TownID = #TownAuthorityWidgets
190 * Vehicle details; %Window numbers:
191 * - #VehicleID = #VehicleDetailsWidgets
196 * Vehicle refit; %Window numbers:
197 * - #VehicleID = #VehicleRefitWidgets
202 * Vehicle orders; %Window numbers:
203 * - #VehicleID = #OrderWidgets
208 * Replace vehicle window; %Window numbers:
209 * - #VehicleType = #ReplaceVehicleWidgets
214 * Vehicle timetable; %Window numbers:
215 * - #VehicleID = #VehicleTimetableWidgets
217 WC_VEHICLE_TIMETABLE
,
220 * Company colour selection; %Window numbers:
221 * - #CompanyID = #SelectCompanyLiveryWidgets
226 * Alter company face window; %Window numbers:
227 * - #CompanyID = #SelectCompanyManagerFaceWidgets
229 WC_COMPANY_MANAGER_FACE
,
232 * Select station (when joining stations); %Window numbers:
233 * - 0 = #JoinStationWidgets
238 * News window; %Window numbers:
244 * Town directory; %Window numbers:
245 * - 0 = #TownDirectoryWidgets
250 * Subsidies list; %Window numbers:
251 * - 0 = #SubsidyListWidgets
256 * Industry directory; %Window numbers:
257 * - 0 = #IndustryDirectoryWidgets
259 WC_INDUSTRY_DIRECTORY
,
262 * News history list; %Window numbers:
263 * - 0 = #MessageHistoryWidgets
268 * Sign list; %Window numbers:
269 * - 0 = #SignListWidgets
274 * AI list; %Window numbers:
275 * - 0 = #AIListWidgets
280 * Goals list; %Window numbers:
281 * - 0 ; #GoalListWidgets
286 * Story book; %Window numbers:
287 * - CompanyID = #StoryBookWidgets
292 * Station list; %Window numbers:
293 * - #CompanyID = #StationListWidgets
298 * Trains list; %Window numbers:
299 * - Packed value = #GroupListWidgets / #VehicleListWidgets
304 * Road vehicle list; %Window numbers:
305 * - Packed value = #GroupListWidgets / #VehicleListWidgets
310 * Ships list; %Window numbers:
311 * - Packed value = #GroupListWidgets / #VehicleListWidgets
316 * Aircraft list; %Window numbers:
317 * - Packed value = #GroupListWidgets / #VehicleListWidgets
323 * Town view; %Window numbers:
324 * - #TownID = #TownViewWidgets
329 * Vehicle view; %Window numbers:
330 * - #VehicleID = #VehicleViewWidgets
335 * Station view; %Window numbers:
336 * - #StationID = #StationViewWidgets
341 * Depot view; %Window numbers:
342 * - #TileIndex = #DepotWidgets
347 * Waypoint view; %Window numbers:
348 * - #WaypointID = #WaypointWidgets
353 * Industry view; %Window numbers:
354 * - #IndustryID = #IndustryViewWidgets
359 * Company view; %Window numbers:
360 * - #CompanyID = #CompanyWidgets
366 * Build object; %Window numbers:
367 * - 0 = #BuildObjectWidgets
372 * Build vehicle; %Window numbers:
373 * - #VehicleType = #BuildVehicleWidgets
374 * - #TileIndex = #BuildVehicleWidgets
379 * Build bridge; %Window numbers:
380 * - #TransportType = #BuildBridgeSelectionWidgets
385 * Build station; %Window numbers:
386 * - #TRANSPORT_AIR = #AirportPickerWidgets
387 * - #TRANSPORT_WATER = #DockToolbarWidgets
388 * - #TRANSPORT_RAIL = #BuildRailStationWidgets
393 * Build bus station; %Window numbers:
394 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
399 * Build truck station; %Window numbers:
400 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
405 * Build depot; %Window numbers:
406 * - #TRANSPORT_WATER = #BuildDockDepotWidgets
407 * - #TRANSPORT_RAIL = #BuildRailDepotWidgets
408 * - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
413 * Build waypoint; %Window numbers:
414 * - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
419 * Found a town; %Window numbers:
420 * - 0 = #TownFoundingWidgets
425 * Build industry; %Window numbers:
426 * - 0 = #DynamicPlaceIndustriesWidgets
432 * Select game window; %Window numbers:
433 * - 0 = #SelectGameIntroWidgets
438 * Landscape generation (in Scenario Editor); %Window numbers:
439 * - 0 = #TerraformToolbarWidgets
440 * - 0 = #EditorTerraformToolbarWidgets
445 * Generate landscape (newgame); %Window numbers:
446 * - GLWM_SCENARIO = #CreateScenarioWidgets
447 * - #GenerateLandscapeWindowMode = #GenerateLandscapeWidgets
449 WC_GENERATE_LANDSCAPE
,
452 * Progress report of landscape generation; %Window numbers:
453 * - 0 = #GenerationProgressWidgets
454 * - 1 = #ScanProgressWidgets
460 * Network window; %Window numbers:
461 * - #WN_NETWORK_WINDOW_GAME = #NetworkGameWidgets
462 * - #WN_NETWORK_WINDOW_LOBBY = #NetworkLobbyWidgets
463 * - #WN_NETWORK_WINDOW_CONTENT_LIST = #NetworkContentListWidgets
464 * - #WN_NETWORK_WINDOW_START = #NetworkStartServerWidgets
469 * Client list; %Window numbers:
470 * - 0 = #ClientListWidgets
475 * Popup for the client list; %Window numbers:
476 * - #ClientID = #ClientListPopupWidgets
478 WC_CLIENT_LIST_POPUP
,
481 * Network status window; %Window numbers:
482 * - #WN_NETWORK_STATUS_WINDOW_JOIN = #NetworkJoinStatusWidgets
483 * - #WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD = #NetworkContentDownloadStatusWidgets
485 WC_NETWORK_STATUS_WINDOW
,
488 * Chatbox; %Window numbers:
489 * - #DestType = #NetWorkChatWidgets
494 * Company password query; %Window numbers:
495 * - 0 = #NetworkCompanyPasswordWidgets
497 WC_COMPANY_PASSWORD_WINDOW
,
501 * Industry cargoes chain; %Window numbers:
502 * - 0 = #IndustryCargoesWidgets
507 * Legend for graphs; %Window numbers:
508 * - 0 = #GraphLegendWidgets
513 * Finances of a company; %Window numbers:
514 * - #CompanyID = #CompanyWidgets
519 * Income graph; %Window numbers:
520 * - 0 = #CompanyValueWidgets
525 * Operating profit graph; %Window numbers:
526 * - 0 = #CompanyValueWidgets
531 * Delivered cargo graph; %Window numbers:
532 * - 0 = #CompanyValueWidgets
537 * Performance history graph; %Window numbers:
538 * - 0 = #PerformanceHistoryGraphWidgets
540 WC_PERFORMANCE_HISTORY
,
543 * Company value graph; %Window numbers:
544 * - 0 = #CompanyValueWidgets
549 * Company league window; %Window numbers:
550 * - 0 = #CompanyLeagueWidgets
555 * Payment rates graph; %Window numbers:
556 * - 0 = #CargoPaymentRatesWidgets
561 * Performance detail window; %Window numbers:
562 * - 0 = #PerformanceRatingDetailsWidgets
564 WC_PERFORMANCE_DETAIL
,
567 * Company infrastructure overview; %Window numbers:
568 * - #CompanyID = #CompanyInfrastructureWidgets
570 WC_COMPANY_INFRASTRUCTURE
,
574 * Buyout company (merger); %Window numbers:
575 * - #CompanyID = #BuyCompanyWidgets
580 * Engine preview window; %Window numbers:
581 * - #EngineID = #EnginePreviewWidgets
587 * Music window; %Window numbers:
588 * - 0 = #MusicWidgets
593 * Music track selection; %Window numbers:
594 * - 0 = MusicTrackSelectionWidgets
596 WC_MUSIC_TRACK_SELECTION
,
599 * Game options window; %Window numbers:
600 * - #WN_GAME_OPTIONS_AI = #AIConfigWidgets
601 * - #WN_GAME_OPTIONS_ABOUT = #AboutWidgets
602 * - #WN_GAME_OPTIONS_NEWGRF_STATE = #NewGRFStateWidgets
603 * - #WN_GAME_OPTIONS_GAME_OPTIONS = #GameOptionsWidgets
604 * - #WN_GAME_OPTIONS_GAME_SETTINGS = #GameSettingsWidgets
609 * Custom currency; %Window numbers:
610 * - 0 = #CustomCurrencyWidgets
615 * Cheat window; %Window numbers:
616 * - 0 = #CheatWidgets
621 * Extra viewport; %Window numbers:
622 * - Ascending value = #ExtraViewportWidgets
628 * Console; %Window numbers:
629 * - 0 = #ConsoleWidgets
634 * Bootstrap; %Window numbers:
635 * - 0 = #BootstrapBackgroundWidgets
640 * Highscore; %Window numbers:
641 * - 0 = #HighscoreWidgets
646 * Endscreen; %Window numbers:
647 * - 0 = #HighscoreWidgets
653 * AI debug window; %Window numbers:
654 * - 0 = #AIDebugWidgets
659 * NewGRF inspect (debug); %Window numbers:
660 * - Packed value = #NewGRFInspectWidgets
665 * Sprite aligner (debug); %Window numbers:
666 * - 0 = #SpriteAlignerWidgets
671 * Linkgraph legend; %Window numbers:
672 * - 0 = #LinkGraphWidgets
677 * Save preset; %Window numbers:
678 * - 0 = #SavePresetWidgets
683 * Framerate display; %Window numbers:
684 * - 0 = #FramerateDisplayWidgets
686 WC_FRAMERATE_DISPLAY
,
689 * Frame time graph; %Window numbers:
690 * - 0 = #FrametimeGraphWindowWidgets
695 * Screenshot window; %Window numbers:
696 * - 0 = #ScreenshotWidgets
700 WC_INVALID
= 0xFFFF, ///< Invalid window.
703 /** Data value for #Window::OnInvalidateData() of windows with class #WC_GAME_OPTIONS. */
704 enum GameOptionsInvalidationData
{
706 GOID_NEWGRF_RESCANNED
, ///< NewGRFs were just rescanned.
707 GOID_NEWGRF_LIST_EDITED
, ///< List of active NewGRFs is being edited.
708 GOID_NEWGRF_PRESET_LOADED
, ///< A NewGRF preset was picked.
713 /** Number to differentiate different windows of the same class */
714 typedef int32 WindowNumber
;
716 /** State of handling an event. */
718 ES_HANDLED
, ///< The passed event is handled.
719 ES_NOT_HANDLED
, ///< The passed event is not handled.
722 #endif /* WINDOW_TYPE_H */