Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / theme.h
blobe5fa489ac08bedf77e6dd99a676cfff85f0f008a
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 int audio_channels);
56 virtual void get_recordgui_sizes(RecordGUI *gui,
57 int w,
58 int h);
59 virtual void get_batchrender_sizes(BatchRenderGUI *gui,
60 int w,
61 int h);
62 virtual void get_plugindialog_sizes();
63 virtual void get_menueffect_sizes(int use_list);
64 virtual void draw_rwindow_bg(RecordGUI *gui);
65 virtual void draw_rmonitor_bg(RecordMonitorGUI *gui);
66 virtual void draw_awindow_bg(AWindowGUI *gui);
67 virtual void draw_cwindow_bg(CWindowGUI *gui);
68 virtual void draw_lwindow_bg(LevelWindowGUI *gui);
69 virtual void draw_mwindow_bg(MWindowGUI *gui);
70 virtual void draw_vwindow_bg(VWindowGUI *gui);
71 virtual void draw_resource_bg(TrackCanvas *canvas,
72 ResourcePixmap *pixmap,
73 int edit_x,
74 int edit_w,
75 int pixmap_x,
76 int x1,
77 int y1,
78 int x2,
79 int y2);
81 virtual void get_preferences_sizes();
82 virtual void draw_preferences_bg(PreferencesWindow *gui);
83 virtual void get_new_sizes(NewWindow *gui);
84 virtual void draw_new_bg(NewWindow *gui);
85 virtual void draw_new_bg2(NewWindow *gui, BC_WidgetGrid *grid_A, BC_WidgetGrid *grid_V);
86 virtual void draw_setformat_bg(SetFormatWindow *window);
88 virtual void build_menus();
89 // unsigned char* get_image(char *title);
90 void flush_images();
92 ArrayList<BC_ListBoxItem*> aspect_ratios;
93 ArrayList<BC_ListBoxItem*> frame_rates;
94 ArrayList<BC_ListBoxItem*> frame_sizes;
95 ArrayList<BC_ListBoxItem*> sample_rates;
96 ArrayList<BC_ListBoxItem*> zoom_values;
97 char *theme_title;
99 // Tools for building widgets
100 void overlay(VFrame *dst, VFrame *src, int in_x1 = -1, int in_x2 = -1);
101 void build_transport(char *title,
102 unsigned char *png_overlay,
103 VFrame **bg_data,
104 int region);
105 void build_patches(VFrame** &data,
106 unsigned char *png_overlay,
107 VFrame **bg_data,
108 int region);
109 void build_button(VFrame** &data,
110 unsigned char *png_overlay,
111 VFrame *up_vframe,
112 VFrame *hi_vframe,
113 VFrame *dn_vframe);
114 void build_toggle(VFrame** &data,
115 unsigned char *png_overlay,
116 VFrame *up_vframe,
117 VFrame *hi_vframe,
118 VFrame *checked_vframe,
119 VFrame *dn_vframe,
120 VFrame *checkedhi_vframe);
122 // colors for the main message text
123 int message_normal, message_error;
126 // Locations
127 int abinbuttons_x, abinbuttons_y;
128 int abuttons_x, abuttons_y;
129 int adivider_x, adivider_y, adivider_w, adivider_h;
130 int afolders_x, afolders_y, afolders_w, afolders_h;
131 int alist_x, alist_y, alist_w, alist_h;
132 int audio_color;
133 int browse_pad;
134 int cauto_x, cauto_y, cauto_w, cauto_h;
135 int ccanvas_x, ccanvas_y, ccanvas_w, ccanvas_h;
136 int ccomposite_x, ccomposite_y, ccomposite_w, ccomposite_h;
137 int cstatus_x, cstatus_y;
138 int cdest_x, cdest_y;
139 int cedit_x, cedit_y;
140 int channel_position_color;
141 int cmeter_x, cmeter_y, cmeter_h;
142 int cslider_x, cslider_y, cslider_w;
143 int ctime_x, ctime_y;
144 int ctimebar_x, ctimebar_y, ctimebar_w, ctimebar_h;
145 int ctransport_x, ctransport_y;
146 int czoom_x, czoom_y;
147 int fade_h;
148 int loadfile_pad;
149 int loadmode_w;
150 int mbuttons_x, mbuttons_y, mbuttons_w, mbuttons_h;
151 // pixels between end transport button and arrow button
152 int mtransport_margin;
153 int mcanvas_x, mcanvas_y, mcanvas_w, mcanvas_h;
154 int mclock_x, mclock_y, mclock_w, mclock_h;
155 int mhscroll_x, mhscroll_y, mhscroll_w;
156 int mvscroll_x, mvscroll_y, mvscroll_h;
157 int meter_h;
158 int mode_h;
159 int mstatus_x, mstatus_y, mstatus_w, mstatus_h;
160 int mstatus_message_x, mstatus_message_y;
161 int mstatus_progress_x, mstatus_progress_y, mstatus_progress_w;
162 int mstatus_cancel_x, mstatus_cancel_y;
163 int mtimebar_x, mtimebar_y, mtimebar_w, mtimebar_h;
164 int mzoom_x, mzoom_y, mzoom_w, mzoom_h;
165 int new_audio_x, new_audio_y;
166 int new_ok_x, new_ok_y;
167 int new_video_x, new_video_y;
168 int pan_h;
169 int pan_x;
170 int play_h;
171 int preferencescategory_x, preferencescategory_y;
172 // Overlap between category buttons
173 int preferences_category_overlap;
174 int preferencestitle_x, preferencestitle_y;
175 int preferencesoptions_x, preferencesoptions_y;
176 int patchbay_x, patchbay_y, patchbay_w, patchbay_h;
177 // pixels between toggles and buttons in edit panel
178 int toggle_margin;
180 int plugindialog_new_x, plugindialog_new_y, plugindialog_new_w, plugindialog_new_h;
181 int plugindialog_shared_x, plugindialog_shared_y, plugindialog_shared_w, plugindialog_shared_h;
182 int plugindialog_module_x, plugindialog_module_y, plugindialog_module_w, plugindialog_module_h;
183 int plugindialog_newattach_x, plugindialog_newattach_y;
184 int plugindialog_sharedattach_x, plugindialog_sharedattach_y;
185 int plugindialog_moduleattach_x, plugindialog_moduleattach_y;
187 int menueffect_list_x, menueffect_list_y, menueffect_list_w, menueffect_list_h;
188 int menueffect_file_x, menueffect_file_y;
189 int menueffect_tools_x, menueffect_tools_y;
192 int recordgui_batches_w, recordgui_batches_h;
193 int recordgui_batches_x, recordgui_batches_y;
194 int recordgui_batch_x, recordgui_batch_y, recordgui_batchcaption_x;
195 int recordgui_options_x, recordgui_options_y;
196 int recordgui_controls_x, recordgui_controls_y;
197 int recordgui_loadmode_x, recordgui_loadmode_y;
198 int recordgui_status_x, recordgui_status_y, recordgui_status_x2;
199 int recordgui_transport_x, recordgui_transport_y;
200 int recordgui_fixed_color, recordgui_variable_color;
201 int rmonitor_canvas_w, rmonitor_canvas_h;
202 int rmonitor_canvas_x, rmonitor_canvas_y;
203 int rmonitor_channel_x, rmonitor_channel_y;
204 int rmonitor_interlace_x, rmonitor_interlace_y;
205 int rmonitor_meter_h;
206 int rmonitor_meter_x, rmonitor_meter_y;
207 int rmonitor_source_x, rmonitor_source_y;
208 int rmonitor_tx_x, rmonitor_tx_y;
210 int batchrender_x1, batchrender_x2, batchrender_x3;
212 int setformat_x1, setformat_x2, setformat_x3, setformat_x4;
213 int setformat_y1, setformat_y2, setformat_y3;
214 int setformat_w, setformat_h, setformat_margin;
215 int setformat_channels_x, setformat_channels_y, setformat_channels_w, setformat_channels_h;
216 int title_h;
217 int title_font, title_color;
218 int edit_font_color;
219 int vcanvas_x, vcanvas_y, vcanvas_w, vcanvas_h;
220 int vedit_x, vedit_y;
221 int vmeter_x, vmeter_y, vmeter_h;
222 int vslider_x, vslider_y, vslider_w;
223 int vsource_x, vsource_y;
224 int vtimebar_x, vtimebar_y, vtimebar_w, vtimebar_h;
225 int vtime_x, vtime_y, vtime_w;
226 int vtransport_x, vtransport_y;
227 int vzoom_x, vzoom_y;
231 // Bitmaps
232 VFrame *about_bg;
233 VFrame **appendasset_data;
234 VFrame **append_data;
235 VFrame **asset_append_data;
236 VFrame **asset_disk_data;
237 VFrame **asset_index_data;
238 VFrame **asset_info_data;
239 VFrame **asset_project_data;
240 VFrame **browse_data;
241 VFrame **calibrate_data;
242 VFrame *camerakeyframe_data;
243 VFrame **cancel_data;
244 VFrame **chain_data;
245 VFrame *channel_bg_data;
246 VFrame *channel_position_data;
247 VFrame **delete_all_indexes_data;
248 VFrame **deletebin_data;
249 VFrame **delete_data;
250 VFrame **deletedisk_data;
251 VFrame **deleteproject_data;
252 VFrame **detach_data;
253 VFrame **dntriangle_data;
255 VFrame **edit_data;
256 VFrame **edithandlein_data;
257 VFrame **edithandleout_data;
258 VFrame **extract_data;
259 VFrame **infoasset_data;
260 VFrame **in_point;
261 VFrame **insert_data;
262 VFrame *keyframe_data;
263 VFrame **label_toggle;
264 VFrame **lift_data;
265 VFrame *maskkeyframe_data;
266 VFrame *modekeyframe_data;
267 VFrame **movedn_data;
268 VFrame **moveup_data;
269 VFrame **newbin_data;
270 VFrame **no_data;
271 VFrame **options_data;
272 VFrame **out_point;
273 VFrame **over_button;
274 VFrame **overwrite_data;
275 VFrame *pankeyframe_data;
276 VFrame **pasteasset_data;
277 VFrame **paused_data;
278 VFrame **picture_data;
279 VFrame **presentation_data;
280 VFrame **presentation_loop;
281 VFrame **presentation_stop;
282 VFrame *projectorkeyframe_data;
283 VFrame **redrawindex_data;
284 VFrame **renamebin_data;
285 VFrame **reset_data;
286 VFrame **reverse_data;
287 VFrame **rewind_data;
288 VFrame **select_data;
289 VFrame **splice_data;
290 VFrame **start_over_data;
291 VFrame **statusbar_cancel_data;
292 VFrame *timebar_view_data;
293 VFrame **transition_data;
294 VFrame **uptriangle_data;
295 VFrame **viewasset_data;
296 VFrame *vtimebar_bg_data;
300 MWindow *mwindow;
301 // Compressed images are loaded in here.
302 char *data_buffer;
303 char *contents_buffer;
304 ArrayList<char*> contents;
305 ArrayList<int> offsets;
306 char path[BCTEXTLEN];
307 char *last_image;
308 int last_offset;
311 #endif
313 // Local Variables:
314 // mode: C++
315 // c-file-style: "linux"
316 // End: