Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 157 lines (127 sloc) 3.709 kB
f8c3123 Import version 84.20
Christoph Mallon authored
1 /*
2 * Copyright (c) 1997 - 2003 Hansjörg Malthaner
3 *
d1a6490 changed copyright text to reflect artistic licence
Markus Pristovsek authored
4 * This file is part of the Simutrans project under the artistic licence.
5 * (see licence.txt)
f8c3123 Import version 84.20
Christoph Mallon authored
6 */
7
8 #ifndef simwin_h
9 #define simwin_h
10
11 #include "simtypes.h"
d165b00 new menu system (alpha text, does not yet compile on MinGW)
Markus Pristovsek authored
12
f8c3123 Import version 84.20
Christoph Mallon authored
13 class karte_t;
d2e9fac ADD: (Dwachs) speedbonus save (prissi) AI names saved (prissi) prepar…
Markus Pristovsek authored
14 class loadsave_t;
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
15 class gui_frame_t;
85ae604 CHG : Eliminate duplicate code and highlight for scroll list in focus
Knightly authored
16 class gui_komponente_t;
d5b3e15 (gerw) Reduced cross-dependencies in the headre files
Markus Pristovsek authored
17 struct event_t;
f8c3123 Import version 84.20
Christoph Mallon authored
18
19 /* Typen fuer die Fenster */
20 enum wintype {
b935185 less wrong activation clicks/lines with zero entry bug
Markus Pristovsek authored
21 w_info = 1, // Ein Info-Fenster
d165b00 new menu system (alpha text, does not yet compile on MinGW)
Markus Pristovsek authored
22 w_do_not_delete= 2, // Ein Info-Fenster dessen GUI-Objekt beim schliessen nicht gelöscht werden soll
c41dfb1 CHANGE: all toolbars open directly below each others
Markus Pristovsek authored
23 w_no_overlap = 4, // try to place it below a previous window with the same flag
24 w_time_delete = 8 // deletion after MESG_WAIT has elapsed
f8c3123 Import version 84.20
Christoph Mallon authored
25 };
3288665 Use wintype instead of uint8.
Christoph Mallon authored
26 ENUM_BITSET(wintype)
f8c3123 Import version 84.20
Christoph Mallon authored
27
28
29 enum magic_numbers {
c41dfb1 CHANGE: all toolbars open directly below each others
Markus Pristovsek authored
30 magic_none = -1,
31 magic_reserved = 0,
32
33 // from here on, delete second 'new'-ed object in create_win
60a6f23 ADD: setting get an UI with the names in simuconf.tab
Markus Pristovsek authored
34 magic_settings_frame_t,
c41dfb1 CHANGE: all toolbars open directly below each others
Markus Pristovsek authored
35 magic_sprachengui_t,
36 magic_welt_gui_t,
37 magic_climate,
38 magic_reliefmap,
39 magic_farbengui_t,
40 magic_color_gui_t,
41 magic_ki_kontroll_t,
42 magic_optionen_gui_t,
43 magic_sound_kontroll_t,
44 magic_load_t,
45 magic_save_t,
46 magic_railtools,
47 magic_monorailtools,
48 magic_tramtools, // Dario: Tramway
49 magic_roadtools,
50 magic_shiptools,
51 magic_airtools,
b08c4e4 git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@1348 8a…
Markus Pristovsek authored
52 magic_specialtools,
53 magic_listtools,
54 magic_edittools,
c41dfb1 CHANGE: all toolbars open directly below each others
Markus Pristovsek authored
55 magic_slopetools,
56 magic_halt_list_t,
57 magic_label_frame,
58 magic_city_info_t,
59 magic_citylist_frame_t,
60 magic_mainhelp,
61 magic_finances_t,
62 magic_help,
63 magic_convoi_t,
64 magic_jump,
65 magic_curiositylist,
66 magic_factorylist,
67 magic_goodslist,
68 magic_messageframe,
0241198 ADD: factory edit modus after patch from z9999
Markus Pristovsek authored
69 magic_edit_factory,
54377e0 cursor area fixed
Markus Pristovsek authored
70 magic_edit_attraction,
71 magic_edit_house,
72 magic_edit_tree,
e57c306 ADD: (Gerd Wachsmuth) map enlargement during the game
Markus Pristovsek authored
73 magic_bigger_map,
27048eb CHANGE: (z9999) finally useful marker with a simutrans consistent gui
Markus Pristovsek authored
74 magic_labellist,
215008e ADD: (mainly z9999) rotation of extension buildings can be selected b…
Markus Pristovsek authored
75 magic_station_building_select,
ddd795b FIX: convoi details (and info- windows) were not always correctly (re…
Markus Pristovsek authored
76 magic_keyhelp,
d8314f0 Network query and join dialoge
Markus Pristovsek authored
77 magic_server_frame_t,
41b2acd one help frame one time on the screen
Markus Pristovsek authored
78 magic_info_pointer, // mark end of the list
ddd795b FIX: convoi details (and info- windows) were not always correctly (re…
Markus Pristovsek authored
79 magic_convoi_info=magic_info_pointer+839,
80 magic_convoi_detail=magic_convoi_info+65536,
cd59737 FIX: Halt details dialog can have multiple instances for the same hal…
Knightly authored
81 magic_halt_info=magic_convoi_detail+65536,
82 magic_halt_detail=magic_halt_info+65536,
83 magic_max=magic_halt_detail+65536
f8c3123 Import version 84.20
Christoph Mallon authored
84 };
85
86 // Haltezeit für Nachrichtenfenster
87 #define MESG_WAIT 80
88
89
90 void init_map_win();
91
d2e9fac ADD: (Dwachs) speedbonus save (prissi) AI names saved (prissi) prepar…
Markus Pristovsek authored
92 // windows with a valid id can be saved and restored
93 void rwdr_all_win(loadsave_t *file);
f8c3123 Import version 84.20
Christoph Mallon authored
94
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
95 int create_win(gui_frame_t*, wintype, long magic);
96 int create_win(int x, int y, gui_frame_t*, wintype, long magic);
f8c3123 Import version 84.20
Christoph Mallon authored
97
98 bool check_pos_win(struct event_t *ev);
99
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
100 int win_get_posx(gui_frame_t *ig);
101 int win_get_posy(gui_frame_t *ig);
102 void win_set_pos(gui_frame_t *ig, int x, int y);
f8c3123 Import version 84.20
Christoph Mallon authored
103
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
104 gui_frame_t *win_get_top();
f8c3123 Import version 84.20
Christoph Mallon authored
105
85ae604 CHG : Eliminate duplicate code and highlight for scroll list in focus
Knightly authored
106 // Knightly : returns the focused component of the top window
107 gui_komponente_t *win_get_focus();
108
561a797 Remove pointless const qualifiers on return types.
Christoph Mallon authored
109 int win_get_open_count();
3ea834b renovated image system: More than two info windows per tile
Markus Pristovsek authored
110
c0afff4 Import version 88.03
Christoph Mallon authored
111 // returns the window (if open) otherwise zero
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
112 gui_frame_t *win_get_magic(long magic);
c0afff4 Import version 88.03
Christoph Mallon authored
113
f8c3123 Import version 84.20
Christoph Mallon authored
114 /**
115 * Checks ifa window is a top level window
116 *
117 * @author Hj. Malthaner
118 */
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
119 bool win_is_top(const gui_frame_t *ig);
f8c3123 Import version 84.20
Christoph Mallon authored
120
121
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
122 void destroy_win(const gui_frame_t *ig);
3ea834b renovated image system: More than two info windows per tile
Markus Pristovsek authored
123 void destroy_win(const long magic);
af69fdb ADD: (sewd) + prissi Sticky window function, which are only closed by…
Markus Pristovsek authored
124 void destroy_all_win(bool destroy_sticky);
f8c3123 Import version 84.20
Christoph Mallon authored
125
11e4c4b ifc gui_fenster_t was not needed since some time
Markus Pristovsek authored
126 bool top_win(const gui_frame_t *ig);
f8c3123 Import version 84.20
Christoph Mallon authored
127 int top_win(int win);
128 void display_win(int win);
129 void display_all_win();
193bfa5 Rotate also corrdinates in error messages
Markus Pristovsek authored
130 void win_rotate90( sint16 new_size );
f8c3123 Import version 84.20
Christoph Mallon authored
131 void move_win(int win);
132
01c54c2 Remove unused parameters from {win_,}display_flush()
Christoph Mallon authored
133 void win_display_flush(double konto); // draw the frame and all windows
f8c3123 Import version 84.20
Christoph Mallon authored
134 void win_get_event(struct event_t *ev);
135 void win_poll_event(struct event_t *ev);
136
c290b66 another translation: all gib_ and setzte_ are now get_ and set_
Markus Pristovsek authored
137 void win_set_welt(karte_t *welt);
f8c3123 Import version 84.20
Christoph Mallon authored
138
99ee582 additional zooming in levels
Markus Pristovsek authored
139 bool win_change_zoom_factor(bool magnify);
f8c3123 Import version 84.20
Christoph Mallon authored
140
141
142 /**
143 * Sets the tooltip to display.
4295a4d CHG: Timed tooltips with initial delay and visible duration
Knightly authored
144 * @param owner : owner==NULL disables timing (initial delay and visible duration)
145 * @author Hj. Malthaner, Knightly
f8c3123 Import version 84.20
Christoph Mallon authored
146 */
8c36ca1 Allow also list entries in server list
Markus Pristovsek authored
147 void win_set_tooltip(int xpos, int ypos, const char *text, const void *const owner = 0, const void *const group = 0);
f8c3123 Import version 84.20
Christoph Mallon authored
148
97a3b35 new road construction finally as intended
Markus Pristovsek authored
149 /**
150 * Sets a static tooltip that follows the mouse
151 * *MUST* be explicitely unset!
152 * @author Hj. Malthaner
153 */
154 void win_set_static_tooltip(const char *text);
155
f8c3123 Import version 84.20
Christoph Mallon authored
156 #endif
Something went wrong with that request. Please try again.