Files
@ r22682:df062b06a164
Branch filter:
Location: cpp/openttd-patchpack/source/src/window_type.h
r22682:df062b06a164
14.4 KiB
text/x-c
(svn r27903) -Update from Eints:
vietnamese: 37 changes by myquartz
vietnamese: 37 changes by myquartz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 | /* $Id$ */
/*
* This file is part of OpenTTD.
* 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.
* 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.
* 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/>.
*/
/** @file window_type.h Types related to windows */
#ifndef WINDOW_TYPE_H
#define WINDOW_TYPE_H
/** %Window numbers. */
enum WindowNumberEnum {
WN_GAME_OPTIONS_AI = 0, ///< AI settings.
WN_GAME_OPTIONS_ABOUT, ///< About window.
WN_GAME_OPTIONS_NEWGRF_STATE, ///< NewGRF settings.
WN_GAME_OPTIONS_GAME_OPTIONS, ///< Game options.
WN_GAME_OPTIONS_GAME_SETTINGS, ///< Game settings.
WN_QUERY_STRING = 0, ///< Query string.
WN_QUERY_STRING_SIGN, ///< Query string for signs.
WN_CONFIRM_POPUP_QUERY = 0, ///< Query popup confirm.
WN_CONFIRM_POPUP_QUERY_BOOTSTRAP, ///< Query popup confirm for bootstrap.
WN_NETWORK_WINDOW_GAME = 0, ///< Network game window.
WN_NETWORK_WINDOW_LOBBY, ///< Network lobby window.
WN_NETWORK_WINDOW_CONTENT_LIST, ///< Network content list.
WN_NETWORK_WINDOW_START, ///< Network start server.
WN_NETWORK_STATUS_WINDOW_JOIN = 0, ///< Network join status.
WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD, ///< Network content download status.
};
/** %Window classes. */
enum WindowClass {
WC_NONE, ///< No window, redirects to WC_MAIN_WINDOW.
/**
* Main window; %Window numbers:
* - 0 = #MainWidgets
*/
WC_MAIN_WINDOW = WC_NONE,
/**
* Main toolbar (the long bar at the top); %Window numbers:
* - 0 = #ToolbarNormalWidgets
* - 0 = #ToolbarEditorWidgets
*/
WC_MAIN_TOOLBAR,
/**
* Statusbar (at the bottom of your screen); %Window numbers:
* - 0 = #StatusbarWidgets
*/
WC_STATUS_BAR,
/**
* Build toolbar; %Window numbers:
* - #TRANSPORT_RAIL = #RailToolbarWidgets
* - #TRANSPORT_AIR = #AirportToolbarWidgets
* - #TRANSPORT_WATER = #DockToolbarWidgets
* - #TRANSPORT_ROAD = #RoadToolbarWidgets
*/
WC_BUILD_TOOLBAR,
/**
* Scenario build toolbar; %Window numbers:
* - #TRANSPORT_WATER = #DockToolbarWidgets
* - #TRANSPORT_ROAD = #RoadToolbarWidgets
*/
WC_SCEN_BUILD_TOOLBAR,
/**
* Build trees toolbar; %Window numbers:
* - 0 = #BuildTreesWidgets
*/
WC_BUILD_TREES,
/**
* Transparency toolbar; %Window numbers:
* - 0 = #TransparencyToolbarWidgets
*/
WC_TRANSPARENCY_TOOLBAR,
/**
* Build signal toolbar; %Window numbers:
* - #TRANSPORT_RAIL = #BuildSignalWidgets
*/
WC_BUILD_SIGNAL,
/**
* Small map; %Window numbers:
* - 0 = #SmallMapWidgets
*/
WC_SMALLMAP,
/**
* Error message; %Window numbers:
* - 0 = #ErrorMessageWidgets
*/
WC_ERRMSG,
/**
* Tooltip window; %Window numbers:
* - 0 = #ToolTipsWidgets
*/
WC_TOOLTIPS,
/**
* Query string window; %Window numbers:
* - #WN_QUERY_STRING = #QueryStringWidgets
* - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
*/
WC_QUERY_STRING,
/**
* Popup with confirm question; %Window numbers:
* - #WN_CONFIRM_POPUP_QUERY = #QueryWidgets
* - #WN_CONFIRM_POPUP_QUERY_BOOTSTRAP = #BootstrapAskForDownloadWidgets
*/
WC_CONFIRM_POPUP_QUERY,
/**
* Popup with a set of buttons, designed to ask the user a question
* from a GameScript. %Window numbers:
* - uniqueid = #GoalQuestionWidgets
*/
WC_GOAL_QUESTION,
/**
* Saveload window; %Window numbers:
* - 0 = #SaveLoadWidgets
*/
WC_SAVELOAD,
/**
* Land info window; %Window numbers:
* - 0 = #LandInfoWidgets
*/
WC_LAND_INFO,
/**
* Drop down menu; %Window numbers:
* - 0 = #DropdownMenuWidgets
*/
WC_DROPDOWN_MENU,
/**
* On Screen Keyboard; %Window numbers:
* - 0 = #OnScreenKeyboardWidgets
*/
WC_OSK,
/**
* Set date; %Window numbers:
* - #VehicleID = #SetDateWidgets
*/
WC_SET_DATE,
/**
* AI settings; %Window numbers:
* - 0 = #AISettingsWidgets
*/
WC_AI_SETTINGS,
/**
* NewGRF parameters; %Window numbers:
* - 0 = #NewGRFParametersWidgets
*/
WC_GRF_PARAMETERS,
/**
* textfile; %Window numbers:
* - 0 = #TextfileWidgets
*/
WC_TEXTFILE,
/**
* Town authority; %Window numbers:
* - #TownID = #TownAuthorityWidgets
*/
WC_TOWN_AUTHORITY,
/**
* Vehicle details; %Window numbers:
* - #VehicleID = #VehicleDetailsWidgets
*/
WC_VEHICLE_DETAILS,
/**
* Vehicle refit; %Window numbers:
* - #VehicleID = #VehicleRefitWidgets
*/
WC_VEHICLE_REFIT,
/**
* Vehicle orders; %Window numbers:
* - #VehicleID = #OrderWidgets
*/
WC_VEHICLE_ORDERS,
/**
* Replace vehicle window; %Window numbers:
* - #VehicleType = #ReplaceVehicleWidgets
*/
WC_REPLACE_VEHICLE,
/**
* Vehicle timetable; %Window numbers:
* - #VehicleID = #VehicleTimetableWidgets
*/
WC_VEHICLE_TIMETABLE,
/**
* Company colour selection; %Window numbers:
* - #CompanyID = #SelectCompanyLiveryWidgets
*/
WC_COMPANY_COLOUR,
/**
* Alter company face window; %Window numbers:
* - #CompanyID = #SelectCompanyManagerFaceWidgets
*/
WC_COMPANY_MANAGER_FACE,
/**
* Select station (when joining stations); %Window numbers:
* - 0 = #JoinStationWidgets
*/
WC_SELECT_STATION,
/**
* News window; %Window numbers:
* - 0 = #NewsWidgets
*/
WC_NEWS_WINDOW,
/**
* Town directory; %Window numbers:
* - 0 = #TownDirectoryWidgets
*/
WC_TOWN_DIRECTORY,
/**
* Subsidies list; %Window numbers:
* - 0 = #SubsidyListWidgets
*/
WC_SUBSIDIES_LIST,
/**
* Industry directory; %Window numbers:
* - 0 = #IndustryDirectoryWidgets
*/
WC_INDUSTRY_DIRECTORY,
/**
* News history list; %Window numbers:
* - 0 = #MessageHistoryWidgets
*/
WC_MESSAGE_HISTORY,
/**
* Sign list; %Window numbers:
* - 0 = #SignListWidgets
*/
WC_SIGN_LIST,
/**
* AI list; %Window numbers:
* - 0 = #AIListWidgets
*/
WC_AI_LIST,
/**
* Goals list; %Window numbers:
* - 0 ; #GoalListWidgets
*/
WC_GOALS_LIST,
/**
* Story book; %Window numbers:
* - CompanyID = #StoryBookWidgets
*/
WC_STORY_BOOK,
/**
* Station list; %Window numbers:
* - #CompanyID = #StationListWidgets
*/
WC_STATION_LIST,
/**
* Trains list; %Window numbers:
* - Packed value = #GroupListWidgets / #VehicleListWidgets
*/
WC_TRAINS_LIST,
/**
* Road vehicle list; %Window numbers:
* - Packed value = #GroupListWidgets / #VehicleListWidgets
*/
WC_ROADVEH_LIST,
/**
* Ships list; %Window numbers:
* - Packed value = #GroupListWidgets / #VehicleListWidgets
*/
WC_SHIPS_LIST,
/**
* Aircraft list; %Window numbers:
* - Packed value = #GroupListWidgets / #VehicleListWidgets
*/
WC_AIRCRAFT_LIST,
/**
* Town view; %Window numbers:
* - #TownID = #TownViewWidgets
*/
WC_TOWN_VIEW,
/**
* Vehicle view; %Window numbers:
* - #VehicleID = #VehicleViewWidgets
*/
WC_VEHICLE_VIEW,
/**
* Station view; %Window numbers:
* - #StationID = #StationViewWidgets
*/
WC_STATION_VIEW,
/**
* Depot view; %Window numbers:
* - #TileIndex = #DepotWidgets
*/
WC_VEHICLE_DEPOT,
/**
* Waypoint view; %Window numbers:
* - #WaypointID = #WaypointWidgets
*/
WC_WAYPOINT_VIEW,
/**
* Industry view; %Window numbers:
* - #IndustryID = #IndustryViewWidgets
*/
WC_INDUSTRY_VIEW,
/**
* Company view; %Window numbers:
* - #CompanyID = #CompanyWidgets
*/
WC_COMPANY,
/**
* Build object; %Window numbers:
* - 0 = #BuildObjectWidgets
*/
WC_BUILD_OBJECT,
/**
* Build vehicle; %Window numbers:
* - #VehicleType = #BuildVehicleWidgets
* - #TileIndex = #BuildVehicleWidgets
*/
WC_BUILD_VEHICLE,
/**
* Build bridge; %Window numbers:
* - #TransportType = #BuildBridgeSelectionWidgets
*/
WC_BUILD_BRIDGE,
/**
* Build station; %Window numbers:
* - #TRANSPORT_AIR = #AirportPickerWidgets
* - #TRANSPORT_WATER = #DockToolbarWidgets
* - #TRANSPORT_RAIL = #BuildRailStationWidgets
*/
WC_BUILD_STATION,
/**
* Build bus station; %Window numbers:
* - #TRANSPORT_ROAD = #BuildRoadStationWidgets
*/
WC_BUS_STATION,
/**
* Build truck station; %Window numbers:
* - #TRANSPORT_ROAD = #BuildRoadStationWidgets
*/
WC_TRUCK_STATION,
/**
* Build depot; %Window numbers:
* - #TRANSPORT_WATER = #BuildDockDepotWidgets
* - #TRANSPORT_RAIL = #BuildRailDepotWidgets
* - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
*/
WC_BUILD_DEPOT,
/**
* Build waypoint; %Window numbers:
* - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
*/
WC_BUILD_WAYPOINT,
/**
* Found a town; %Window numbers:
* - 0 = #TownFoundingWidgets
*/
WC_FOUND_TOWN,
/**
* Build industry; %Window numbers:
* - 0 = #DynamicPlaceIndustriesWidgets
*/
WC_BUILD_INDUSTRY,
/**
* Select game window; %Window numbers:
* - 0 = #SelectGameIntroWidgets
*/
WC_SELECT_GAME,
/**
* Landscape generation (in Scenario Editor); %Window numbers:
* - 0 = #TerraformToolbarWidgets
* - 0 = #EditorTerraformToolbarWidgets
*/
WC_SCEN_LAND_GEN,
/**
* Generate landscape (newgame); %Window numbers:
* - GLWM_SCENARIO = #CreateScenarioWidgets
* - #GenerateLandscapeWindowMode = #GenerateLandscapeWidgets
*/
WC_GENERATE_LANDSCAPE,
/**
* Progress report of landscape generation; %Window numbers:
* - 0 = #GenerationProgressWidgets
* - 1 = #ScanProgressWidgets
*/
WC_MODAL_PROGRESS,
/**
* Network window; %Window numbers:
* - #WN_NETWORK_WINDOW_GAME = #NetworkGameWidgets
* - #WN_NETWORK_WINDOW_LOBBY = #NetworkLobbyWidgets
* - #WN_NETWORK_WINDOW_CONTENT_LIST = #NetworkContentListWidgets
* - #WN_NETWORK_WINDOW_START = #NetworkStartServerWidgets
*/
WC_NETWORK_WINDOW,
/**
* Client list; %Window numbers:
* - 0 = #ClientListWidgets
*/
WC_CLIENT_LIST,
/**
* Popup for the client list; %Window numbers:
* - #ClientID = #ClientListPopupWidgets
*/
WC_CLIENT_LIST_POPUP,
/**
* Network status window; %Window numbers:
* - #WN_NETWORK_STATUS_WINDOW_JOIN = #NetworkJoinStatusWidgets
* - #WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD = #NetworkContentDownloadStatusWidgets
*/
WC_NETWORK_STATUS_WINDOW,
/**
* Chatbox; %Window numbers:
* - #DestType = #NetWorkChatWidgets
*/
WC_SEND_NETWORK_MSG,
/**
* Company password query; %Window numbers:
* - 0 = #NetworkCompanyPasswordWidgets
*/
WC_COMPANY_PASSWORD_WINDOW,
/**
* Industry cargoes chain; %Window numbers:
* - 0 = #IndustryCargoesWidgets
*/
WC_INDUSTRY_CARGOES,
/**
* Legend for graphs; %Window numbers:
* - 0 = #GraphLegendWidgets
*/
WC_GRAPH_LEGEND,
/**
* Finances of a company; %Window numbers:
* - #CompanyID = #CompanyWidgets
*/
WC_FINANCES,
/**
* Income graph; %Window numbers:
* - 0 = #CompanyValueWidgets
*/
WC_INCOME_GRAPH,
/**
* Operating profit graph; %Window numbers:
* - 0 = #CompanyValueWidgets
*/
WC_OPERATING_PROFIT,
/**
* Delivered cargo graph; %Window numbers:
* - 0 = #CompanyValueWidgets
*/
WC_DELIVERED_CARGO,
/**
* Performance history graph; %Window numbers:
* - 0 = #PerformanceHistoryGraphWidgets
*/
WC_PERFORMANCE_HISTORY,
/**
* Company value graph; %Window numbers:
* - 0 = #CompanyValueWidgets
*/
WC_COMPANY_VALUE,
/**
* Company league window; %Window numbers:
* - 0 = #CompanyLeagueWidgets
*/
WC_COMPANY_LEAGUE,
/**
* Payment rates graph; %Window numbers:
* - 0 = #CargoPaymentRatesWidgets
*/
WC_PAYMENT_RATES,
/**
* Performance detail window; %Window numbers:
* - 0 = #PerformanceRatingDetailsWidgets
*/
WC_PERFORMANCE_DETAIL,
/**
* Company infrastructure overview; %Window numbers:
* - #CompanyID = #CompanyInfrastructureWidgets
*/
WC_COMPANY_INFRASTRUCTURE,
/**
* Buyout company (merger); %Window numbers:
* - #CompanyID = #BuyCompanyWidgets
*/
WC_BUY_COMPANY,
/**
* Engine preview window; %Window numbers:
* - #EngineID = #EnginePreviewWidgets
*/
WC_ENGINE_PREVIEW,
/**
* Music window; %Window numbers:
* - 0 = #MusicWidgets
*/
WC_MUSIC_WINDOW,
/**
* Music track selection; %Window numbers:
* - 0 = MusicTrackSelectionWidgets
*/
WC_MUSIC_TRACK_SELECTION,
/**
* Game options window; %Window numbers:
* - #WN_GAME_OPTIONS_AI = #AIConfigWidgets
* - #WN_GAME_OPTIONS_ABOUT = #AboutWidgets
* - #WN_GAME_OPTIONS_NEWGRF_STATE = #NewGRFStateWidgets
* - #WN_GAME_OPTIONS_GAME_OPTIONS = #GameOptionsWidgets
* - #WN_GAME_OPTIONS_GAME_SETTINGS = #GameSettingsWidgets
*/
WC_GAME_OPTIONS,
/**
* Custom currency; %Window numbers:
* - 0 = #CustomCurrencyWidgets
*/
WC_CUSTOM_CURRENCY,
/**
* Cheat window; %Window numbers:
* - 0 = #CheatWidgets
*/
WC_CHEATS,
/**
* Extra viewport; %Window numbers:
* - Ascending value = #ExtraViewportWidgets
*/
WC_EXTRA_VIEW_PORT,
/**
* Console; %Window numbers:
* - 0 = #ConsoleWidgets
*/
WC_CONSOLE,
/**
* Bootstrap; %Window numbers:
* - 0 = #BootstrapBackgroundWidgets
*/
WC_BOOTSTRAP,
/**
* Highscore; %Window numbers:
* - 0 = #HighscoreWidgets
*/
WC_HIGHSCORE,
/**
* Endscreen; %Window numbers:
* - 0 = #HighscoreWidgets
*/
WC_ENDSCREEN,
/**
* AI debug window; %Window numbers:
* - 0 = #AIDebugWidgets
*/
WC_AI_DEBUG,
/**
* NewGRF inspect (debug); %Window numbers:
* - Packed value = #NewGRFInspectWidgets
*/
WC_NEWGRF_INSPECT,
/**
* Sprite aligner (debug); %Window numbers:
* - 0 = #SpriteAlignerWidgets
*/
WC_SPRITE_ALIGNER,
/**
* Linkgraph legend; %Window numbers:
* - 0 = #LinkGraphWidgets
*/
WC_LINKGRAPH_LEGEND,
/**
* Save preset; %Window numbers:
* - 0 = #SavePresetWidgets
*/
WC_SAVE_PRESET,
WC_INVALID = 0xFFFF, ///< Invalid window.
};
/** Data value for #Window::OnInvalidateData() of windows with class #WC_GAME_OPTIONS. */
enum GameOptionsInvalidationData {
GOID_DEFAULT = 0,
GOID_NEWGRF_RESCANNED, ///< NewGRFs were just rescanned.
GOID_NEWGRF_LIST_EDITED, ///< List of active NewGRFs is being edited.
GOID_NEWGRF_PRESET_LOADED, ///< A NewGRF preset was picked.
};
struct Window;
/** Number to differentiate different windows of the same class */
typedef int32 WindowNumber;
/** State of handling an event. */
enum EventState {
ES_HANDLED, ///< The passed event is handled.
ES_NOT_HANDLED, ///< The passed event is not handled.
};
#endif /* WINDOW_TYPE_H */
|