1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | #ifndef __WMANAGER_HPP_
|
---|
10 | #define __WMANAGER_HPP_
|
---|
11 |
|
---|
12 | #include "window/window.hh"
|
---|
13 | #include "video/display.hh"
|
---|
14 | #include "palette/pal.hh"
|
---|
15 | #include "string/string.hh"
|
---|
16 | #include "window/style.hh"
|
---|
17 | #include "loaders/load.hh"
|
---|
18 | #include "device/keys.hh"
|
---|
19 |
|
---|
20 | class i4_window_manager_class : public i4_parent_window_class
|
---|
21 | {
|
---|
22 | private:
|
---|
23 | i4_display_class *display;
|
---|
24 | i4_device_class::device_flags devices_present;
|
---|
25 | i4_graphical_style_class *style;
|
---|
26 | i4_cursor_class *default_cursor;
|
---|
27 | i4_bool no_cursor_installed; // set to true when cursor is not the default cursor
|
---|
28 | i4_bool drag_dropping;
|
---|
29 | i4_color background_color;
|
---|
30 | void cleanup_old_mode();
|
---|
31 |
|
---|
32 | struct
|
---|
33 | {
|
---|
34 | i4_bool active;
|
---|
35 | w32 reference_id;
|
---|
36 | void *further_info;
|
---|
37 | i4_window_class *originator;
|
---|
38 | } drag_drop;
|
---|
39 |
|
---|
40 | public:
|
---|
41 | int key_modifiers_pressed;
|
---|
42 |
|
---|
43 | void set_background_color(w32 color);
|
---|
44 | i4_bool control_pressed() { return (key_modifiers_pressed & I4_MODIFIER_CTRL) ? i4_T : i4_F; }
|
---|
45 | i4_bool alt_pressed() { return (key_modifiers_pressed & I4_MODIFIER_ALT) ? i4_T : i4_F; }
|
---|
46 | i4_bool shift_pressed() { return (key_modifiers_pressed & I4_MODIFIER_SHIFT) ? i4_T : i4_F; }
|
---|
47 |
|
---|
48 | char *name() { return "window_manager"; }
|
---|
49 |
|
---|
50 | i4_graphical_style_class *get_style();
|
---|
51 |
|
---|
52 | virtual void parent_draw(i4_draw_context_class &context);
|
---|
53 |
|
---|
54 | virtual void root_draw(); // call from application, will call everyone else's draw function
|
---|
55 | virtual void receive_event(i4_event *ev);
|
---|
56 |
|
---|
57 | i4_window_manager_class(); // if style cannot be found the first available on is used instead
|
---|
58 |
|
---|
59 | i4_menu_class *create_menu(i4_color_hint_class *hint, i4_bool hide_on_pick)
|
---|
60 | { return style->create_menu(hide_on_pick); }
|
---|
61 |
|
---|
62 | void set_default_cursor(i4_cursor_class *cursor);
|
---|
63 |
|
---|
64 | void prepare_for_mode(i4_display_class *display, i4_display_class::mode *mode);
|
---|
65 |
|
---|
66 | i4_color i4_read_color_from_resource(char *resource);
|
---|
67 |
|
---|
68 | ~i4_window_manager_class();
|
---|
69 | };
|
---|
70 |
|
---|
71 |
|
---|
72 | #endif
|
---|