Add: INR currency (#8136)
[openttd-github.git] / src / window_type.h
blobf99b5cb6d71feaa6dc5ea7512ab66ca4326c9a57
1 /*
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/>.
6 */
8 /** @file window_type.h Types related to windows */
10 #ifndef WINDOW_TYPE_H
11 #define WINDOW_TYPE_H
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. */
37 enum WindowClass {
38 WC_NONE, ///< No window, redirects to WC_MAIN_WINDOW.
40 /**
41 * Main window; %Window numbers:
42 * - 0 = #MainWidgets
44 WC_MAIN_WINDOW = WC_NONE,
46 /**
47 * Main toolbar (the long bar at the top); %Window numbers:
48 * - 0 = #ToolbarNormalWidgets
49 * - 0 = #ToolbarEditorWidgets
51 WC_MAIN_TOOLBAR,
53 /**
54 * Statusbar (at the bottom of your screen); %Window numbers:
55 * - 0 = #StatusbarWidgets
57 WC_STATUS_BAR,
59 /**
60 * Build toolbar; %Window numbers:
61 * - #TRANSPORT_RAIL = #RailToolbarWidgets
62 * - #TRANSPORT_AIR = #AirportToolbarWidgets
63 * - #TRANSPORT_WATER = #DockToolbarWidgets
64 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
66 WC_BUILD_TOOLBAR,
68 /**
69 * Scenario build toolbar; %Window numbers:
70 * - #TRANSPORT_WATER = #DockToolbarWidgets
71 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
73 WC_SCEN_BUILD_TOOLBAR,
75 /**
76 * Build trees toolbar; %Window numbers:
77 * - 0 = #BuildTreesWidgets
79 WC_BUILD_TREES,
81 /**
82 * Transparency toolbar; %Window numbers:
83 * - 0 = #TransparencyToolbarWidgets
85 WC_TRANSPARENCY_TOOLBAR,
87 /**
88 * Build signal toolbar; %Window numbers:
89 * - #TRANSPORT_RAIL = #BuildSignalWidgets
91 WC_BUILD_SIGNAL,
93 /**
94 * Small map; %Window numbers:
95 * - 0 = #SmallMapWidgets
97 WC_SMALLMAP,
99 /**
100 * Error message; %Window numbers:
101 * - 0 = #ErrorMessageWidgets
103 WC_ERRMSG,
106 * Tooltip window; %Window numbers:
107 * - 0 = #ToolTipsWidgets
109 WC_TOOLTIPS,
112 * Query string window; %Window numbers:
113 * - #WN_QUERY_STRING = #QueryStringWidgets
114 * - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
116 WC_QUERY_STRING,
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
130 WC_GOAL_QUESTION,
134 * Saveload window; %Window numbers:
135 * - 0 = #SaveLoadWidgets
137 WC_SAVELOAD,
140 * Land info window; %Window numbers:
141 * - 0 = #LandInfoWidgets
143 WC_LAND_INFO,
146 * Drop down menu; %Window numbers:
147 * - 0 = #DropdownMenuWidgets
149 WC_DROPDOWN_MENU,
152 * On Screen Keyboard; %Window numbers:
153 * - 0 = #OnScreenKeyboardWidgets
155 WC_OSK,
158 * Set date; %Window numbers:
159 * - #VehicleID = #SetDateWidgets
161 WC_SET_DATE,
165 * AI settings; %Window numbers:
166 * - 0 = #AISettingsWidgets
168 WC_AI_SETTINGS,
171 * NewGRF parameters; %Window numbers:
172 * - 0 = #NewGRFParametersWidgets
174 WC_GRF_PARAMETERS,
177 * textfile; %Window numbers:
178 * - 0 = #TextfileWidgets
180 WC_TEXTFILE,
184 * Town authority; %Window numbers:
185 * - #TownID = #TownAuthorityWidgets
187 WC_TOWN_AUTHORITY,
190 * Vehicle details; %Window numbers:
191 * - #VehicleID = #VehicleDetailsWidgets
193 WC_VEHICLE_DETAILS,
196 * Vehicle refit; %Window numbers:
197 * - #VehicleID = #VehicleRefitWidgets
199 WC_VEHICLE_REFIT,
202 * Vehicle orders; %Window numbers:
203 * - #VehicleID = #OrderWidgets
205 WC_VEHICLE_ORDERS,
208 * Replace vehicle window; %Window numbers:
209 * - #VehicleType = #ReplaceVehicleWidgets
211 WC_REPLACE_VEHICLE,
214 * Vehicle timetable; %Window numbers:
215 * - #VehicleID = #VehicleTimetableWidgets
217 WC_VEHICLE_TIMETABLE,
220 * Company colour selection; %Window numbers:
221 * - #CompanyID = #SelectCompanyLiveryWidgets
223 WC_COMPANY_COLOUR,
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
235 WC_SELECT_STATION,
238 * News window; %Window numbers:
239 * - 0 = #NewsWidgets
241 WC_NEWS_WINDOW,
244 * Town directory; %Window numbers:
245 * - 0 = #TownDirectoryWidgets
247 WC_TOWN_DIRECTORY,
250 * Subsidies list; %Window numbers:
251 * - 0 = #SubsidyListWidgets
253 WC_SUBSIDIES_LIST,
256 * Industry directory; %Window numbers:
257 * - 0 = #IndustryDirectoryWidgets
259 WC_INDUSTRY_DIRECTORY,
262 * News history list; %Window numbers:
263 * - 0 = #MessageHistoryWidgets
265 WC_MESSAGE_HISTORY,
268 * Sign list; %Window numbers:
269 * - 0 = #SignListWidgets
271 WC_SIGN_LIST,
274 * AI list; %Window numbers:
275 * - 0 = #AIListWidgets
277 WC_AI_LIST,
280 * Goals list; %Window numbers:
281 * - 0 ; #GoalListWidgets
283 WC_GOALS_LIST,
286 * Story book; %Window numbers:
287 * - CompanyID = #StoryBookWidgets
289 WC_STORY_BOOK,
292 * Station list; %Window numbers:
293 * - #CompanyID = #StationListWidgets
295 WC_STATION_LIST,
298 * Trains list; %Window numbers:
299 * - Packed value = #GroupListWidgets / #VehicleListWidgets
301 WC_TRAINS_LIST,
304 * Road vehicle list; %Window numbers:
305 * - Packed value = #GroupListWidgets / #VehicleListWidgets
307 WC_ROADVEH_LIST,
310 * Ships list; %Window numbers:
311 * - Packed value = #GroupListWidgets / #VehicleListWidgets
313 WC_SHIPS_LIST,
316 * Aircraft list; %Window numbers:
317 * - Packed value = #GroupListWidgets / #VehicleListWidgets
319 WC_AIRCRAFT_LIST,
323 * Town view; %Window numbers:
324 * - #TownID = #TownViewWidgets
326 WC_TOWN_VIEW,
329 * Vehicle view; %Window numbers:
330 * - #VehicleID = #VehicleViewWidgets
332 WC_VEHICLE_VIEW,
335 * Station view; %Window numbers:
336 * - #StationID = #StationViewWidgets
338 WC_STATION_VIEW,
341 * Depot view; %Window numbers:
342 * - #TileIndex = #DepotWidgets
344 WC_VEHICLE_DEPOT,
347 * Waypoint view; %Window numbers:
348 * - #WaypointID = #WaypointWidgets
350 WC_WAYPOINT_VIEW,
353 * Industry view; %Window numbers:
354 * - #IndustryID = #IndustryViewWidgets
356 WC_INDUSTRY_VIEW,
359 * Company view; %Window numbers:
360 * - #CompanyID = #CompanyWidgets
362 WC_COMPANY,
366 * Build object; %Window numbers:
367 * - 0 = #BuildObjectWidgets
369 WC_BUILD_OBJECT,
372 * Build vehicle; %Window numbers:
373 * - #VehicleType = #BuildVehicleWidgets
374 * - #TileIndex = #BuildVehicleWidgets
376 WC_BUILD_VEHICLE,
379 * Build bridge; %Window numbers:
380 * - #TransportType = #BuildBridgeSelectionWidgets
382 WC_BUILD_BRIDGE,
385 * Build station; %Window numbers:
386 * - #TRANSPORT_AIR = #AirportPickerWidgets
387 * - #TRANSPORT_WATER = #DockToolbarWidgets
388 * - #TRANSPORT_RAIL = #BuildRailStationWidgets
390 WC_BUILD_STATION,
393 * Build bus station; %Window numbers:
394 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
396 WC_BUS_STATION,
399 * Build truck station; %Window numbers:
400 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
402 WC_TRUCK_STATION,
405 * Build depot; %Window numbers:
406 * - #TRANSPORT_WATER = #BuildDockDepotWidgets
407 * - #TRANSPORT_RAIL = #BuildRailDepotWidgets
408 * - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
410 WC_BUILD_DEPOT,
413 * Build waypoint; %Window numbers:
414 * - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
416 WC_BUILD_WAYPOINT,
419 * Found a town; %Window numbers:
420 * - 0 = #TownFoundingWidgets
422 WC_FOUND_TOWN,
425 * Build industry; %Window numbers:
426 * - 0 = #DynamicPlaceIndustriesWidgets
428 WC_BUILD_INDUSTRY,
432 * Select game window; %Window numbers:
433 * - 0 = #SelectGameIntroWidgets
435 WC_SELECT_GAME,
438 * Landscape generation (in Scenario Editor); %Window numbers:
439 * - 0 = #TerraformToolbarWidgets
440 * - 0 = #EditorTerraformToolbarWidgets
442 WC_SCEN_LAND_GEN,
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
456 WC_MODAL_PROGRESS,
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
466 WC_NETWORK_WINDOW,
469 * Client list; %Window numbers:
470 * - 0 = #ClientListWidgets
472 WC_CLIENT_LIST,
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
491 WC_SEND_NETWORK_MSG,
494 * Company password query; %Window numbers:
495 * - 0 = #NetworkCompanyPasswordWidgets
497 WC_COMPANY_PASSWORD_WINDOW,
501 * Industry cargoes chain; %Window numbers:
502 * - 0 = #IndustryCargoesWidgets
504 WC_INDUSTRY_CARGOES,
507 * Legend for graphs; %Window numbers:
508 * - 0 = #GraphLegendWidgets
510 WC_GRAPH_LEGEND,
513 * Finances of a company; %Window numbers:
514 * - #CompanyID = #CompanyWidgets
516 WC_FINANCES,
519 * Income graph; %Window numbers:
520 * - 0 = #CompanyValueWidgets
522 WC_INCOME_GRAPH,
525 * Operating profit graph; %Window numbers:
526 * - 0 = #CompanyValueWidgets
528 WC_OPERATING_PROFIT,
531 * Delivered cargo graph; %Window numbers:
532 * - 0 = #CompanyValueWidgets
534 WC_DELIVERED_CARGO,
537 * Performance history graph; %Window numbers:
538 * - 0 = #PerformanceHistoryGraphWidgets
540 WC_PERFORMANCE_HISTORY,
543 * Company value graph; %Window numbers:
544 * - 0 = #CompanyValueWidgets
546 WC_COMPANY_VALUE,
549 * Company league window; %Window numbers:
550 * - 0 = #CompanyLeagueWidgets
552 WC_COMPANY_LEAGUE,
555 * Payment rates graph; %Window numbers:
556 * - 0 = #CargoPaymentRatesWidgets
558 WC_PAYMENT_RATES,
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
577 WC_BUY_COMPANY,
580 * Engine preview window; %Window numbers:
581 * - #EngineID = #EnginePreviewWidgets
583 WC_ENGINE_PREVIEW,
587 * Music window; %Window numbers:
588 * - 0 = #MusicWidgets
590 WC_MUSIC_WINDOW,
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
606 WC_GAME_OPTIONS,
609 * Custom currency; %Window numbers:
610 * - 0 = #CustomCurrencyWidgets
612 WC_CUSTOM_CURRENCY,
615 * Cheat window; %Window numbers:
616 * - 0 = #CheatWidgets
618 WC_CHEATS,
621 * Extra viewport; %Window numbers:
622 * - Ascending value = #ExtraViewportWidgets
624 WC_EXTRA_VIEW_PORT,
628 * Console; %Window numbers:
629 * - 0 = #ConsoleWidgets
631 WC_CONSOLE,
634 * Bootstrap; %Window numbers:
635 * - 0 = #BootstrapBackgroundWidgets
637 WC_BOOTSTRAP,
640 * Highscore; %Window numbers:
641 * - 0 = #HighscoreWidgets
643 WC_HIGHSCORE,
646 * Endscreen; %Window numbers:
647 * - 0 = #HighscoreWidgets
649 WC_ENDSCREEN,
653 * AI debug window; %Window numbers:
654 * - 0 = #AIDebugWidgets
656 WC_AI_DEBUG,
659 * NewGRF inspect (debug); %Window numbers:
660 * - Packed value = #NewGRFInspectWidgets
662 WC_NEWGRF_INSPECT,
665 * Sprite aligner (debug); %Window numbers:
666 * - 0 = #SpriteAlignerWidgets
668 WC_SPRITE_ALIGNER,
671 * Linkgraph legend; %Window numbers:
672 * - 0 = #LinkGraphWidgets
674 WC_LINKGRAPH_LEGEND,
677 * Save preset; %Window numbers:
678 * - 0 = #SavePresetWidgets
680 WC_SAVE_PRESET,
683 * Framerate display; %Window numbers:
684 * - 0 = #FramerateDisplayWidgets
686 WC_FRAMERATE_DISPLAY,
689 * Frame time graph; %Window numbers:
690 * - 0 = #FrametimeGraphWindowWidgets
692 WC_FRAMETIME_GRAPH,
695 * Screenshot window; %Window numbers:
696 * - 0 = #ScreenshotWidgets
698 WC_SCREENSHOT,
700 WC_INVALID = 0xFFFF, ///< Invalid window.
703 /** Data value for #Window::OnInvalidateData() of windows with class #WC_GAME_OPTIONS. */
704 enum GameOptionsInvalidationData {
705 GOID_DEFAULT = 0,
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.
711 struct Window;
713 /** Number to differentiate different windows of the same class */
714 typedef int32 WindowNumber;
716 /** State of handling an event. */
717 enum EventState {
718 ES_HANDLED, ///< The passed event is handled.
719 ES_NOT_HANDLED, ///< The passed event is not handled.
722 #endif /* WINDOW_TYPE_H */