author | tron |
Sun, 16 Oct 2005 09:13:04 +0000 | |
changeset 2520 | 75eb66d6e371 |
parent 2475 | 8443e1eefe1b |
child 2549 | f1d3b383d557 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
0 | 3 |
#ifndef GUI_H |
4 |
#define GUI_H |
|
5 |
||
2466
2774132ebb9a
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
tron
parents:
2261
diff
changeset
|
6 |
#include "station.h" |
175
d6cccece959a
(svn r176) -Fix: network_gui const and warnings fixes (Tron)
darkvater
parents:
164
diff
changeset
|
7 |
#include "window.h" |
d6cccece959a
(svn r176) -Fix: network_gui const and warnings fixes (Tron)
darkvater
parents:
164
diff
changeset
|
8 |
|
0 | 9 |
/* main_gui.c */ |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
10 |
void SetupColorsAndInitialWindow(void); |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
11 |
void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
12 |
void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
13 |
void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2); |
0 | 14 |
|
15 |
/* settings_gui.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
16 |
void ShowGameOptions(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
17 |
void ShowGameDifficulty(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
18 |
void ShowPatchesSelection(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
19 |
void ShowNewgrf(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
20 |
void ShowCustCurrency(void); |
0 | 21 |
|
22 |
/* graph_gui.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
23 |
void ShowOperatingProfitGraph(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
24 |
void ShowIncomeGraph(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
25 |
void ShowDeliveredCargoGraph(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
26 |
void ShowPerformanceHistoryGraph(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
27 |
void ShowCompanyValueGraph(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
28 |
void ShowCargoPaymentRates(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
29 |
void ShowCompanyLeagueTable(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
30 |
void ShowPerformanceRatingDetail(void); |
0 | 31 |
|
32 |
/* news_gui.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
33 |
void ShowLastNewsMessage(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
34 |
void ShowMessageOptions(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
35 |
void ShowMessageHistory(void); |
0 | 36 |
|
37 |
/* traintoolb_gui.c */ |
|
2520
75eb66d6e371
(svn r3049) Replace byte/int/uint by RailType where appropriate
tron
parents:
2475
diff
changeset
|
38 |
void ShowBuildRailToolbar(RailType railtype, int button); |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
39 |
void PlaceProc_BuyLand(TileIndex tile); |
0 | 40 |
|
41 |
/* train_gui.c */ |
|
2466
2774132ebb9a
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
tron
parents:
2261
diff
changeset
|
42 |
void ShowPlayerTrains(PlayerID player, StationID station); |
0 | 43 |
void ShowTrainViewWindow(Vehicle *v); |
44 |
void ShowTrainDetailsWindow(Vehicle *v); |
|
45 |
void ShowOrdersWindow(Vehicle *v); |
|
46 |
||
47 |
void ShowRoadVehViewWindow(Vehicle *v); |
|
48 |
||
49 |
/* road_gui.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
50 |
void ShowBuildRoadToolbar(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
51 |
void ShowBuildRoadScenToolbar(void); |
2466
2774132ebb9a
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
tron
parents:
2261
diff
changeset
|
52 |
void ShowPlayerRoadVehicles(PlayerID player, StationID station); |
0 | 53 |
|
54 |
/* dock_gui.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
55 |
void ShowBuildDocksToolbar(void); |
2466
2774132ebb9a
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
tron
parents:
2261
diff
changeset
|
56 |
void ShowPlayerShips(PlayerID player, StationID station); |
0 | 57 |
|
58 |
void ShowShipViewWindow(Vehicle *v); |
|
59 |
||
60 |
/* aircraft_gui.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
61 |
void ShowBuildAirToolbar(void); |
2466
2774132ebb9a
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
tron
parents:
2261
diff
changeset
|
62 |
void ShowPlayerAircraft(PlayerID player, StationID station); |
0 | 63 |
|
64 |
/* terraform_gui.c */ |
|
1632
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
65 |
void ShowTerraformToolbar(void); |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
66 |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
67 |
void PlaceProc_DemolishArea(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
68 |
void PlaceProc_LowerLand(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
69 |
void PlaceProc_RaiseLand(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
70 |
void PlaceProc_LevelLand(TileIndex tile); |
1632
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
71 |
bool GUIPlaceProcDragXY(const WindowEvent *we); |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
72 |
|
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
73 |
enum { // max 32 - 4 = 28 types |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
74 |
GUI_PlaceProc_DemolishArea = 0 << 4, |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
75 |
GUI_PlaceProc_LevelArea = 1 << 4, |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
76 |
GUI_PlaceProc_DesertArea = 2 << 4, |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
77 |
GUI_PlaceProc_WaterArea = 3 << 4, |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
78 |
GUI_PlaceProc_ConvertRailArea = 4 << 4 |
c4ae19bfebf7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
79 |
}; |
0 | 80 |
|
81 |
/* misc_gui.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
82 |
void PlaceLandBlockInfo(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
83 |
void ShowAboutWindow(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
84 |
void ShowBuildTreesToolbar(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
85 |
void ShowBuildTreesScenToolbar(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
86 |
void ShowTownDirectory(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
87 |
void ShowIndustryDirectory(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
88 |
void ShowSubsidiesList(void); |
2475 | 89 |
void ShowPlayerStations(PlayerID player); |
90 |
void ShowPlayerFinances(PlayerID player); |
|
91 |
void ShowPlayerCompany(PlayerID player); |
|
1575
a566a645401f
(svn r2079) -Add: signlist, shows all signs in the map. Clicking on them, and you go
truelight
parents:
1397
diff
changeset
|
92 |
void ShowSignList(void); |
0 | 93 |
|
94 |
void ShowEstimatedCostOrIncome(int32 cost, int x, int y); |
|
95 |
void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
|
96 |
||
568
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
97 |
void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad); |
0 | 98 |
void CheckRedrawStationCoverage(Window *w); |
99 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
100 |
void ShowSmallMap(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
101 |
void ShowExtraViewPortWindow(void); |
0 | 102 |
void SetVScrollCount(Window *w, int num); |
842 | 103 |
void SetVScroll2Count(Window *w, int num); |
0 | 104 |
void SetHScrollCount(Window *w, int num); |
105 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
106 |
void ShowCheatWindow(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
107 |
void AskForNewGameToStart(void); |
0 | 108 |
|
109 |
void DrawEditBox(Window *w, int wid); |
|
110 |
void HandleEditBox(Window *w, int wid); |
|
1390
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
111 |
int HandleEditBoxKey(Window *w, int wid, WindowEvent *we); |
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
112 |
bool HandleCaret(Textbuf *tb); |
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
113 |
|
1879
2ccc61e922e2
(svn r2385) - Feature: shortcut CTRL + U that clears the commandline of the current input-box. As requested by Tron.
Darkvater
parents:
1705
diff
changeset
|
114 |
void DeleteTextBufferAll(Textbuf *tb); |
1390
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
115 |
bool DeleteTextBufferChar(Textbuf *tb, int delmode); |
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
116 |
bool InsertTextBufferChar(Textbuf *tb, byte key); |
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
117 |
bool InsertTextBufferClipboard(Textbuf *tb); |
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
118 |
bool MoveTextBufferPos(Textbuf *tb, int navmode); |
53a5713cf3f9
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
119 |
void UpdateTextBufferSize(Textbuf *tb); |
0 | 120 |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
121 |
void BuildFileList(void); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
478
diff
changeset
|
122 |
void SetFiosType(const byte fiostype); |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
478
diff
changeset
|
123 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
478
diff
changeset
|
124 |
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
2261
3f78323707bb
(svn r2781) Fix some of the issues with variables in .h files.
ludde
parents:
2186
diff
changeset
|
125 |
extern const byte _fios_colors[]; |
0 | 126 |
|
127 |
/* network gui */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
128 |
void ShowNetworkGameWindow(void); |
649 | 129 |
void ShowChatWindow(StringID str, StringID caption, int maxlen, int maxwidth, byte window_class, uint16 window_number); |
0 | 130 |
|
131 |
/* bridge_gui.c */ |
|
132 |
void ShowBuildBridgeWindow(uint start, uint end, byte type); |
|
133 |
||
134 |
enum { |
|
135 |
ZOOM_IN = 0, |
|
136 |
ZOOM_OUT = 1, |
|
137 |
ZOOM_NONE = 2, // hack, used to update the button status |
|
138 |
}; |
|
139 |
||
152
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
116
diff
changeset
|
140 |
bool DoZoomInOutWindow(int how, Window * w); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
141 |
void ShowBuildIndustryWindow(void); |
1386
aa5a172a8431
(svn r1890) Begin to clean up the edit box: Remove one global variable and split the combined edit/original buffer into two
tron
parents:
1246
diff
changeset
|
142 |
void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, WindowClass window_class, WindowNumber window_number); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
988
diff
changeset
|
143 |
void ShowMusicWindow(void); |
0 | 144 |
|
145 |
/* main_gui.c */ |
|
146 |
VARDEF byte _construct_mode; |
|
147 |
VARDEF byte _station_show_coverage; |
|
148 |
VARDEF PlaceProc *_place_proc; |
|
149 |
VARDEF bool _no_button_sound; |
|
150 |
||
1246
45f15251412b
(svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each vehicle type (bociusz)
darkvater
parents:
1093
diff
changeset
|
151 |
/* vehicle_gui.c */ |
45f15251412b
(svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each vehicle type (bociusz)
darkvater
parents:
1093
diff
changeset
|
152 |
void InitializeGUI(void); |
45f15251412b
(svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each vehicle type (bociusz)
darkvater
parents:
1093
diff
changeset
|
153 |
|
0 | 154 |
#endif /* GUI_H */ |