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