1 | // ================================================================= // |
---|
2 | // // |
---|
3 | // File : aw_base.hxx // |
---|
4 | // Purpose : forward declare some gui types // |
---|
5 | // // |
---|
6 | // Coded by Ralf Westram (coder@reallysoft.de) in September 2010 // |
---|
7 | // Institute of Microbiology (Technical University Munich) // |
---|
8 | // http://www.arb-home.de/ // |
---|
9 | // // |
---|
10 | // ================================================================= // |
---|
11 | |
---|
12 | #ifndef AW_BASE_HXX |
---|
13 | #define AW_BASE_HXX |
---|
14 | |
---|
15 | class AW_root; |
---|
16 | class AW_window; |
---|
17 | |
---|
18 | typedef long AW_CL; // client data (casted from pointer or value) // @@@ [CB] eliminate later |
---|
19 | |
---|
20 | typedef void (*AW_postcb_cb)(AW_window *); |
---|
21 | |
---|
22 | struct GBDATA; |
---|
23 | typedef GBDATA *AW_default; |
---|
24 | |
---|
25 | typedef double AW_pos; |
---|
26 | |
---|
27 | struct AW_world { |
---|
28 | AW_pos t, b, l, r; |
---|
29 | void clear() { t = b = l = r = 0.0; } |
---|
30 | }; |
---|
31 | struct AW_screen_area { |
---|
32 | int t, b, l, r; |
---|
33 | void clear() { t = b = l = r = 0; } |
---|
34 | }; |
---|
35 | |
---|
36 | typedef AW_screen_area AW_borders; // not an area, but size spec at all borders |
---|
37 | |
---|
38 | typedef int AW_font; |
---|
39 | |
---|
40 | typedef long AW_bitset; |
---|
41 | typedef AW_bitset AW_active; // bits to activate/inactivate buttons |
---|
42 | typedef float AW_grey_level; // <0 don't fill 0.0 white 1.0 black |
---|
43 | |
---|
44 | typedef struct _WidgetRec *Widget; |
---|
45 | |
---|
46 | #define AW_NO_COLOR (-1UL) |
---|
47 | typedef unsigned long AW_rgb; |
---|
48 | |
---|
49 | enum AW_VARIABLE_TYPE { |
---|
50 | AW_NONE = 0, |
---|
51 | AW_BIT = 1, |
---|
52 | AW_BYTE = 2, |
---|
53 | AW_INT = 3, |
---|
54 | AW_FLOAT = 4, |
---|
55 | AW_POINTER = 5, |
---|
56 | AW_BITS = 6, |
---|
57 | // 7 is unused |
---|
58 | AW_BYTES = 8, |
---|
59 | AW_INTS = 9, |
---|
60 | AW_FLOATS = 10, |
---|
61 | AW_STRING = 12, |
---|
62 | // 13 is reserved (GB_STRING_SHRT) |
---|
63 | // 14 is unused |
---|
64 | AW_DB = 15, |
---|
65 | |
---|
66 | // keep AW_VARIABLE_TYPE consistent with GB_TYPES |
---|
67 | // see ../ARBDB/arbdb.h@sync_GB_TYPES_AW_VARIABLE_TYPE |
---|
68 | |
---|
69 | AW_TYPE_MAX = 16 |
---|
70 | }; |
---|
71 | |
---|
72 | enum AW_area { |
---|
73 | AW_INFO_AREA, |
---|
74 | AW_MIDDLE_AREA, |
---|
75 | AW_BOTTOM_AREA, |
---|
76 | AW_MAX_AREA |
---|
77 | }; |
---|
78 | |
---|
79 | enum AW_color_idx { |
---|
80 | AW_WINDOW_BG, |
---|
81 | AW_WINDOW_FG, |
---|
82 | AW_WINDOW_C1, |
---|
83 | AW_WINDOW_C2, |
---|
84 | AW_WINDOW_C3, |
---|
85 | AW_WINDOW_DRAG, |
---|
86 | AW_DATA_BG, |
---|
87 | AW_STD_COLOR_IDX_MAX |
---|
88 | }; |
---|
89 | |
---|
90 | enum GcChange { |
---|
91 | // value 0 is reserved (used internally in GC-manager) |
---|
92 | |
---|
93 | GC_COLOR_CHANGED = 1, // -> normally a refresh should do |
---|
94 | GC_FONT_CHANGED, // -> display needs a resize |
---|
95 | GC_COLOR_GROUP_USE_CHANGED, // -> might need extra calculations |
---|
96 | |
---|
97 | // Note: higher values should cover lower values, |
---|
98 | // i.e. a resize (GC_FONT_CHANGED) always does a refresh (GC_COLOR_CHANGED) |
---|
99 | }; |
---|
100 | |
---|
101 | AW_default get_AW_ROOT_DEFAULT(); |
---|
102 | #define AW_ROOT_DEFAULT get_AW_ROOT_DEFAULT() |
---|
103 | |
---|
104 | #else |
---|
105 | #error aw_base.hxx included twice |
---|
106 | #endif // AW_BASE_HXX |
---|