Translations update
[openttd/fttd.git] / src / window_type.h
blob82bd99b1284d040ceb475b116e51ba2fc2a9c62d
1 /* $Id$ */
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 */
10 /** @file window_type.h Types related to windows */
12 #ifndef WINDOW_TYPE_H
13 #define WINDOW_TYPE_H
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. */
39 enum WindowClass {
40 WC_NONE, ///< No window, redirects to WC_MAIN_WINDOW.
42 /**
43 * Main window; %Window numbers:
44 * - 0 = #MainWidgets
46 WC_MAIN_WINDOW = WC_NONE,
48 /**
49 * Main toolbar (the long bar at the top); %Window numbers:
50 * - 0 = #ToolbarNormalWidgets
51 * - 0 = #ToolbarEditorWidgets
53 WC_MAIN_TOOLBAR,
55 /**
56 * Statusbar (at the bottom of your screen); %Window numbers:
57 * - 0 = #StatusbarWidgets
59 WC_STATUS_BAR,
61 /**
62 * Build toolbar; %Window numbers:
63 * - #TRANSPORT_RAIL = #RailToolbarWidgets
64 * - #TRANSPORT_AIR = #AirportToolbarWidgets
65 * - #TRANSPORT_WATER = #DockToolbarWidgets
66 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
68 WC_BUILD_TOOLBAR,
70 /**
71 * Scenario build toolbar; %Window numbers:
72 * - #TRANSPORT_WATER = #DockToolbarWidgets
73 * - #TRANSPORT_ROAD = #RoadToolbarWidgets
75 WC_SCEN_BUILD_TOOLBAR,
77 /**
78 * Build trees toolbar; %Window numbers:
79 * - 0 = #BuildTreesWidgets
81 WC_BUILD_TREES,
83 /**
84 * Transparency toolbar; %Window numbers:
85 * - 0 = #TransparencyToolbarWidgets
87 WC_TRANSPARENCY_TOOLBAR,
89 /**
90 * Build signal toolbar; %Window numbers:
91 * - #TRANSPORT_RAIL = #BuildSignalWidgets
93 WC_BUILD_SIGNAL,
95 /**
96 * Small map; %Window numbers:
97 * - 0 = #SmallMapWidgets
99 WC_SMALLMAP,
102 * Error message; %Window numbers:
103 * - 0 = #ErrorMessageWidgets
105 WC_ERRMSG,
108 * Tooltip window; %Window numbers:
109 * - 0 = #ToolTipsWidgets
111 WC_TOOLTIPS,
114 * Query string window; %Window numbers:
115 * - #WN_QUERY_STRING = #QueryStringWidgets
116 * - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
118 WC_QUERY_STRING,
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
132 WC_GOAL_QUESTION,
136 * Saveload window; %Window numbers:
137 * - 0 = #SaveLoadWidgets
139 WC_SAVELOAD,
142 * Land info window; %Window numbers:
143 * - 0 = #LandInfoWidgets
145 WC_LAND_INFO,
148 * Drop down menu; %Window numbers:
149 * - 0 = #DropdownMenuWidgets
151 WC_DROPDOWN_MENU,
154 * On Screen Keyboard; %Window numbers:
155 * - 0 = #OnScreenKeyboardWidgets
157 WC_OSK,
160 * Set date; %Window numbers:
161 * - #VehicleID = #SetDateWidgets
163 WC_SET_DATE,
167 * AI settings; %Window numbers:
168 * - 0 = #AISettingsWidgets
170 WC_AI_SETTINGS,
173 * NewGRF parameters; %Window numbers:
174 * - 0 = #NewGRFParametersWidgets
176 WC_GRF_PARAMETERS,
179 * textfile; %Window numbers:
180 * - 0 = #TextfileWidgets
182 WC_TEXTFILE,
186 * Town authority; %Window numbers:
187 * - #TownID = #TownAuthorityWidgets
189 WC_TOWN_AUTHORITY,
192 * Vehicle details; %Window numbers:
193 * - #VehicleID = #VehicleDetailsWidgets
195 WC_VEHICLE_DETAILS,
198 * Vehicle refit; %Window numbers:
199 * - #VehicleID = #VehicleRefitWidgets
201 WC_VEHICLE_REFIT,
204 * Vehicle orders; %Window numbers:
205 * - #VehicleID = #OrderWidgets
207 WC_VEHICLE_ORDERS,
210 * Replace vehicle window; %Window numbers:
211 * - #VehicleType = #ReplaceVehicleWidgets
213 WC_REPLACE_VEHICLE,
216 * Vehicle timetable; %Window numbers:
217 * - #VehicleID = #VehicleTimetableWidgets
219 WC_VEHICLE_TIMETABLE,
222 * Company colour selection; %Window numbers:
223 * - #CompanyID = #SelectCompanyLiveryWidgets
225 WC_COMPANY_COLOUR,
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
237 WC_SELECT_STATION,
240 * Select town (when placing a house); %Window numbers:
241 * - 0 = #SelectTownWidgets
243 WC_SELECT_TOWN,
246 * News window; %Window numbers:
247 * - 0 = #NewsWidgets
249 WC_NEWS_WINDOW,
252 * Town directory; %Window numbers:
253 * - 0 = #TownDirectoryWidgets
255 WC_TOWN_DIRECTORY,
258 * Subsidies list; %Window numbers:
259 * - 0 = #SubsidyListWidgets
261 WC_SUBSIDIES_LIST,
264 * Industry directory; %Window numbers:
265 * - 0 = #IndustryDirectoryWidgets
267 WC_INDUSTRY_DIRECTORY,
270 * News history list; %Window numbers:
271 * - 0 = #MessageHistoryWidgets
273 WC_MESSAGE_HISTORY,
276 * Sign list; %Window numbers:
277 * - 0 = #SignListWidgets
279 WC_SIGN_LIST,
282 * AI list; %Window numbers:
283 * - 0 = #AIListWidgets
285 WC_AI_LIST,
288 * Goals list; %Window numbers:
289 * - 0 ; #GoalListWidgets
291 WC_GOALS_LIST,
294 * Story book; %Window numbers:
295 * - CompanyID = #StoryBookWidgets
297 WC_STORY_BOOK,
300 * Station list; %Window numbers:
301 * - #CompanyID = #StationListWidgets
303 WC_STATION_LIST,
306 * Trains list; %Window numbers:
307 * - Packed value = #GroupListWidgets / #VehicleListWidgets
309 WC_TRAINS_LIST,
312 * Road vehicle list; %Window numbers:
313 * - Packed value = #GroupListWidgets / #VehicleListWidgets
315 WC_ROADVEH_LIST,
318 * Ships list; %Window numbers:
319 * - Packed value = #GroupListWidgets / #VehicleListWidgets
321 WC_SHIPS_LIST,
324 * Aircraft list; %Window numbers:
325 * - Packed value = #GroupListWidgets / #VehicleListWidgets
327 WC_AIRCRAFT_LIST,
331 * Town view; %Window numbers:
332 * - #TownID = #TownViewWidgets
334 WC_TOWN_VIEW,
337 * Vehicle view; %Window numbers:
338 * - #VehicleID = #VehicleViewWidgets
340 WC_VEHICLE_VIEW,
343 * Station view; %Window numbers:
344 * - #StationID = #StationViewWidgets
346 WC_STATION_VIEW,
349 * Depot view; %Window numbers:
350 * - #TileIndex = #DepotWidgets
352 WC_VEHICLE_DEPOT,
355 * Waypoint view; %Window numbers:
356 * - #WaypointID = #WaypointWidgets
358 WC_WAYPOINT_VIEW,
361 * Industry view; %Window numbers:
362 * - #IndustryID = #IndustryViewWidgets
364 WC_INDUSTRY_VIEW,
367 * Company view; %Window numbers:
368 * - #CompanyID = #CompanyWidgets
370 WC_COMPANY,
374 * Build object; %Window numbers:
375 * - 0 = #BuildObjectWidgets
377 WC_BUILD_OBJECT,
380 * Build house; %Window numbers:
381 * - 0 = #BuildHouseWidgets
383 WC_BUILD_HOUSE,
386 * Build vehicle; %Window numbers:
387 * - #VehicleType = #BuildVehicleWidgets
388 * - #TileIndex = #BuildVehicleWidgets
390 WC_BUILD_VEHICLE,
393 * Build bridge; %Window numbers:
394 * - #TransportType = #BuildBridgeSelectionWidgets
396 WC_BUILD_BRIDGE,
399 * Build station; %Window numbers:
400 * - #TRANSPORT_AIR = #AirportPickerWidgets
401 * - #TRANSPORT_WATER = #DockToolbarWidgets
402 * - #TRANSPORT_RAIL = #BuildRailStationWidgets
404 WC_BUILD_STATION,
407 * Build bus station; %Window numbers:
408 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
410 WC_BUS_STATION,
413 * Build truck station; %Window numbers:
414 * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
416 WC_TRUCK_STATION,
419 * Build depot; %Window numbers:
420 * - #TRANSPORT_WATER = #BuildDockDepotWidgets
421 * - #TRANSPORT_RAIL = #BuildRailDepotWidgets
422 * - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
424 WC_BUILD_DEPOT,
427 * Build waypoint; %Window numbers:
428 * - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
430 WC_BUILD_WAYPOINT,
433 * Found a town; %Window numbers:
434 * - 0 = #TownFoundingWidgets
436 WC_FOUND_TOWN,
439 * Build industry; %Window numbers:
440 * - 0 = #DynamicPlaceIndustriesWidgets
442 WC_BUILD_INDUSTRY,
446 * Select game window; %Window numbers:
447 * - 0 = #SelectGameIntroWidgets
449 WC_SELECT_GAME,
452 * Landscape generation (in Scenario Editor); %Window numbers:
453 * - 0 = #TerraformToolbarWidgets
454 * - 0 = #EditorTerraformToolbarWidgets
456 WC_SCEN_LAND_GEN,
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
470 WC_MODAL_PROGRESS,
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
480 WC_NETWORK_WINDOW,
483 * Client list; %Window numbers:
484 * - 0 = #ClientListWidgets
486 WC_CLIENT_LIST,
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
505 WC_SEND_NETWORK_MSG,
508 * Company password query; %Window numbers:
509 * - 0 = #NetworkCompanyPasswordWidgets
511 WC_COMPANY_PASSWORD_WINDOW,
515 * Industry cargoes chain; %Window numbers:
516 * - 0 = #IndustryCargoesWidgets
518 WC_INDUSTRY_CARGOES,
521 * Legend for graphs; %Window numbers:
522 * - 0 = #GraphLegendWidgets
524 WC_GRAPH_LEGEND,
527 * Finances of a company; %Window numbers:
528 * - #CompanyID = #CompanyWidgets
530 WC_FINANCES,
533 * Income graph; %Window numbers:
534 * - 0 = #CompanyValueWidgets
536 WC_INCOME_GRAPH,
539 * Operating profit graph; %Window numbers:
540 * - 0 = #CompanyValueWidgets
542 WC_OPERATING_PROFIT,
545 * Delivered cargo graph; %Window numbers:
546 * - 0 = #CompanyValueWidgets
548 WC_DELIVERED_CARGO,
551 * Performance history graph; %Window numbers:
552 * - 0 = #PerformanceHistoryGraphWidgets
554 WC_PERFORMANCE_HISTORY,
557 * Company value graph; %Window numbers:
558 * - 0 = #CompanyValueWidgets
560 WC_COMPANY_VALUE,
563 * Company league window; %Window numbers:
564 * - 0 = #CompanyLeagueWidgets
566 WC_COMPANY_LEAGUE,
569 * Payment rates graph; %Window numbers:
570 * - 0 = #CargoPaymentRatesWidgets
572 WC_PAYMENT_RATES,
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
591 WC_BUY_COMPANY,
594 * Engine preview window; %Window numbers:
595 * - #EngineID = #EnginePreviewWidgets
597 WC_ENGINE_PREVIEW,
601 * Music window; %Window numbers:
602 * - 0 = #MusicWidgets
604 WC_MUSIC_WINDOW,
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
620 WC_GAME_OPTIONS,
623 * Custom currency; %Window numbers:
624 * - 0 = #CustomCurrencyWidgets
626 WC_CUSTOM_CURRENCY,
629 * Cheat window; %Window numbers:
630 * - 0 = #CheatWidgets
632 WC_CHEATS,
635 * Extra viewport; %Window numbers:
636 * - Ascending value = #ExtraViewportWidgets
638 WC_EXTRA_VIEW_PORT,
642 * Console; %Window numbers:
643 * - 0 = #ConsoleWidgets
645 WC_CONSOLE,
648 * Bootstrap; %Window numbers:
649 * - 0 = #BootstrapBackgroundWidgets
651 WC_BOOTSTRAP,
654 * Highscore; %Window numbers:
655 * - 0 = #HighscoreWidgets
657 WC_HIGHSCORE,
660 * Endscreen; %Window numbers:
661 * - 0 = #HighscoreWidgets
663 WC_ENDSCREEN,
667 * AI debug window; %Window numbers:
668 * - 0 = #AIDebugWidgets
670 WC_AI_DEBUG,
673 * NewGRF inspect (debug); %Window numbers:
674 * - Packed value = #NewGRFInspectWidgets
676 WC_NEWGRF_INSPECT,
679 * Sprite aligner (debug); %Window numbers:
680 * - 0 = #SpriteAlignerWidgets
682 WC_SPRITE_ALIGNER,
685 * Linkgraph legend; %Window numbers:
686 * - 0 = #LinkGraphWidgets
688 WC_LINKGRAPH_LEGEND,
691 * Save preset; %Window numbers:
692 * - 0 = #SavePresetWidgets
694 WC_SAVE_PRESET,
696 WC_INVALID = 0xFFFF, ///< Invalid window.
699 /** Data value for #Window::OnInvalidateData() of windows with class #WC_GAME_OPTIONS. */
700 enum GameOptionsInvalidationData {
701 GOID_DEFAULT = 0,
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.
707 struct Window;
709 /** Number to differentiate different windows of the same class */
710 typedef int32 WindowNumber;
712 /** State of handling an event. */
713 enum EventState {
714 ES_HANDLED, ///< The passed event is handled.
715 ES_NOT_HANDLED, ///< The passed event is not handled.
718 #endif /* WINDOW_TYPE_H */