1 #ifndef h_mmui_context_h
2 #define h_mmui_context_h
4 /* this header is just an extension to mmui.h really, but rather than clutter that one up thought I'd best
8 /* most of this context never changed (or shouldn't change anyway) over the lifetime of the session.
9 * Some few values may change however, as noted below, if the detail pane is toggled. (Or possible
10 * other theme changes if we add any over time. The rapidity of development is starting to show :)
14 // context that generally doesn't change over a session
16 unsigned int screen_width;
18 unsigned int font_rgba_r;
19 unsigned int font_rgba_g;
20 unsigned int font_rgba_b;
21 unsigned int font_rgba_a;
23 unsigned int grid_offset_x;
24 unsigned int grid_offset_y;
26 unsigned int icon_offset_x;
27 unsigned int icon_offset_y;
28 unsigned int icon_max_width;
29 unsigned int icon_max_height;
30 unsigned int sel_icon_offset_x;
31 unsigned int sel_icon_offset_y;
33 unsigned int text_width;
34 unsigned int text_height; // grid text's height of an 'M'
35 unsigned int text_clip_x;
36 unsigned int text_offset_x;
37 unsigned int text_offset_y;
38 unsigned int text_hilite_offset_y;
40 unsigned int arrow_bar_x;
41 unsigned int arrow_bar_y;
42 unsigned int arrow_bar_clip_w;
43 unsigned int arrow_bar_clip_h;
44 unsigned int arrow_up_x;
45 unsigned int arrow_up_y;
46 unsigned int arrow_down_x;
47 unsigned int arrow_down_y;
50 SDL_Color fontcolor; // calculated; used for default font colour by various widgets
52 // context that may well change over the session
54 unsigned char row_max;
55 unsigned char col_max;
57 unsigned int cell_width;
58 unsigned int cell_height;
62 void ui_recache_context ( ui_context_t *c );