src/station_gui.h
author rubidium
Sat, 26 Apr 2008 20:54:56 +0000
branch0.6
changeset 10366 960aae8c20e2
parent 8919 b627c71f9cc3
child 9342 ca61cbfca47a
permissions -rw-r--r--
(svn r12907) [0.6] -Backport from trunk r12906:
- Fix: Vehicle groups, engine replacement rules and player/company names were not properly reset/freed after bankrupt (r12906)
[0.6] -Prepare: for 0.6.1-RC1.
8512
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     1
/* $Id$ */
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     2
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     3
/** @file station_gui.h Contains enums and function declarations connected with stations GUI */
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     4
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     5
#ifndef STATION_GUI_H
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     6
#define STATION_GUI_H
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     7
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     8
/** Enum for PlayerStations, referring to _player_stations_widgets */
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
     9
enum StationListWidgets {
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    10
	SLW_CLOSEBOX       =  0, ///< Close 'X' button
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    11
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    12
	SLW_LIST           =  3, ///< The main panel, list of stations
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    13
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    14
	SLW_TRAIN          =  6, ///< 'TRAIN' button - list only facilities where is a railroad station
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    15
	SLW_TRUCK,
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    16
	SLW_BUS,
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    17
	SLW_AIRPLANE,
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    18
	SLW_SHIP,
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    19
	SLW_FACILALL,            ///< 'ALL' button - list all facilities
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    20
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    21
	SLW_PAN_BETWEEN    = 12, ///< Small panel between list of types of ficilities and list of cargo types
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    22
	SLW_NOCARGOWAITING = 13, ///< 'NO' button - list stations where no cargo is waiting
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    23
	SLW_CARGOALL       = 14, ///< 'ALL' button - list all stations
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    24
	SLW_PAN_RIGHT      = 15, ///< Panel right of list of cargo types
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    25
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    26
	SLW_SORTBY         = 16, ///< 'Sort by' button - reverse sort direction
8834
ef15cacd6894 (svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
peter1138
parents: 8764
diff changeset
    27
	SLW_SORTDROPBTN    = 17, ///< Dropdown button
ef15cacd6894 (svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
peter1138
parents: 8764
diff changeset
    28
	SLW_PAN_SORT_RIGHT = 18, ///< Panel right of sorting options
8512
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    29
8834
ef15cacd6894 (svn r11904) -Codechange: use dropdown widget in 3 more windows, build vehicle, group vehicle list and station list.
peter1138
parents: 8764
diff changeset
    30
	SLW_CARGOSTART     = 19, ///< Widget numbers used for list of cargo types (not present in _player_stations_widgets)
8512
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    31
};
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    32
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    33
/** Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets */
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    34
enum StationViewWidgets {
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    35
	SVW_CLOSEBOX   =  0, ///< Close 'X' button
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    36
	SVW_CAPTION    =  1, ///< Caption of the window
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    37
	SVW_WAITING    =  3, ///< List of waiting cargo
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    38
	SVW_ACCEPTLIST =  5, ///< List of accepted cargos
8916
383cb2ffdb2f (svn r11990) -Codechange: Show all cargo sources (en-route from) in the station view
peter1138
parents: 8834
diff changeset
    39
	SVW_RATINGLIST =  5, ///< Ratings of cargos
383cb2ffdb2f (svn r11990) -Codechange: Show all cargo sources (en-route from) in the station view
peter1138
parents: 8834
diff changeset
    40
	SVW_LOCATION   =  6, ///< 'Location' button
383cb2ffdb2f (svn r11990) -Codechange: Show all cargo sources (en-route from) in the station view
peter1138
parents: 8834
diff changeset
    41
	SVW_RATINGS    =  7, ///< 'Ratings' button
383cb2ffdb2f (svn r11990) -Codechange: Show all cargo sources (en-route from) in the station view
peter1138
parents: 8834
diff changeset
    42
	SVW_ACCEPTS    =  7, ///< 'Accepts' button
383cb2ffdb2f (svn r11990) -Codechange: Show all cargo sources (en-route from) in the station view
peter1138
parents: 8834
diff changeset
    43
	SVW_RENAME     =  8, ///< 'Rename' button
383cb2ffdb2f (svn r11990) -Codechange: Show all cargo sources (en-route from) in the station view
peter1138
parents: 8834
diff changeset
    44
	SVW_TRAINS     =  9, ///< List of scheduled trains button
8512
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    45
	SVW_ROADVEHS,        ///< List of scheduled road vehs button
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    46
	SVW_PLANES,          ///< List of scheduled planes button
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    47
	SVW_SHIPS,           ///< List of scheduled ships button
8916
383cb2ffdb2f (svn r11990) -Codechange: Show all cargo sources (en-route from) in the station view
peter1138
parents: 8834
diff changeset
    48
	SVW_RESIZE,          ///< Resize button
8512
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    49
};
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    50
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    51
/* sorter stuff */
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    52
void RebuildStationLists();
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    53
void ResortStationLists();
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    54
8603
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    55
enum StationCoverageType {
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    56
	SCT_PASSENGERS_ONLY,
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    57
	SCT_NON_PASSENGERS_ONLY,
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    58
	SCT_ALL
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    59
};
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    60
8919
b627c71f9cc3 (svn r11993) -Fix: Resize station/roadstop/dock/airport construction windows if cargo acceptance list is too long.
peter1138
parents: 8916
diff changeset
    61
int DrawStationCoverageAreaText(int sx, int sy, StationCoverageType sct, int rad);
8603
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    62
void CheckRedrawStationCoverage(const Window *w);
88c5ce6a5215 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found.
rubidium
parents: 8512
diff changeset
    63
8764
65746a5248ec (svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents: 8603
diff changeset
    64
extern bool _station_show_coverage;
65746a5248ec (svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents: 8603
diff changeset
    65
8512
e77c8fb7c0ed (svn r11576) -Codechange: enumerize and comment station GUI
smatz
parents:
diff changeset
    66
#endif /* STATION_GUI_H */