r553: Modern gccs require __attribute__((used)) for variables used only in assembly.
[cinelerra_cv/mob.git] / cinelerra / theme.h
blob51dcde33ad8bea94a6f43b224cb62edf8b5e1790
1 #ifndef THEME_H
2 #define THEME_H
4 #include "awindowgui.inc"
5 #include "batchrender.inc"
6 #include "bctheme.h"
7 #include "cwindowgui.inc"
8 #include "guicast.h"
9 #include "levelwindowgui.inc"
10 #include "mbuttons.inc"
11 #include "mwindow.inc"
12 #include "mwindowgui.inc"
13 #include "new.inc"
14 #include "overlayframe.inc"
15 #include "patchbay.inc"
16 #include "preferencesthread.inc"
17 #include "recordgui.inc"
18 #include "recordmonitor.inc"
19 #include "resourcepixmap.inc"
20 #include "timebar.inc"
21 #include "trackcanvas.inc"
22 #include "setformat.inc"
23 #include "statusbar.inc"
24 #include "vframe.inc"
25 #include "vwindowgui.inc"
26 #include "zoombar.inc"
30 // Theme uses static png resources at startup.
31 // The reason is GUI elements must be constructed at startup from multiple
32 // pngs.
36 class Theme : public BC_Theme
38 public:
39 Theme();
40 virtual ~Theme();
43 virtual void initialize();
44 virtual void get_mwindow_sizes(MWindowGUI *gui,
45 int w,
46 int h);
47 virtual void get_vwindow_sizes(VWindowGUI *gui);
48 virtual void get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls);
49 virtual void get_awindow_sizes(AWindowGUI *gui);
50 virtual void get_rmonitor_sizes(int do_audio,
51 int do_video,
52 int do_channel,
53 int do_interlace,
54 int do_avc);
55 virtual void get_recordgui_sizes(RecordGUI *gui,
56 int w,
57 int h);
58 virtual void get_batchrender_sizes(BatchRenderGUI *gui,
59 int w,
60 int h);
61 virtual void get_plugindialog_sizes();
62 virtual void get_menueffect_sizes(int use_list);
63 virtual void draw_rwindow_bg(RecordGUI *gui);
64 virtual void draw_rmonitor_bg(RecordMonitorGUI *gui);
65 virtual void draw_awindow_bg(AWindowGUI *gui);
66 virtual void draw_cwindow_bg(CWindowGUI *gui);
67 virtual void draw_lwindow_bg(LevelWindowGUI *gui);
68 virtual void draw_mwindow_bg(MWindowGUI *gui);
69 virtual void draw_vwindow_bg(VWindowGUI *gui);
70 virtual void draw_resource_bg(TrackCanvas *canvas,
71 ResourcePixmap *pixmap,
72 int edit_x,
73 int edit_w,
74 int pixmap_x,
75 int x1,
76 int y1,
77 int x2,
78 int y2);
80 virtual void get_preferences_sizes();
81 virtual void draw_preferences_bg(PreferencesWindow *gui);
82 virtual void get_new_sizes(NewWindow *gui);
83 virtual void draw_new_bg(NewWindow *gui);
84 virtual void draw_setformat_bg(SetFormatWindow *window);
86 virtual void build_menus();
87 // unsigned char* get_image(char *title);
88 void flush_images();
90 ArrayList<BC_ListBoxItem*> aspect_ratios;
91 ArrayList<BC_ListBoxItem*> frame_rates;
92 ArrayList<BC_ListBoxItem*> frame_sizes;
93 ArrayList<BC_ListBoxItem*> sample_rates;
94 ArrayList<BC_ListBoxItem*> zoom_values;
95 char *theme_title;
97 // Tools for building widgets
98 void overlay(VFrame *dst, VFrame *src, int in_x1 = -1, int in_x2 = -1);
99 void build_transport(VFrame** &data,
100 unsigned char *png_overlay,
101 VFrame **bg_data,
102 int region);
103 void build_patches(VFrame** &data,
104 unsigned char *png_overlay,
105 VFrame **bg_data,
106 int region);
107 void build_button(VFrame** &data,
108 unsigned char *png_overlay,
109 VFrame *up_vframe,
110 VFrame *hi_vframe,
111 VFrame *dn_vframe);
112 void build_toggle(VFrame** &data,
113 unsigned char *png_overlay,
114 VFrame *up_vframe,
115 VFrame *hi_vframe,
116 VFrame *checked_vframe,
117 VFrame *dn_vframe,
118 VFrame *checkedhi_vframe);
120 // Locations
121 int abinbuttons_x, abinbuttons_y;
122 int abuttons_x, abuttons_y;
123 int adivider_x, adivider_y, adivider_w, adivider_h;
124 int afolders_x, afolders_y, afolders_w, afolders_h;
125 int alist_x, alist_y, alist_w, alist_h;
126 int audio_color;
127 int browse_pad;
128 int cauto_x, cauto_y, cauto_w, cauto_h;
129 int ccanvas_x, ccanvas_y, ccanvas_w, ccanvas_h;
130 int ccomposite_x, ccomposite_y, ccomposite_w, ccomposite_h;
131 int cstatus_x, cstatus_y;
132 int cdest_x, cdest_y;
133 int cedit_x, cedit_y;
134 int channel_position_color;
135 int cmeter_x, cmeter_y, cmeter_h;
136 int cslider_x, cslider_y, cslider_w;
137 int ctime_x, ctime_y;
138 int ctimebar_x, ctimebar_y, ctimebar_w, ctimebar_h;
139 int ctransport_x, ctransport_y;
140 int czoom_x, czoom_y;
141 int fade_h;
142 int loadfile_pad;
143 int loadmode_w;
144 int mbuttons_x, mbuttons_y, mbuttons_w, mbuttons_h;
145 int mcanvas_x, mcanvas_y, mcanvas_w, mcanvas_h;
146 int mclock_x, mclock_y, mclock_w, mclock_h;
147 int meter_h;
148 int mode_h;
149 int mstatus_x, mstatus_y, mstatus_w, mstatus_h;
150 int mstatus_message_x, mstatus_message_y;
151 int mstatus_progress_x, mstatus_progress_y, mstatus_progress_w;
152 int mstatus_cancel_x, mstatus_cancel_y;
153 int mtimebar_x, mtimebar_y, mtimebar_w, mtimebar_h;
154 int mzoom_x, mzoom_y, mzoom_w, mzoom_h;
155 int new_audio_x, new_audio_y;
156 int new_ok_x, new_ok_y;
157 int new_video_x, new_video_y;
158 int pan_h;
159 int pan_x;
160 int play_h;
161 int patchbay_x, patchbay_y, patchbay_w, patchbay_h;
163 int plugindialog_new_x, plugindialog_new_y, plugindialog_new_w, plugindialog_new_h;
164 int plugindialog_shared_x, plugindialog_shared_y, plugindialog_shared_w, plugindialog_shared_h;
165 int plugindialog_module_x, plugindialog_module_y, plugindialog_module_w, plugindialog_module_h;
166 int plugindialog_newattach_x, plugindialog_newattach_y;
167 int plugindialog_sharedattach_x, plugindialog_sharedattach_y;
168 int plugindialog_moduleattach_x, plugindialog_moduleattach_y;
170 int menueffect_list_x, menueffect_list_y, menueffect_list_w, menueffect_list_h;
171 int menueffect_file_x, menueffect_file_y;
172 int menueffect_tools_x, menueffect_tools_y;
175 int recordgui_batches_w, recordgui_batches_h;
176 int recordgui_batches_x, recordgui_batches_y;
177 int recordgui_batch_x, recordgui_batch_y, recordgui_batchcaption_x;
178 int recordgui_buttons_x, recordgui_buttons_y;
179 int recordgui_options_x, recordgui_options_y;
180 int recordgui_controls_x, recordgui_controls_y;
181 int recordgui_loadmode_x, recordgui_loadmode_y;
182 int recordgui_status_x, recordgui_status_y, recordgui_status_x2;
183 int recordgui_transport_x, recordgui_transport_y;
184 int recordgui_fixed_color, recordgui_variable_color;
185 int rmonitor_canvas_w, rmonitor_canvas_h;
186 int rmonitor_canvas_x, rmonitor_canvas_y;
187 int rmonitor_channel_x, rmonitor_channel_y;
188 int rmonitor_interlace_x, rmonitor_interlace_y;
189 int rmonitor_meter_h;
190 int rmonitor_meter_x, rmonitor_meter_y;
191 int rmonitor_source_x, rmonitor_source_y;
192 int rmonitor_tx_x, rmonitor_tx_y;
194 int batchrender_x1, batchrender_x2, batchrender_x3;
196 int setformat_x1, setformat_x2, setformat_x3, setformat_x4;
197 int setformat_y1, setformat_y2, setformat_y3;
198 int setformat_w, setformat_h, setformat_margin;
199 int setformat_channels_x, setformat_channels_y, setformat_channels_w, setformat_channels_h;
200 int title_h;
201 int title_font, title_color;
202 int edit_font_color;
203 int vcanvas_x, vcanvas_y, vcanvas_w, vcanvas_h;
204 int vedit_x, vedit_y;
205 int vmeter_x, vmeter_y, vmeter_h;
206 int vslider_x, vslider_y, vslider_w;
207 int vsource_x, vsource_y;
208 int vtimebar_x, vtimebar_y, vtimebar_w, vtimebar_h;
209 int vtime_x, vtime_y, vtime_w;
210 int vtransport_x, vtransport_y;
211 int vzoom_x, vzoom_y;
215 // Bitmaps
216 VFrame *about_bg;
217 VFrame *about_microsoft;
218 VFrame **appendasset_data;
219 VFrame **append_data;
220 VFrame **arrow_data;
221 VFrame **asset_append_data;
222 VFrame **asset_disk_data;
223 VFrame **asset_index_data;
224 VFrame **asset_info_data;
225 VFrame **asset_project_data;
226 VFrame **autokeyframe_data;
227 VFrame *awindow_icon;
228 VFrame **bottom_justify;
229 VFrame **browse_data;
230 VFrame **calibrate_data;
231 VFrame **camera_data;
232 VFrame *camerakeyframe_data;
233 VFrame **cancel_data;
234 VFrame **center_justify;
235 VFrame **chain_data;
236 VFrame *channel_bg_data;
237 VFrame **channel_data;
238 VFrame *channel_position_data;
239 VFrame *clip_icon;
240 VFrame **copy_data;
241 VFrame **crop_data;
242 VFrame **cut_data;
243 VFrame *cwindow_icon;
244 VFrame **delete_all_indexes_data;
245 VFrame **deletebin_data;
246 VFrame **delete_data;
247 VFrame **deletedisk_data;
248 VFrame **deleteproject_data;
249 VFrame **detach_data;
250 VFrame **dntriangle_data;
251 VFrame **drawpatch_data;
252 VFrame **duplex_data;
253 VFrame **edit_data;
254 VFrame **edithandlein_data;
255 VFrame **edithandleout_data;
256 VFrame **end_data;
257 VFrame **expandpatch_data;
258 VFrame **extract_data;
259 VFrame **fastfwd_data;
260 VFrame **fastrev_data;
261 VFrame **fit_data;
262 VFrame **forward_data;
263 VFrame **framefwd_data;
264 VFrame **framerev_data;
265 VFrame **gangpatch_data;
266 VFrame **ibeam_data;
267 VFrame **in_data;
268 VFrame **indelete_data;
269 VFrame **infoasset_data;
270 VFrame **in_point;
271 VFrame **insert_data;
272 VFrame *keyframe_data;
273 VFrame **labelbutton_data;
274 VFrame **label_toggle;
275 VFrame **left_justify;
276 VFrame **lift_data;
277 VFrame **magnify_button_data;
278 VFrame **magnify_data;
279 VFrame **mask_data;
280 VFrame *maskkeyframe_data;
281 VFrame **middle_justify;
282 VFrame *modekeyframe_data;
283 VFrame **movedn_data;
284 VFrame **moveup_data;
285 VFrame **mutepatch_data;
286 VFrame *mwindow_icon;
287 VFrame **newbin_data;
288 VFrame **nextlabel_data;
289 VFrame **no_data;
290 VFrame **options_data;
291 VFrame **out_data;
292 VFrame **outdelete_data;
293 VFrame **out_point;
294 VFrame **over_button;
295 VFrame **overwrite_data;
296 VFrame *pankeyframe_data;
297 VFrame **pasteasset_data;
298 VFrame **paste_data;
299 VFrame *patchbay_bg;
300 VFrame **pause_data;
301 VFrame **paused_data;
302 VFrame **picture_data;
303 VFrame **playpatch_data;
304 VFrame *plugin_bg_data;
305 VFrame **presentation_data;
306 VFrame **presentation_loop;
307 VFrame **presentation_stop;
308 VFrame **prevlabel_data;
309 VFrame **proj_data;
310 VFrame *projectorkeyframe_data;
311 VFrame **protect_data;
312 VFrame **rec_data;
313 VFrame **recframe_data;
314 VFrame *record_icon;
315 VFrame **recordpatch_data;
316 VFrame **redo_data;
317 VFrame **redrawindex_data;
318 VFrame **renamebin_data;
319 VFrame **reset_data;
320 VFrame *resource1024_bg_data;
321 VFrame *resource128_bg_data;
322 VFrame *resource256_bg_data;
323 VFrame *resource32_bg_data;
324 VFrame *resource512_bg_data;
325 VFrame *resource64_bg_data;
326 VFrame **reverse_data;
327 VFrame **rewind_data;
328 VFrame **right_justify;
329 VFrame **select_data;
330 VFrame **show_meters;
331 VFrame **splice_data;
332 VFrame **start_over_data;
333 VFrame **statusbar_cancel_data;
334 VFrame **stop_data;
335 VFrame **stoprec_data;
336 VFrame *timebar_bg_data;
337 VFrame *timebar_brender_data;
338 VFrame *timebar_view_data;
339 VFrame *title_bg_data;
340 VFrame **titlesafe_data;
341 VFrame **toclip_data;
342 VFrame **tool_data;
343 VFrame **top_justify;
344 VFrame **transition_data;
345 VFrame **undo_data;
346 VFrame **uptriangle_data;
347 VFrame **viewasset_data;
348 VFrame *vtimebar_bg_data;
349 VFrame *vwindow_icon;
350 VFrame **wrench_data;
351 VFrame **yes_data;
354 MWindow *mwindow;
355 // Compressed images are loaded in here.
356 char *data_buffer;
357 char *contents_buffer;
358 ArrayList<char*> contents;
359 ArrayList<int> offsets;
360 char path[BCTEXTLEN];
361 char *last_image;
362 int last_offset;
365 #endif