author | KUDr |
Fri, 20 Apr 2007 19:43:06 +0000 | |
changeset 6513 | 454347ca3dfb |
parent 6247 | 7d81e3a5d803 |
child 6596 | f200c4895149 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
3 |
/** @file gui.h */ |
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
4 |
|
0 | 5 |
#ifndef GUI_H |
6 |
#define GUI_H |
|
7 |
||
2466
1aa260b43faa
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
tron
parents:
2261
diff
changeset
|
8 |
#include "station.h" |
175
d6cccece959a
(svn r176) -Fix: network_gui const and warnings fixes (Tron)
darkvater
parents:
164
diff
changeset
|
9 |
#include "window.h" |
4299
91f5d2bedcff
(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
truelight
parents:
4211
diff
changeset
|
10 |
#include "string.h" |
175
d6cccece959a
(svn r176) -Fix: network_gui const and warnings fixes (Tron)
darkvater
parents:
164
diff
changeset
|
11 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
12 |
/* main_gui.cpp */ |
6247 | 13 |
void SetupColorsAndInitialWindow(); |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
14 |
void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); |
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
15 |
void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2); |
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
16 |
void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2); |
0 | 17 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
18 |
/* settings_gui.cpp */ |
6247 | 19 |
void ShowGameOptions(); |
20 |
void ShowGameDifficulty(); |
|
21 |
void ShowPatchesSelection(); |
|
4211
5ee54ab361c9
(svn r5714) Backport from branches/TGP (r5701 and r5711)
miham
parents:
4171
diff
changeset
|
22 |
void DrawArrowButtons(int x, int y, int ctab, byte state, bool clickable_left, bool clickable_right); |
0 | 23 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
24 |
/* graph_gui.cpp */ |
6247 | 25 |
void ShowOperatingProfitGraph(); |
26 |
void ShowIncomeGraph(); |
|
27 |
void ShowDeliveredCargoGraph(); |
|
28 |
void ShowPerformanceHistoryGraph(); |
|
29 |
void ShowCompanyValueGraph(); |
|
30 |
void ShowCargoPaymentRates(); |
|
31 |
void ShowCompanyLeagueTable(); |
|
32 |
void ShowPerformanceRatingDetail(); |
|
0 | 33 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
34 |
/* news_gui.cpp */ |
6247 | 35 |
void ShowLastNewsMessage(); |
36 |
void ShowMessageOptions(); |
|
37 |
void ShowMessageHistory(); |
|
0 | 38 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
39 |
/* rail_gui.cpp */ |
2520
8a52362c4ada
(svn r3049) Replace byte/int/uint by RailType where appropriate
tron
parents:
2475
diff
changeset
|
40 |
void ShowBuildRailToolbar(RailType railtype, int button); |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
41 |
void PlaceProc_BuyLand(TileIndex tile); |
5116
3c0c3da214ca
(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option 'disable electrified railways'.
KUDr
parents:
5108
diff
changeset
|
42 |
void ReinitGuiAfterToggleElrail(bool disable); |
0 | 43 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
44 |
/* train_gui.cpp */ |
2561
233dafd7cf6c
(svn r3098) static, const, uint -> TileIndex, indentation, bracing, unused return values, ... mostly related to the clone vehicle GUI
tron
parents:
2549
diff
changeset
|
45 |
void ShowTrainViewWindow(const Vehicle *v); |
4171 | 46 |
void ShowOrdersWindow(const Vehicle *v); |
0 | 47 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
48 |
/* road_gui.cpp */ |
6247 | 49 |
void ShowBuildRoadToolbar(); |
50 |
void ShowBuildRoadScenToolbar(); |
|
4408
db2afc41002a
(svn r6161) -Feature: List of vehicles with the same shared orders
bjarni
parents:
4344
diff
changeset
|
51 |
void ShowRoadVehViewWindow(const Vehicle *v); |
0 | 52 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
53 |
/* dock_gui.cpp */ |
6247 | 54 |
void ShowBuildDocksToolbar(); |
4171 | 55 |
void ShowShipViewWindow(const Vehicle *v); |
0 | 56 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
57 |
/* aircraft_gui.cpp */ |
6247 | 58 |
void ShowBuildAirToolbar(); |
0 | 59 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
60 |
/* terraform_gui.cpp */ |
5860 | 61 |
void ShowTerraformToolbar(Window *link = NULL); |
1632
10c391e108b7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
62 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
63 |
/* tgp_gui.cpp */ |
6247 | 64 |
void ShowGenerateLandscape(); |
65 |
void ShowHeightmapLoad(); |
|
4300
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4299
diff
changeset
|
66 |
|
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
67 |
void PlaceProc_DemolishArea(TileIndex tile); |
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1879
diff
changeset
|
68 |
void PlaceProc_LevelLand(TileIndex tile); |
4634
07699ac2bf37
(svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
belugas
parents:
4434
diff
changeset
|
69 |
bool GUIPlaceProcDragXY(const WindowEvent *e); |
1632
10c391e108b7
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
Darkvater
parents:
1575
diff
changeset
|
70 |
|
10c391e108b7
(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 |
enum { // max 32 - 4 = 28 types |
10c391e108b7
(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 |
GUI_PlaceProc_DemolishArea = 0 << 4, |
10c391e108b7
(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 |
GUI_PlaceProc_LevelArea = 1 << 4, |
10c391e108b7
(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_DesertArea = 2 << 4, |
10c391e108b7
(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_WaterArea = 3 << 4, |
2615
e97a3034eef4
(svn r3153) - Feature: [ 1276827 ] Drag and drop rocky areas in scenario editor (MeusH-ish)
Darkvater
parents:
2561
diff
changeset
|
76 |
GUI_PlaceProc_ConvertRailArea = 4 << 4, |
e97a3034eef4
(svn r3153) - Feature: [ 1276827 ] Drag and drop rocky areas in scenario editor (MeusH-ish)
Darkvater
parents:
2561
diff
changeset
|
77 |
GUI_PlaceProc_RockyArea = 5 << 4, |
1632
10c391e108b7
(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 |
}; |
0 | 79 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
80 |
/* misc_gui.cpp */ |
6247 | 81 |
void PlaceLandBlockInfo(); |
82 |
void ShowAboutWindow(); |
|
83 |
void ShowBuildTreesToolbar(); |
|
84 |
void ShowBuildTreesScenToolbar(); |
|
85 |
void ShowTownDirectory(); |
|
86 |
void ShowIndustryDirectory(); |
|
87 |
void ShowSubsidiesList(); |
|
2475 | 88 |
void ShowPlayerStations(PlayerID player); |
89 |
void ShowPlayerFinances(PlayerID player); |
|
90 |
void ShowPlayerCompany(PlayerID player); |
|
0 | 91 |
|
92 |
void ShowEstimatedCostOrIncome(int32 cost, int x, int y); |
|
93 |
void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
|
94 |
||
568
b0d0df062880
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
95 |
void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad); |
4171 | 96 |
void CheckRedrawStationCoverage(const Window *w); |
0 | 97 |
|
6247 | 98 |
void ShowSmallMap(); |
99 |
void ShowExtraViewPortWindow(); |
|
0 | 100 |
void SetVScrollCount(Window *w, int num); |
842 | 101 |
void SetVScroll2Count(Window *w, int num); |
0 | 102 |
void SetHScrollCount(Window *w, int num); |
103 |
||
6247 | 104 |
void ShowCheatWindow(); |
0 | 105 |
|
2887
810e555d5249
(svn r3439) - CodeChange: Remove a whole bunch of global variables and put them into the WP() macro. Also combine more than one WP-custom element. For this the maximum size of w->custom (WP) has been increased, and multiple types put inside one with possibly moved to the corresponding gui file if it is only used there.
Darkvater
parents:
2817
diff
changeset
|
106 |
void DrawEditBox(Window *w, querystr_d *string, int wid); |
810e555d5249
(svn r3439) - CodeChange: Remove a whole bunch of global variables and put them into the WP() macro. Also combine more than one WP-custom element. For this the maximum size of w->custom (WP) has been increased, and multiple types put inside one with possibly moved to the corresponding gui file if it is only used there.
Darkvater
parents:
2817
diff
changeset
|
107 |
void HandleEditBox(Window *w, querystr_d *string, int wid); |
4909
955f318a24cd
(svn r6879) -Codechange: Remove the superflouos argument CharsetFilter parameter from HandleEditBoxKey
Darkvater
parents:
4830
diff
changeset
|
108 |
int HandleEditBoxKey(Window *w, querystr_d *string, int wid, WindowEvent *we); |
1390
e7cdf3ce0fb6
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
109 |
bool HandleCaret(Textbuf *tb); |
e7cdf3ce0fb6
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
110 |
|
1879
b037d07154c6
(svn r2385) - Feature: shortcut CTRL + U that clears the commandline of the current input-box. As requested by Tron.
Darkvater
parents:
1705
diff
changeset
|
111 |
void DeleteTextBufferAll(Textbuf *tb); |
1390
e7cdf3ce0fb6
(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 DeleteTextBufferChar(Textbuf *tb, int delmode); |
5108
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5044
diff
changeset
|
113 |
bool InsertTextBufferChar(Textbuf *tb, uint32 key); |
1390
e7cdf3ce0fb6
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
114 |
bool InsertTextBufferClipboard(Textbuf *tb); |
e7cdf3ce0fb6
(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 MoveTextBufferPos(Textbuf *tb, int navmode); |
4948
22ff05c1a3b1
(svn r6937) -Codechange: Add an InitializeTextBuffer() function that handles setting up the
Darkvater
parents:
4909
diff
changeset
|
116 |
void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth); |
1390
e7cdf3ce0fb6
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents:
1386
diff
changeset
|
117 |
void UpdateTextBufferSize(Textbuf *tb); |
0 | 118 |
|
6247 | 119 |
void BuildFileList(); |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
478
diff
changeset
|
120 |
void SetFiosType(const byte fiostype); |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
478
diff
changeset
|
121 |
|
4434
a08cb4b5c179
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
rubidium
parents:
4408
diff
changeset
|
122 |
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
2261
d3554e5d3e86
(svn r2781) Fix some of the issues with variables in .h files.
ludde
parents:
2186
diff
changeset
|
123 |
extern const byte _fios_colors[]; |
0 | 124 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
125 |
/* bridge_gui.cpp */ |
0 | 126 |
void ShowBuildBridgeWindow(uint start, uint end, byte type); |
127 |
||
6247 | 128 |
void ShowBuildIndustryWindow(); |
5431
6e56b4f13dd7
(svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a parent. If the
Darkvater
parents:
5418
diff
changeset
|
129 |
void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, Window *parent, CharSetFilter afilter); |
5418
793a133c6d2a
(svn r7621) -Codechange: Rework ShowQuery into a general modal popup window. It gets passed
Darkvater
parents:
5291
diff
changeset
|
130 |
void ShowQuery(StringID caption, StringID message, Window *w, void (*callback)(Window*, bool)); |
6247 | 131 |
void ShowMusicWindow(); |
0 | 132 |
|
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
133 |
/* main_gui.cpp */ |
5431
6e56b4f13dd7
(svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a parent. If the
Darkvater
parents:
5418
diff
changeset
|
134 |
void HandleOnEditText(const char *str); |
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
135 |
VARDEF bool _station_show_coverage; |
0 | 136 |
VARDEF PlaceProc *_place_proc; |
137 |
||
6179
d19b0137d8e4
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6091
diff
changeset
|
138 |
/* vehicle_gui.cpp */ |
6247 | 139 |
void InitializeGUI(); |
1246
eb66ff34348f
(svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each vehicle type (bociusz)
darkvater
parents:
1093
diff
changeset
|
140 |
|
0 | 141 |
#endif /* GUI_H */ |