r788: The code for deleting pluginsets was not adapted to virtual edit we introduced...
[cinelerra_cv/mob.git] / guicast / bcresources.h
blob31ce9e9f6816b58e4c7766071e6cd38ce275808c
1 #ifndef BCRESOURCES_H
2 #define BCRESOURCES_H
4 #include "bcdisplayinfo.inc"
5 #include "bcfilebox.h"
6 #include "bcresources.inc"
7 #include "bcsignals.inc"
8 #include "bcwindowbase.inc"
9 #include "vframe.inc"
11 #include <X11/Xlib.h>
13 typedef struct
15 char *suffix;
16 int icon_type;
17 } suffix_to_type_t;
19 class BC_Resources
21 public:
22 BC_Resources(); // The window parameter is used to get the display information initially
23 ~BC_Resources();
25 int initialize_display(BC_WindowBase *window);
27 int get_bg_color(); // window backgrounds
28 int get_bg_shadow1(); // border for windows
29 int get_bg_shadow2();
30 int get_bg_light1();
31 int get_bg_light2();
32 // Get window border size created by window manager
33 int get_top_border();
34 int get_left_border();
35 int get_right_border();
36 int get_bottom_border();
38 // Pointer to signal handler class to run after ipc
39 static BC_Signals *signal_handler;
41 // These values should be changed before the first window is created.
42 // colors
43 int bg_color; // window backgrounds
44 int bg_shadow1; // border for windows
45 int bg_shadow2;
46 int bg_light1;
47 int bg_light2;
48 int default_text_color;
49 int disabled_text_color;
52 // beveled box colors
53 int button_light;
54 int button_highlighted;
55 int button_down;
56 int button_up;
57 int button_shadow;
58 int button_uphighlighted;
60 // highlighting
61 int highlight_inverse;
63 // 3D box colors for menus
64 int menu_light;
65 int menu_highlighted;
66 int menu_down;
67 int menu_up;
68 int menu_shadow;
69 // If these are nonzero, they override the menu backgrounds.
70 VFrame *menu_popup_bg;
71 VFrame **menu_title_bg;
72 VFrame *menu_bar_bg;
73 VFrame **popupmenu_images;
75 // Minimum menu width
76 int min_menu_w;
77 // Menu bar text color
78 int menu_title_text;
79 // color of popup title
80 int popup_title_text;
81 // Right and left margin for text not including triangle space.
82 int popupmenu_margin;
83 // Right margin for triangle not including text margin.
84 int popupmenu_triangle_margin;
85 // color for item text
86 int menu_item_text;
87 // Override the menu item background if nonzero.
88 VFrame **menu_item_bg;
91 // color for progress text
92 int progress_text;
95 int menu_highlighted_fontcolor;
97 // ms for double click
98 long double_click;
99 // ms for cursor flash
100 int blink_rate;
101 // ms for scroll repeats
102 int scroll_repeat;
103 // ms before tooltip
104 int tooltip_delay;
105 int tooltip_bg_color;
106 int tooltips_enabled;
108 int audiovideo_color;
110 // default color of text
111 int text_default;
112 // background color of textboxes and list boxes
113 int text_border1;
114 int text_border2;
115 int text_border2_hi;
116 int text_background;
117 int text_background_hi;
118 int text_background_noborder_hi;
119 int text_border3;
120 int text_border3_hi;
121 int text_border4;
122 int text_highlight;
123 int text_inactive_highlight;
124 // Not used
125 int text_background_noborder;
127 // Optional background for highlighted text in toggle
128 VFrame *toggle_highlight_bg;
129 int toggle_text_margin;
131 // Background images
132 static VFrame *bg_image;
133 static VFrame *menu_bg;
135 // Buttons
136 VFrame **ok_images;
137 VFrame **cancel_images;
138 VFrame **filebox_text_images;
139 VFrame **filebox_icons_images;
140 VFrame **filebox_updir_images;
141 VFrame **filebox_newfolder_images;
142 VFrame **filebox_descend_images;
143 VFrame **filebox_delete_images;
144 VFrame **filebox_reload_images;
146 // Generic button images
147 VFrame **generic_button_images;
148 // Generic button text margin
149 int generic_button_margin;
150 VFrame **usethis_button_images;
152 // Toggles
153 VFrame **checkbox_images;
154 VFrame **radial_images;
155 VFrame **label_images;
157 VFrame **tumble_data;
158 int tumble_duration;
160 // Horizontal bar
161 VFrame *bar_data;
163 // Listbox
164 VFrame *listbox_bg;
165 VFrame **listbox_button;
166 VFrame **listbox_expand;
167 VFrame **listbox_column;
168 VFrame *listbox_up;
169 VFrame *listbox_dn;
170 // Margin for titles in addition to listbox border
171 int listbox_title_margin;
172 int listbox_title_color;
173 int listbox_title_hotspot;
174 int listbox_border1;
175 int listbox_border2_hi;
176 int listbox_border2;
177 int listbox_border3_hi;
178 int listbox_border3;
179 int listbox_border4;
180 // Selected row color
181 int listbox_selected;
182 // Highlighted row color
183 int listbox_highlighted;
184 // Inactive row color
185 int listbox_inactive;
186 // Default text color
187 int listbox_text;
190 // Sliders
191 VFrame **horizontal_slider_data;
192 VFrame **vertical_slider_data;
193 VFrame **hscroll_data;
195 VFrame **vscroll_data;
196 // Minimum pixels in handle
197 int scroll_minhandle;
199 // Pans
200 VFrame **pan_data;
201 int pan_text_color;
203 // Pots
204 VFrame **pot_images;
205 int pot_x1, pot_y1, pot_r;
206 // Amoun of deflection of pot when down
207 int pot_offset;
208 int pot_needle_color;
210 // Meters
211 VFrame **xmeter_images, **ymeter_images;
212 int meter_font;
213 int meter_font_color;
214 int meter_title_w;
215 int meter_3d;
217 // Progress bar
218 VFrame **progress_images;
220 // Motion required to start a drag
221 int drag_radius;
223 // Filebox
224 static suffix_to_type_t suffix_to_type[TOTAL_SUFFIXES];
225 static VFrame *type_to_icon[TOTAL_ICONS];
226 // Display mode for fileboxes
227 int filebox_mode;
228 // Filter currently used in filebox
229 char filebox_filter[BCTEXTLEN];
230 // History of submitted files
231 char filebox_history[FILEBOX_HISTORY_SIZE][BCTEXTLEN];
232 // filebox size
233 int filebox_w;
234 int filebox_h;
235 // Column types for filebox
236 int filebox_columntype[FILEBOX_COLUMNS];
237 int filebox_columnwidth[FILEBOX_COLUMNS];
238 int filebox_sortcolumn;
239 int filebox_sortorder;
240 // Column types for filebox in directory mode
241 int dirbox_columntype[FILEBOX_COLUMNS];
242 int dirbox_columnwidth[FILEBOX_COLUMNS];
243 int dirbox_sortcolumn;
244 int dirbox_sortorder;
245 // Bottom margin between list and window
246 int filebox_margin;
247 int dirbox_margin;
248 int directory_color;
249 int file_color;
252 // fonts
253 static char *large_font;
254 static char *medium_font;
255 static char *small_font;
256 // Backup of fonts in case the first choices don't exist
257 static char *large_font2;
258 static char *medium_font2;
259 static char *small_font2;
261 static char *large_fontset;
262 static char *medium_fontset;
263 static char *small_fontset;
265 static char *large_font_xft;
266 static char *medium_font_xft;
267 static char *small_font_xft;
269 VFrame **medium_7segment;
271 //clock
272 int draw_clock_background;
274 int use_fontset;
275 // This must be constitutive since applications access the private members here.
276 int use_xft;
280 // Available display extensions
281 int use_shm;
282 static int error;
283 // If the program uses recursive_resizing
284 int recursive_resizing;
285 // Work around X server bugs
286 int use_xvideo;
288 private:
289 // Test for availability of shared memory pixmaps
290 int init_shm(BC_WindowBase *window);
291 void init_sizes(BC_WindowBase *window);
292 static int x_error_handler(Display *display, XErrorEvent *event);
293 BC_DisplayInfo *display_info;
294 VFrame **list_pointers[100];
295 int list_lengths[100];
296 int list_total;
300 #endif