rework camera/projector tool_guis, add horz tumbler orient, update es.po
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / theme_blond_cv / blondcvtheme.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "bcsignals.h"
23 #include "clip.h"
24 #include "cstrdup.h"
25 #include "cwindowgui.h"
26 #include "blondcvtheme.h"
27 #include "edl.h"
28 #include "edlsession.h"
29 #include "mainmenu.h"
30 #include "mainsession.h"
31 #include "mbuttons.h"
32 #include "meterpanel.h"
33 #include "mwindow.h"
34 #include "mwindowgui.h"
35 #include "new.h"
36 #include "patchbay.h"
37 #include "preferencesthread.h"
38 #include "recordgui.h"
39 //#include "recordmonitor.h"
40 #include "setformat.h"
41 #include "statusbar.h"
42 #include "timebar.h"
43 #include "trackcanvas.h"
44 #include "vframe.h"
45 #include "vwindowgui.h"
46
47
48 PluginClient* new_plugin(PluginServer *server)
49 {
50         return new BlondCVThemeMain(server);
51 }
52
53 BlondCVThemeMain::BlondCVThemeMain(PluginServer *server)
54  : PluginTClient(server)
55 {
56 }
57
58 BlondCVThemeMain::~BlondCVThemeMain()
59 {
60 }
61
62 const char* BlondCVThemeMain::plugin_title() { return N_("Blond-cv"); }
63
64 Theme* BlondCVThemeMain::new_theme()
65 {
66         theme = new BlondCVTheme;
67         extern unsigned char _binary_theme_blond_cv_data_start[];
68         theme->set_data(_binary_theme_blond_cv_data_start);
69         return theme;
70 }
71
72
73 BlondCVTheme::BlondCVTheme()
74  : Theme()
75 {
76 }
77
78 BlondCVTheme::~BlondCVTheme()
79 {
80         delete camerakeyframe_data;
81         delete channel_bg_data;
82         delete channel_position_data;
83         delete keyframe_data;
84         delete maskkeyframe_data;
85         delete modekeyframe_data;
86         delete hardedge_data;
87         delete pankeyframe_data;
88         delete projectorkeyframe_data;
89 }
90
91 void BlondCVTheme::initialize()
92 {
93         BC_Resources *resources = BC_WindowBase::get_resources();
94         resources->generic_button_images = new_image_set(3,
95                         "generic_up.png",
96                         "generic_hi.png",
97                         "generic_dn.png");
98         resources->horizontal_slider_data = new_image_set(6,
99                         "hslider_fg_up.png",
100                         "hslider_fg_hi.png",
101                         "hslider_fg_dn.png",
102                         "hslider_bg_up.png",
103                         "hslider_bg_hi.png",
104                         "hslider_bg_dn.png");
105         resources->vertical_slider_data = new_image_set(6,
106                         "hslider_fg_up.png",
107                         "hslider_fg_hi.png",
108                         "hslider_fg_dn.png",
109                         "hslider_bg_up.png",
110                         "hslider_bg_hi.png",
111                         "hslider_bg_dn.png");
112         for( int i=0; i<6; ++i )
113                 resources->vertical_slider_data[i]->rotate90();
114
115         resources->progress_images = new_image_set(2,
116                         "progress_bg.png",
117                         "progress_hi.png");
118         resources->tumble_data = new_image_set(4,
119                 "tumble_up.png",
120                 "tumble_hi.png",
121                 "tumble_botdn.png",
122                 "tumble_topdn.png");
123         new_image_set("tumblepatch_data", 4,
124                 "tumblepatch_up.png",
125                 "tumblepatch_hi.png",
126                 "tumblepatch_bottom.png",
127                 "tumblepatch_top.png");
128         resources->listbox_button = new_image_set(4,
129                 "listbox_button_up.png",
130                 "listbox_button_hi.png",
131                 "listbox_button_dn.png",
132                 "listbox_button_hi.png");
133         resources->listbox_column = new_image_set(3,
134                 "listbox_column_up.png",
135                 "listbox_column_hi.png",
136                 "listbox_column_dn.png");
137         resources->pan_data = new_image_set(7,
138                         "pan_up.png",
139                         "pan_hi.png",
140                         "pan_popup.png",
141                         "pan_channel.png",
142                         "pan_stick.png",
143                         "pan_channel_small.png",
144                         "pan_stick_small.png");
145         resources->pan_text_color = WHITE;
146
147         resources->pot_images = new_image_set(3,
148                 "pot_up.png",
149                 "pot_hi.png",
150                 "pot_dn.png");
151
152         resources->text_default = 0x000000;
153         resources->text_background = 0xffffff;
154         resources->text_background_disarmed = 0xff0000;
155         resources->text_border1 = 0x4a484a; // (top outer)
156         resources->text_border2 = 0x000000; // (top inner)
157         resources->text_border3 = 0xacaeac; // (bottom inner)
158         resources->text_border4 = 0xffffff; // (bottom outer)
159         resources->text_inactive_highlight = 0xacacac;
160         resources->checkbox_images = new_image_set(5,
161                 "checkbox_up.png",
162                 "checkbox_uphi.png",
163                 "checkbox_checked.png",
164                 "checkbox_down.png",
165                 "checkbox_checkedhi.png");
166
167         resources->bg_color = BLOND;
168         resources->default_text_color = 0x000000;
169         resources->menu_title_text    = 0x000000;
170         resources->popup_title_text   = 0x000000;
171         resources->menu_item_text     = 0x000000;
172         resources->radial_images = new_image_set(5,
173                 "radial_up.png",
174                 "radial_uphi.png",
175                 "radial_checked.png",
176                 "radial_down.png",
177                 "radial_checkedhi.png");
178
179         resources->generic_button_margin = xS(15);
180         resources->pot_needle_color = resources->text_default;
181         resources->pot_offset = 1;
182         resources->progress_text = resources->text_default;
183         resources->meter_font_color = RED;
184         resources->xmeter_images = new_image_set(7,
185                 "xmeter_normal.png",
186                 "xmeter_green.png",
187                 "xmeter_red.png",
188                 "xmeter_yellow.png",
189                 "xmeter_white.png",
190                 "xmeter_over.png",
191                 "downmix51_2.png");
192         resources->ymeter_images = new_image_set(7,
193                 "ymeter_normal.png",
194                 "ymeter_green.png",
195                 "ymeter_red.png",
196                 "ymeter_yellow.png",
197                 "ymeter_white.png",
198                 "ymeter_over.png",
199                 "downmix51_2.png");
200
201         resources->menu_light = 0x00cacd;
202         resources->menu_highlighted = 0x9c95ff;
203         resources->menu_down = 0x007d7b;
204         resources->menu_up = 0x009594;
205         resources->menu_shadow = 0x004a4a;
206         resources->popupmenu_margin = xS(10);
207         resources->popupmenu_triangle_margin = xS(15);
208         resources->hscroll_data = new_image_set(10,
209                         "hscroll_center_up.png",
210                         "hscroll_center_hi.png",
211                         "hscroll_center_dn.png",
212                         "hscroll_bg.png",
213                         "hscroll_back_up.png",
214                         "hscroll_back_hi.png",
215                         "hscroll_back_dn.png",
216                         "hscroll_fwd_up.png",
217                         "hscroll_fwd_hi.png",
218                         "hscroll_fwd_dn.png");
219
220         resources->listbox_title_color = 0x000000;
221         resources->vscroll_data = new_image_set(10,
222                         "vscroll_center_up.png",
223                         "vscroll_center_hi.png",
224                         "vscroll_center_dn.png",
225                         "vscroll_bg.png",
226                         "vscroll_back_up.png",
227                         "vscroll_back_hi.png",
228                         "vscroll_back_dn.png",
229                         "vscroll_fwd_up.png",
230                         "vscroll_fwd_hi.png",
231                         "vscroll_fwd_dn.png");
232
233         resources->listbox_title_margin = 0;
234         resources->listbox_title_hotspot = xS(5);  // No. of pixels around the borders to allow dragging
235         resources->listbox_border1 = 0x4a484a; // (top outer)
236         resources->listbox_border2 = 0x000000; // (top inner)
237         resources->listbox_border3 = 0xffe200; // (bottom inner)
238         resources->listbox_border4 = 0xffffff; // (bottom outer)
239         resources->listbox_highlighted = 0xeee6ee;
240         resources->listbox_inactive = 0xffffffff; // (background)
241         resources->listbox_bg = new_image("list_bg.png");
242         resources->listbox_text = 0x000000;
243         resources->ok_images = new_button("ok.png",
244                         "generic_up.png",
245                         "generic_hi.png",
246                         "generic_dn.png",
247                         "ok_button");
248
249         resources->dirbox_margin = yS(50);
250         resources->filebox_margin = yS(120);
251         resources->file_color = 0x000000;
252         resources->directory_color = 0x0000ff;
253
254 // Record windows
255         rgui_batch = new_image("recordgui_batch.png");
256         rgui_controls = new_image("recordgui_controls.png");
257         rgui_list = new_image("recordgui_list.png");
258         rmonitor_panel = new_image("recordmonitor_panel.png");
259         rmonitor_meters = new_image("recordmonitor_meters.png");
260
261         resources->filebox_icons_images = new_button("icons.png",
262                 "fileboxbutton_up.png",
263                 "fileboxbutton_hi.png",
264                 "fileboxbutton_dn.png",
265                 "filebox_icons");
266
267         resources->filebox_text_images = new_button("text.png",
268                 "fileboxbutton_up.png",
269                 "fileboxbutton_hi.png",
270                 "fileboxbutton_dn.png",
271                 "filebox_text");
272
273         resources->filebox_newfolder_images = new_button("folder.png",
274                 "fileboxbutton_up.png",
275                 "fileboxbutton_hi.png",
276                 "fileboxbutton_dn.png",
277                 "filebox_newfolder");
278
279         resources->filebox_rename_images = new_button("rename.png",
280                 "fileboxbutton_up.png",
281                 "fileboxbutton_hi.png",
282                 "fileboxbutton_dn.png",
283                 "filebox_rename");
284
285         resources->filebox_updir_images = new_button("updir.png",
286                 "fileboxbutton_up.png",
287                 "fileboxbutton_hi.png",
288                 "fileboxbutton_dn.png",
289                 "filebox_updir");
290
291         resources->filebox_delete_images = new_button("delete.png",
292                 "fileboxbutton_up.png",
293                 "fileboxbutton_hi.png",
294                 "fileboxbutton_dn.png",
295                 "filebox_delete");
296
297         resources->filebox_reload_images = new_button("reload.png",
298                 "fileboxbutton_up.png",
299                 "fileboxbutton_hi.png",
300                 "fileboxbutton_dn.png",
301                 "filebox_reload");
302
303
304         resources->filebox_descend_images = new_button("openfolder.png",
305                 "generic_up.png",
306                 "generic_hi.png",
307                 "generic_dn.png",
308                 "filebox_descend");
309
310         resources->usethis_button_images =
311                 resources->ok_images = new_button("ok.png",
312                 "generic_up.png",
313                 "generic_hi.png",
314                 "generic_dn.png",
315                 "ok_button");
316
317         new_button("ok.png",
318                 "generic_up.png",
319                 "generic_hi.png",
320                 "generic_dn.png",
321                 "new_ok_images");
322
323         new_button("reset.png",
324                 "reset_up.png",
325                 "reset_hi.png",
326                 "reset_dn.png",
327                 "reset_button");
328
329         new_button("unclear.png",
330                 "unclear_up.png",
331                 "unclear_hi.png",
332                 "unclear_dn.png",
333                 "unclear_button");
334
335         new_button("keyframe.png",
336                 "keyframe_up.png",
337                 "keyframe_hi.png",
338                 "keyframe_dn.png",
339                 "keyframe_button");
340
341         resources->cancel_images = new_button("cancel.png",
342                 "generic_up.png",
343                 "generic_hi.png",
344                 "generic_dn.png",
345                 "cancel_button");
346
347         new_button("cancel.png",
348                 "generic_up.png",
349                 "generic_hi.png",
350                 "generic_dn.png",
351                 "new_cancel_images");
352
353         new_button("mask_pnt_linear.png",
354                 "mask_button_up.png",
355                 "mask_button_hi.png",
356                 "mask_button_dn.png",
357                 "mask_pnt_linear_images");
358         new_button("mask_crv_linear.png",
359                 "mask_button_up.png",
360                 "mask_button_hi.png",
361                 "mask_button_dn.png",
362                 "mask_crv_linear_images");
363         new_button("mask_all_linear.png",
364                 "mask_button_up.png",
365                 "mask_button_hi.png",
366                 "mask_button_dn.png",
367                 "mask_all_linear_images");
368
369         new_button("mask_pnt_smooth.png",
370                 "mask_button_up.png",
371                 "mask_button_hi.png",
372                 "mask_button_dn.png",
373                 "mask_pnt_smooth_images");
374         new_button("mask_crv_smooth.png",
375                 "mask_button_up.png",
376                 "mask_button_hi.png",
377                 "mask_button_dn.png",
378                 "mask_crv_smooth_images");
379         new_button("mask_all_smooth.png",
380                 "mask_button_up.png",
381                 "mask_button_hi.png",
382                 "mask_button_dn.png",
383                 "mask_all_smooth_images");
384
385         new_button("mask_prst_sqr.png",
386                 "mask_button_up.png",
387                 "mask_button_hi.png",
388                 "mask_button_dn.png",
389                 "mask_prst_sqr_images");
390         new_button("mask_prst_crc.png",
391                 "mask_button_up.png",
392                 "mask_button_hi.png",
393                 "mask_button_dn.png",
394                 "mask_prst_crc_images");
395         new_button("mask_prst_tri.png",
396                 "mask_button_up.png",
397                 "mask_button_hi.png",
398                 "mask_button_dn.png",
399                 "mask_prst_tri_images");
400         new_button("mask_prst_ovl.png",
401                 "mask_button_up.png",
402                 "mask_button_hi.png",
403                 "mask_button_dn.png",
404                 "mask_prst_ovl_images");
405
406         new_button("mask_prst_load.png",
407                 "mask_button_up.png",
408                 "mask_button_hi.png",
409                 "mask_button_dn.png",
410                 "mask_prst_load_images");
411         new_button("mask_prst_save.png",
412                 "mask_button_up.png",
413                 "mask_button_hi.png",
414                 "mask_button_dn.png",
415                 "mask_prst_save_images");
416         new_button("mask_prst_trsh.png",
417                 "mask_button_up.png",
418                 "mask_button_hi.png",
419                 "mask_button_dn.png",
420                 "mask_prst_trsh_images");
421
422         new_button("mask_pstn_cen.png",
423                 "mask_button_up.png",
424                 "mask_button_hi.png",
425                 "mask_button_dn.png",
426                 "mask_pstn_cen_images");
427         new_button("mask_pstn_nrm.png",
428                 "mask_button_up.png",
429                 "mask_button_hi.png",
430                 "mask_button_dn.png",
431                 "mask_pstn_nrm_images");
432
433         new_toggle("loadmode_new.png",
434                 "loadmode_up.png",
435                 "loadmode_hi.png",
436                 "loadmode_checked.png",
437                 "loadmode_dn.png",
438                 "loadmode_checkedhi.png",
439                 "loadmode_new");
440         new_toggle("loadmode_none.png",
441                 "loadmode_up.png",
442                 "loadmode_hi.png",
443                 "loadmode_checked.png",
444                 "loadmode_dn.png",
445                 "loadmode_checkedhi.png",
446                 "loadmode_none");
447         new_toggle("loadmode_newcat.png",
448                 "loadmode_up.png",
449                 "loadmode_hi.png",
450                 "loadmode_checked.png",
451                 "loadmode_dn.png",
452                 "loadmode_checkedhi.png",
453                 "loadmode_newcat");
454         new_toggle("loadmode_cat.png",
455                 "loadmode_up.png",
456                 "loadmode_hi.png",
457                 "loadmode_checked.png",
458                 "loadmode_dn.png",
459                 "loadmode_checkedhi.png",
460                 "loadmode_cat");
461         new_toggle("loadmode_newtracks.png",
462                 "loadmode_up.png",
463                 "loadmode_hi.png",
464                 "loadmode_checked.png",
465                 "loadmode_dn.png",
466                 "loadmode_checkedhi.png",
467                 "loadmode_newtracks");
468         new_toggle("loadmode_paste.png",
469                 "loadmode_up.png",
470                 "loadmode_hi.png",
471                 "loadmode_checked.png",
472                 "loadmode_dn.png",
473                 "loadmode_checkedhi.png",
474                 "loadmode_paste");
475         new_toggle("loadmode_resource.png",
476                 "loadmode_up.png",
477                 "loadmode_hi.png",
478                 "loadmode_checked.png",
479                 "loadmode_dn.png",
480                 "loadmode_checkedhi.png",
481                 "loadmode_resource");
482
483         new_toggle("loadmode_edl_clip.png",
484                 "loadmode_up.png",
485                 "loadmode_hi.png",
486                 "loadmode_checked.png",
487                 "loadmode_dn.png",
488                 "loadmode_checkedhi.png",
489                 "loadmode_edl_clip");
490         new_toggle("loadmode_edl_nested.png",
491                 "loadmode_up.png",
492                 "loadmode_hi.png",
493                 "loadmode_checked.png",
494                 "loadmode_dn.png",
495                 "loadmode_checkedhi.png",
496                 "loadmode_edl_nested");
497         new_toggle("loadmode_edl_fileref.png",
498                 "loadmode_up.png",
499                 "loadmode_hi.png",
500                 "loadmode_checked.png",
501                 "loadmode_dn.png",
502                 "loadmode_checkedhi.png",
503                 "loadmode_edl_fileref");
504
505         resources->bar_data = new_image("bar", "bar.png");
506
507         resources->min_menu_w = 0;
508         resources->menu_popup_bg = 0;  // if (0) use menu_light, menu_up, menu_shadow
509         resources->menu_item_bg = 0;   // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
510         resources->menu_bar_bg = 0;    // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8
511         resources->menu_title_bg =  0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
512
513
514         resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images
515
516         resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C
517
518         resources->vertical_slider_data = new_image_set(6,
519                         "vertical_slider_fg_up.png",
520                         "vertical_slider_fg_hi.png",
521                         "vertical_slider_fg_dn.png",
522                         "vertical_slider_bg_up.png",
523                         "vertical_slider_bg_hi.png",
524                         "vertical_slider_bg_dn.png");
525         resources->listbox_expand = new_image_set(5,
526                 "listbox_expandup.png",
527                 "listbox_expanduphi.png",
528                 "listbox_expandchecked.png",
529                 "listbox_expanddn.png",
530                 "listbox_expandcheckedhi.png");
531         resources->listbox_up = new_image("listbox_up.png");
532         resources->listbox_dn = new_image("listbox_dn.png");
533
534 // MWindow
535         mbutton_left = new_image("mbutton_left.png");
536         mbutton_right = new_image("mbutton_right.png");
537         new_image("timebar_bg", "timebar_bg.png");
538         new_image("timebar_brender", "timebar_brender.png");
539         new_image("clock_bg", "mclock.png");
540         new_image("patchbay_bg", "patchbay_bg.png");
541         tracks_bg = new_image("tracks_bg.png");
542         zoombar_left = new_image("zoombar_left.png");
543         zoombar_right = new_image("zoombar_right.png");
544         statusbar_left = new_image("statusbar_left.png");
545         statusbar_right = new_image("statusbar_right.png");
546
547         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
548         new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
549         new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
550
551         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
552         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
553         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
554         new_button("swap_extents.png",
555                 "editpanel_up.png",
556                 "editpanel_hi.png",
557                 "editpanel_dn.png",
558                 "swap_extents");
559         preferences_category_overlap = 0;
560         preferencescategory_x = xS(5);
561         preferencescategory_y = yS(5);
562         preferencestitle_x = xS(5);
563         preferencestitle_y = yS(10);
564         preferencesoptions_x = xS(5);
565         preferencesoptions_y = 0;
566 // CWindow
567         cpanel_bg = new_image("cpanel_bg.png");
568         cbuttons_left = new_image("cbuttons_left.png");
569         cbuttons_right = new_image("cbuttons_right.png");
570         cmeter_bg = new_image("cmeter_bg.png");
571         new_image("cwindow_focus", "cwindow_focus.png");
572
573         ctimebar_x = ccanvas_x;
574         ctimebar_y = ccanvas_y + ccanvas_h;
575         ctimebar_w = ccanvas_w;
576
577         message_normal = resources->text_default;
578         audio_color = BLACK;
579         mtransport_margin = xS(11);
580         toggle_margin = xS(11);
581 // VWindow
582         vbuttons_left = new_image("vbuttons_left.png");
583         vbuttons_right = new_image("vbuttons_right.png");
584         vmeter_bg = new_image("vmeter_bg.png");
585
586         new_image("mbutton_bg", "mbutton_bg.png");
587         new_image("mbutton_blue", "mbutton_blue.png");
588         new_image("tracks_bg","tracks_bg.png");
589         new_image("zoombar_left","zoombar_left.png");
590         new_image("zoombar_right","zoombar_right.png");
591         new_image("statusbar_left","statusbar_left.png");
592         new_image("statusbar_right","statusbar_right.png");
593         preferences_bg = new_image("preferences_bg.png");
594
595         new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
596         new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
597         new_image_set("auto_range", 4, "autorange_up.png", "autorange_hi.png", "autorange_bottom.png", "autorange_top.png");
598
599         new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
600         new_image("mode_add", "mode_add.png");
601         new_image("mode_divide", "mode_divide.png");
602         new_image("mode_multiply", "mode_multiply.png");
603         new_image("mode_normal", "mode_normal.png");
604         new_image("mode_replace", "mode_replace.png");
605         new_image("mode_subtract", "mode_subtract.png");
606         new_image("mode_max", "mode_max.png");
607         new_image("mode_min", "mode_min.png");
608
609         new_bg = new_image("new_bg.png");
610         setformat_bg = new_image("setformat_bg2.png");
611
612         new_toggle("plugin_on.png",
613                 "pluginbutton_hi.png",
614                 "pluginbutton_hi.png",
615                 "pluginbutton_select.png",
616                 "pluginbutton_dn.png",
617                 "pluginbutton_selecthi.png",
618                 "plugin_on");
619
620         new_toggle("plugin_show.png",
621                 "plugin_show.png",
622                 "pluginbutton_hi.png",
623                 "pluginbutton_select.png",
624                 "pluginbutton_dn.png",
625                 "pluginbutton_selecthi.png",
626                 "plugin_show");
627         new_image("cpanel_bg", "cpanel_bg.png");
628         new_image("cbuttons_left", "cbuttons_left.png");
629         new_image("cbuttons_right", "cbuttons_right.png");
630         new_image("cmeter_bg", "cmeter_bg.png");
631         new_image("vbuttons_left", "vbuttons_left.png");
632         timebar_view_data = new_image("timebar_view.png");
633
634         new_image("preferences_bg", "preferences_bg.png");
635
636
637         new_image("new_bg", "new_bg.png");
638         new_image("setformat_bg", "setformat_bg2.png");
639         setformat_w = get_image("setformat_bg")->get_w();
640         setformat_h = get_image("setformat_bg")->get_h();
641         setformat_x1 = xS(15);
642         setformat_x2 = xS(100);
643         setformat_x3 = xS(315);
644         setformat_x4 = xS(415);
645         setformat_y1 = yS(20);
646         setformat_y2 = yS(85);
647         setformat_y3 = yS(125);
648         setformat_margin = xS(30);
649         setformat_channels_x = xS(25);
650         setformat_channels_y = yS(242);
651         setformat_channels_w = xS(250);
652         setformat_channels_h = yS(250);
653
654         loadfile_pad = yS(52);
655         browse_pad = yS(20);
656
657         new_image_set("playpatch_data",
658                 5,
659                 "playpatch_up.png",
660                 "playpatch_hi.png",
661                 "playpatch_checked.png",
662                 "playpatch_dn.png",
663                 "playpatch_checkedhi.png");
664
665         new_image_set("recordpatch_data",
666                 5,
667                 "recordpatch_up.png",
668                 "recordpatch_hi.png",
669                 "recordpatch_checked.png",
670                 "recordpatch_dn.png",
671                 "recordpatch_checkedhi.png");
672
673         new_image_set("gangpatch_data",
674                 5,
675                 "gangpatch_up.png",
676                 "gangpatch_hi.png",
677                 "gangpatch_checked.png",
678                 "gangpatch_dn.png",
679                 "gangpatch_checkedhi.png");
680
681         new_image_set("drawpatch_data",
682                 5,
683                 "drawpatch_up.png",
684                 "drawpatch_hi.png",
685                 "drawpatch_checked.png",
686                 "drawpatch_dn.png",
687                 "drawpatch_checkedhi.png");
688
689
690         new_image_set("mutepatch_data",
691                 5,
692                 "mutepatch_up.png",
693                 "mutepatch_hi.png",
694                 "mutepatch_checked.png",
695                 "mutepatch_dn.png",
696                 "mutepatch_checkedhi.png");
697         build_icons();
698         build_bg_data();
699
700         new_image_set("expandpatch_data",
701                 5,
702                 "expandpatch_up.png",
703                 "expandpatch_hi.png",
704                 "expandpatch_checked.png",
705                 "expandpatch_dn.png",
706                 "expandpatch_checkedhi.png");
707         new_image_set("drawpatch_data", 5, "drawpatch_up.png", "drawpatch_hi.png", "drawpatch_checked.png", "drawpatch_dn.png", "drawpatch_checkedhi.png");
708         new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png");
709         new_image_set("gangpatch_data", 5, "gangpatch_up.png", "gangpatch_hi.png", "gangpatch_checked.png", "gangpatch_dn.png", "gangpatch_checkedhi.png");
710         new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png");
711         new_image_set("playpatch_data", 5, "playpatch_up.png", "playpatch_hi.png", "playpatch_checked.png", "playpatch_dn.png", "playpatch_checkedhi.png");
712         new_image_set("recordpatch_data", 5, "recordpatch_up.png", "recordpatch_hi.png", "recordpatch_checked.png", "recordpatch_dn.png", "recordpatch_checkedhi.png");
713
714         build_overlays();
715
716         out_point = new_image_set(5,
717                 "out_up.png",
718                 "out_hi.png",
719                 "out_checked.png",
720                 "out_dn.png",
721                 "out_checkedhi.png");
722         in_point = new_image_set(5,
723                 "in_up.png",
724                 "in_hi.png",
725                 "in_checked.png",
726                 "in_dn.png",
727                 "in_checkedhi.png");
728
729         label_toggle = new_image_set(5,
730                 "labeltoggle_up.png",
731                 "labeltoggle_uphi.png",
732                 "label_checked.png",
733                 "labeltoggle_dn.png",
734                 "label_checkedhi.png");
735
736         ffmpeg_toggle = new_image_set(5,
737                 "ff_up.png",
738                 "ff_hi.png",
739                 "ff_checked.png",
740                 "ff_down.png",
741                 "ff_checkedhi.png");
742
743         proxy_p_toggle = new_image_set(5,
744                 "proxy_p_up.png",
745                 "proxy_p_hi.png",
746                 "proxy_p_chkd.png",
747                 "proxy_p_down.png",
748                 "proxy_p_chkdhi.png");
749
750         proxy_s_toggle = new_image_set(5,
751                 "proxy_s_up.png",
752                 "proxy_s_hi.png",
753                 "proxy_s_chkd.png",
754                 "proxy_s_down.png",
755                 "proxy_s_chkdhi.png");
756
757         mask_mode_toggle = new_image_set(5,
758                 "mask_mode_up.png",
759                 "mask_mode_hi.png",
760                 "mask_mode_chkd.png",
761                 "mask_mode_down.png",
762                 "mask_mode_chkdhi.png");
763
764         shbtn_data = new_image_set(3,
765                 "shbtn_up.png",
766                 "shbtn_hi.png",
767                 "shbtn_dn.png");
768
769         new_image_set("preset_edit",
770                 3,
771                 "preset_edit0.png",
772                 "preset_edit1.png",
773                 "preset_edit2.png");
774
775         statusbar_cancel_data = new_image_set(3,
776                 "statusbar_cancel_up.png",
777                 "statusbar_cancel_hi.png",
778                 "statusbar_cancel_dn.png");
779
780
781         VFrame *editpanel_up = new_image("editpanel_up.png");
782         VFrame *editpanel_hi = new_image("editpanel_hi.png");
783         VFrame *editpanel_dn = new_image("editpanel_dn.png");
784         VFrame *editpanel_checked = new_image("editpanel_checked.png");
785         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
786
787         new_image("panel_divider", "panel_divider.png");
788         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
789         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
790         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
791         new_button("lok.png", editpanel_up, editpanel_hi, editpanel_dn, "lok");
792
793         new_toggle("histogram_toggle.png",
794                 editpanel_up,
795                 editpanel_hi,
796                 editpanel_checked,
797                 editpanel_dn,
798                 editpanel_checkedhi,
799                 "histogram_toggle");
800         new_toggle("histogram_rgb.png",
801                 editpanel_up,
802                 editpanel_hi,
803                 editpanel_checked,
804                 editpanel_dn,
805                 editpanel_checkedhi,
806                 "histogram_rgb_toggle");
807         new_toggle("waveform.png",
808                 editpanel_up,
809                 editpanel_hi,
810                 editpanel_checked,
811                 editpanel_dn,
812                 editpanel_checkedhi,
813                 "waveform_toggle");
814         new_toggle("waveform_rgb.png",
815                 editpanel_up,
816                 editpanel_hi,
817                 editpanel_checked,
818                 editpanel_dn,
819                 editpanel_checkedhi,
820                 "waveform_rgb_toggle");
821         new_toggle("scope.png",
822                 editpanel_up,
823                 editpanel_hi,
824                 editpanel_checked,
825                 editpanel_dn,
826                 editpanel_checkedhi,
827                 "scope_toggle");
828
829         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
830         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
831
832         //bottom_justify = new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
833         //center_justify = new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
834         //channel_data = new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn);
835         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
836         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
837         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
838         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
839         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
840         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
841         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
842         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
843         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
844         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
845         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
846         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
847         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
848         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
849         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
850         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
851         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
852         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
853         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
854         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
855         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
856         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
857         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
858         new_button("clapper.png", editpanel_up, editpanel_hi, editpanel_dn, "clapperbutton");
859         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
860         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
861         //new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
862         //wrench_data = new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn);
863
864         VFrame **edge_on  = new_toggle("edge_on.png",
865                 editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
866         VFrame **edge_off = new_toggle("edge_off.png",
867                 editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
868         new_image_set_images("bump_edge", 5,
869                 new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
870                 new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
871                 new VFrame(*edge_on[4]));
872         VFrame **span_on  = new_toggle("span_on.png",
873                 editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
874         VFrame **span_off = new_toggle("span_off.png",
875                 editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
876         new_image_set_images("bump_span", 5,
877                  new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
878                  new VFrame(*span_on[0]), new VFrame(*span_off[3]),
879                  new VFrame(*span_on[4]));
880
881 // CWindow icons
882         new_image("cwindow_inactive", "cwindow_inactive.png");
883         new_image("cwindow_active", "cwindow_active.png");
884
885 #define TRANSPORT_LEFT_IMAGES  "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
886 #define TRANSPORT_CENTER_IMAGES  "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
887 #define TRANSPORT_RIGHT_IMAGES  "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
888
889         new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
890         new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
891         new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
892         new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
893         new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
894         new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
895         new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
896         new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
897         new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
898         new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
899         new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
900         new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
901         new_button("stop.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
902         new_image_set("batch_render_start",
903                 3,
904                 "batchstart_up.png",
905                 "batchstart_hi.png",
906                 "batchstart_dn.png");
907         new_image_set("batch_render_stop",
908                 3,
909                 "batchstop_up.png",
910                 "batchstop_hi.png",
911                 "batchstop_dn.png");
912         new_image_set("batch_render_cancel",
913                 3,
914                 "batchcancel_up.png",
915                 "batchcancel_hi.png",
916                 "batchcancel_dn.png");
917
918
919         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
920         new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
921         new_toggle("spankeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
922         new_image_set("category_button",
923                 3,
924                 "preferencesbutton_dn.png",
925                 "preferencesbutton_dnhi.png",
926                 "preferencesbutton_dnlo.png");
927         //camera_data = new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
928         //crop_data = new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
929         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
930         //magnify_data = new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
931         //mask_data = new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
932         //proj_data = new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
933         //protect_data = new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
934         //show_meters = new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
935         //titlesafe_data = new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
936         //tool_data = new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
937         new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
938         new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
939         new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
940         new_toggle("eyedrop.png",
941                 editpanel_up,
942                 editpanel_hi,
943                 editpanel_checked,
944                 editpanel_dn,
945                 editpanel_checkedhi,
946                 "cwindow_eyedrop");
947
948         new_image_set("category_button_checked",
949                 3,
950                 "preferencesbutton_up.png",
951                 "preferencesbutton_uphi.png",
952                 "preferencesbutton_dnlo.png");
953
954
955
956
957
958
959         static VFrame **transport_bg = new_image_set(3,
960                 "transportup.png",
961                 "transporthi.png",
962                 "transportdn.png");
963         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
964         build_transport((char*)"end", get_image_data("end.png"), transport_bg, 2);
965         build_transport((char*)"fastfwd", get_image_data("fastfwd.png"), transport_bg, 1);
966         build_transport((char*)"fastrev", get_image_data("fastrev.png"), transport_bg, 1);
967         build_transport((char*)"play", get_image_data("play.png"), transport_bg, 1);
968         build_transport((char*)"framefwd", get_image_data("framefwd.png"), transport_bg, 1);
969         build_transport((char*)"framerev", get_image_data("framerev.png"), transport_bg, 1);
970         build_transport((char*)"pause", get_image_data("pause.png"), transport_bg, 1);
971         build_transport((char*)"record", get_image_data("record.png"), transport_bg, 1);
972         build_transport((char*)"singleframe", get_image_data("singleframe.png"), transport_bg, 1);
973         build_transport((char*)"reverse", get_image_data("reverse.png"), transport_bg, 1);
974         build_transport((char*)"rewind", get_image_data("rewind.png"), transport_bg, 0);
975         build_transport((char*)"stop", get_image_data("stop.png"), transport_bg, 1);
976         build_transport((char*)"stoprec", get_image_data("stoprec.png"), transport_bg, 2);
977
978         VFrame *cpanel_up = new_image("editpanel_up.png");
979         VFrame *cpanel_hi = new_image("editpanel_hi.png");
980         VFrame *cpanel_dn = new_image("editpanel_dn.png");
981         VFrame *cpanel_checked = new_image("editpanel_checked.png");
982         VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
983         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
984         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
985         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
986         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
987         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
988         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
989         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
990         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
991         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
992         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
993         // toggle for tangent mode (compositor/tool window)
994         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
995         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
996         new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
997         new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
998         new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
999
1000         new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
1001                 "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
1002                 "mask_scale_x");
1003         new_toggle("mask_scale_y.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
1004                 "mask_scale_chkd.png",  "mask_scale_ydown.png",  "mask_scale_chkdhi.png",
1005                 "mask_scale_y");
1006         new_toggle("mask_scale_xy.png",  "mask_scale_up.png",   "mask_scale_uphi.png",
1007                 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
1008                 "mask_scale_xy");
1009
1010         flush_images();
1011
1012         new_toggle("blank30x30.png",
1013                    new_image("locklabels_locked.png"),
1014                    new_image("locklabels_lockedhi.png"),
1015                    new_image("locklabels_unlocked.png"),
1016                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
1017                    new_image("locklabels_unlockedhi.png"),
1018                    "locklabels");
1019         title_font = MEDIUMFONT_3D;
1020         title_color = WHITE;
1021         recordgui_fixed_color = YELLOW;
1022         recordgui_variable_color = RED;
1023
1024         int font_size = (int)(14*resources->font_scale + 0.5);
1025         char string[BCTEXTLEN];
1026         sprintf(string,"-*-helvetica-bold-r-normal-*-%d-*", font_size);
1027         delete [] resources->medium_font;
1028         resources->medium_font = cstrdup(string);
1029
1030         channel_position_color = MEYELLOW;
1031         resources->meter_title_w = xS(28);
1032
1033         // (asset) edit info text color
1034         edit_font_color = YELLOW;
1035
1036         //labels
1037         resources->label_images = new_image_set(5,
1038                 "radial_up.png",
1039                 "radial_hi.png",
1040                 "radial_checked.png",
1041                 "radial_dn.png",
1042                 "radial_checkedhi.png");
1043
1044         /*      resources->type_to_icon = new_image_set(5,
1045             "file_folder.png",
1046                 "file_unknown.png",
1047                 "file_film.png",
1048                 "file_sound.png",
1049                 "file_column.png");
1050    */
1051 }
1052
1053
1054 #define CWINDOW_METER_MARGIN xS(5)
1055 #define VWINDOW_METER_MARGIN xS(5)
1056
1057
1058 void BlondCVTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
1059 {
1060         mbuttons_x = 0;
1061         mbuttons_y = gui->mainmenu->get_h();
1062         mbuttons_w = w - (ffmpeg_toggle[0]->get_w()+xS(2) + proxy_p_toggle[0]->get_w()+xS(2));
1063         mbuttons_h = get_image("mbutton_bg")->get_h();
1064         mclock_x = xS(10);
1065         mclock_y = mbuttons_y + mbuttons_h + CWINDOW_METER_MARGIN;
1066         mclock_w = get_image("clock_bg")->get_w() - xS(40);
1067         mclock_h = get_image("clock_bg")->get_h();
1068         mtimebar_x = get_image("patchbay_bg")->get_w();
1069         mtimebar_y = mbuttons_y + mbuttons_h;
1070         mtimebar_w = w - mtimebar_x;
1071         mtimebar_h = get_image("timebar_bg")->get_h();
1072         mstatus_x = 0;
1073         mstatus_y = h - statusbar_left->get_h();
1074         mstatus_w = w;
1075         mstatus_h = statusbar_left->get_h();
1076         mstatus_message_x = xS(10);
1077         mstatus_message_y = yS(5);
1078         mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - xS(240);
1079         mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
1080         mstatus_progress_w = xS(230);
1081         mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
1082         mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
1083         mzoom_x = 0;
1084         mzoom_y = mstatus_y - zoombar_left->get_h();
1085         mzoom_h = zoombar_left->get_h();
1086         mzoom_w = w;
1087         patchbay_x = 0;
1088         patchbay_y = mtimebar_y + mtimebar_h;
1089         patchbay_w = get_image("patchbay_bg")->get_w();
1090         patchbay_h = mzoom_y - patchbay_y;
1091         mcanvas_x = 0;
1092         mcanvas_y = mtimebar_y + mtimebar_h;
1093         mcanvas_w = w;
1094         mcanvas_h = patchbay_h;
1095         pane_w = get_image_set("xpane")[0]->get_w();
1096         pane_h = get_image_set("ypane")[0]->get_h();
1097         pane_x = mcanvas_x + mcanvas_w;
1098         pane_y = mcanvas_y + mcanvas_h;
1099         mhscroll_x = 0;
1100         mhscroll_y = mcanvas_y + mcanvas_h;
1101         mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT) - patchbay_w;
1102         mvscroll_x = mcanvas_x + mcanvas_w;
1103         mvscroll_y = mcanvas_y;
1104         mvscroll_h = mcanvas_h;
1105 }
1106
1107 void BlondCVTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
1108 {
1109         if(cwindow_controls)
1110         {
1111                 ccomposite_x = 0;
1112                 ccomposite_y = yS(5);
1113                 ccomposite_w = cpanel_bg->get_w();
1114                 ccomposite_h = mwindow->session->cwindow_h - cbuttons_left->get_h();
1115                 cedit_x = xS(10);
1116                 cedit_y = ccomposite_h + yS(17);
1117                 ctransport_x = xS(10);
1118                 ctransport_y = mwindow->session->cwindow_h - get_image_set("autokeyframe")[0]->get_h();
1119                 ccanvas_x = ccomposite_x + ccomposite_w;
1120                 ccanvas_y = 0;
1121                 ccanvas_h = ccomposite_h;
1122                 cstatus_x = xS(525);
1123                 cstatus_y = mwindow->session->cwindow_h - yS(40);
1124                 if(mwindow->edl->session->cwindow_meter)
1125                 {
1126                         cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(this,mwindow->edl->session->audio_channels,
1127                                 mwindow->edl->session->cwindow_meter);
1128                         ccanvas_w = cmeter_x - ccanvas_x - xS(5);
1129                 }
1130                 else
1131                 {
1132                         cmeter_x = mwindow->session->cwindow_w;
1133                         ccanvas_w = cmeter_x - ccanvas_x;
1134                 }
1135 SET_TRACE
1136         }
1137         else
1138         {
1139 SET_TRACE
1140                 ccomposite_x = -cpanel_bg->get_w();
1141                 ccomposite_y = 0;
1142                 ccomposite_w = cpanel_bg->get_w();
1143                 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
1144
1145                 cedit_x = xS(10);
1146                 cedit_y = mwindow->session->cwindow_h + yS(17);
1147                 ctransport_x = xS(10);
1148                 ctransport_y = cedit_y + yS(40);
1149                 ccanvas_x = 0;
1150                 ccanvas_y = 0;
1151                 ccanvas_w = mwindow->session->cwindow_w;
1152                 ccanvas_h = mwindow->session->cwindow_h;
1153                 cmeter_x = mwindow->session->cwindow_w;
1154                 cstatus_x = mwindow->session->cwindow_w;
1155                 cstatus_y = mwindow->session->cwindow_h;
1156 SET_TRACE
1157         }
1158
1159 SET_TRACE
1160
1161         czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + xS(20);
1162         czoom_y = ctransport_y + yS(5);
1163
1164         cmeter_y = yS(5);
1165         cmeter_h = mwindow->session->cwindow_h - cmeter_y;
1166
1167         cslider_w = ccanvas_x + ccanvas_w - cslider_x - xS(5);
1168         ctimebar_x = ccanvas_x;
1169         ctimebar_y = ccanvas_y + ccanvas_h;
1170         ctimebar_w = ccanvas_w;
1171         ctimebar_h = yS(16);
1172
1173
1174 // Not used
1175         ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
1176         ctime_y = ctransport_y;
1177         cdest_x = czoom_x;
1178         cdest_y = czoom_y + yS(30);
1179 SET_TRACE
1180 }
1181
1182
1183 void BlondCVTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
1184 {
1185
1186         recordgui_status_x = xS(10);
1187         recordgui_status_y = yS(10);
1188         recordgui_status_x2 = xS(160);
1189         recordgui_batch_x = xS(310);
1190         recordgui_batch_y = yS(10);
1191         recordgui_batchcaption_x = recordgui_batch_x + xS(110);
1192
1193
1194         recordgui_transport_x = recordgui_batch_x;
1195         recordgui_transport_y = recordgui_batch_y + yS(150);
1196
1197         //recordgui_buttons_x = recordgui_batch_x - xS(50);
1198         //recordgui_buttons_y = recordgui_transport_y + yS(40);
1199         //recordgui_options_x = recordgui_buttons_x;
1200         //recordgui_options_y = recordgui_buttons_y + yS(35);
1201
1202         recordgui_batches_x = xS(10);
1203         recordgui_batches_y = yS(270);
1204         recordgui_batches_w = w - xS(20);
1205         recordgui_batches_h = h - recordgui_batches_y - yS(70);
1206         recordgui_loadmode_x = w / 2 - loadmode_w / 2;
1207         recordgui_loadmode_y = h - yS(60);
1208
1209         recordgui_controls_x = xS(10);
1210         recordgui_controls_y = h - yS(40);
1211 }
1212 /*
1213 void BlondCVTheme::get_rmonitor_sizes(int do_audio, int do_video,
1214         int do_channel, int do_interlace, int do_avc, int audio_channels)
1215 {
1216         Theme::get_rmonitor_sizes(do_audio, do_video,
1217                 do_channel, do_interlace, do_avc, audio_channels);
1218         if(!do_video && do_audio)
1219         {
1220                 rmonitor_meter_y -= yS(30);
1221                 rmonitor_meter_h += yS(30);
1222         }
1223 }
1224 */
1225
1226 void BlondCVTheme::get_vwindow_sizes(VWindowGUI *gui)
1227 {
1228         vmeter_y = yS(5);
1229         vmeter_h = mwindow->session->vwindow_h - cmeter_y;
1230         vcanvas_x = 0;
1231         vcanvas_y = 0;
1232         vcanvas_h = mwindow->session->vwindow_h - vbuttons_left->get_h();
1233
1234         if(mwindow->edl->session->vwindow_meter)
1235         {
1236                 rmonitor_meter_y -= yS(30);
1237                 rmonitor_meter_h += yS(30);
1238                 vmeter_x = mwindow->session->vwindow_w -
1239                         VWINDOW_METER_MARGIN -
1240                         MeterPanel::get_meters_width(this,
1241                                 mwindow->edl->session->audio_channels,
1242                                 mwindow->edl->session->vwindow_meter);
1243                 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
1244         }
1245         else
1246         {
1247                 vmeter_x = mwindow->session->vwindow_w;
1248                 vcanvas_w = mwindow->session->vwindow_w;
1249         }
1250
1251         vtimebar_x = vcanvas_x;
1252         vtimebar_y = vcanvas_y + vcanvas_h;
1253         vtimebar_w = vcanvas_w;
1254         vtimebar_h = yS(16);
1255
1256         vslider_x = xS(10);
1257         vslider_y = vtimebar_y + yS(25);
1258         vslider_w = vtimebar_w - vslider_x;
1259         vedit_x = xS(10);
1260         vedit_y = vslider_y + BC_Slider::get_span(0);
1261         vtransport_x = xS(10);
1262         vtransport_y = mwindow->session->vwindow_h -
1263                 get_image_set("autokeyframe")[0]->get_h();
1264         vtime_x = xS(380);
1265         vtime_y = vedit_y + yS(10);
1266         vtime_w = xS(125);
1267 }
1268
1269
1270
1271
1272
1273 void BlondCVTheme::build_icons()
1274 {
1275         new_image("mwindow_icon", "heroine_icon.png");
1276         new_image("vwindow_icon", "heroine_icon.png");
1277         new_image("cwindow_icon", "heroine_icon.png");
1278         new_image("awindow_icon", "heroine_icon.png");
1279         new_image("record_icon", "heroine_icon.png");
1280 }
1281
1282
1283
1284 void BlondCVTheme::build_bg_data()
1285 {
1286 // Audio settings
1287         channel_bg_data = new VFramePng(get_image_data("channel_bg.png"));
1288         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1289
1290 // Track bitmaps
1291         new_image1("resource1024", "resource1024.png");
1292         new_image1("resource512", "resource512.png");
1293         new_image1("resource256", "resource256.png");
1294         new_image1("resource128", "resource128.png");
1295         new_image1("resource64", "resource64.png");
1296         new_image1("resource32", "resource32.png");
1297         new_image("plugin_bg_data", "plugin_bg.png");
1298         new_image("title_bg_data", "title_bg.png");
1299         new_image("vtimebar_bg_data", "vwindow_timebar.png");
1300 }
1301
1302
1303
1304 void BlondCVTheme::build_overlays()
1305 {
1306         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1307         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1308         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1309         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1310         hardedge_data = new VFramePng(get_image_data("hardedge.png"));
1311         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1312         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1313 }
1314
1315
1316 void BlondCVTheme::draw_rwindow_bg(RecordGUI *gui)
1317 {
1318 //      int y;
1319 //      int margin = xS(50);
1320 //      int margin2 = xS(80);
1321 //      gui->draw_9segment(recordgui_batch_x - margin,
1322 //              0,
1323 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
1324 //              recordgui_buttons_y,
1325 //              rgui_batch);
1326 //      gui->draw_3segmenth(recordgui_options_x - margin2,
1327 //              recordgui_buttons_y - yS(5),
1328 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
1329 //              rgui_controls);
1330 //      y = recordgui_buttons_y - yS(5) + rgui_controls->get_h();
1331 //      gui->draw_9segment(0,
1332 //              y,
1333 //              mwindow->session->rwindow_w,
1334 //              mwindow->session->rwindow_h - y,
1335 //              rgui_list);
1336 }
1337
1338 void BlondCVTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
1339 {
1340 //      int margin = xS(45);
1341 //      int panel_w = xS(300);
1342 //      int x = rmonitor_meter_x - margin;
1343 //      int w = mwindow->session->rmonitor_w - x;
1344 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1345 //      gui->clear_box(0, 0,
1346 //              mwindow->session->rmonitor_w,
1347 //              mwindow->session->rmonitor_h);
1348 //      gui->draw_9segment(x, 0,
1349 //              w,
1350 //              mwindow->session->rmonitor_h,
1351 //              rmonitor_meters);
1352 }
1353
1354
1355 void BlondCVTheme::draw_mwindow_bg(MWindowGUI *gui)
1356 {
1357 // Button bar
1358         gui->draw_3segmenth(mbuttons_x, mbuttons_y,
1359                 xS(750), mbutton_left);
1360         gui->draw_3segmenth(mbuttons_x + xS(750), mbuttons_y,
1361                 mbuttons_w - xS(500), mbutton_right);
1362
1363 // Clock
1364         gui->draw_3segmenth(0, mbuttons_y + mbutton_left->get_h(),
1365                 get_image("patchbay_bg")->get_w(), get_image("clock_bg"));
1366
1367 // Patchbay
1368         gui->draw_3segmentv(patchbay_x, patchbay_y,
1369                 patchbay_h + yS(20), get_image("patchbay_bg"));
1370
1371 // Track canvas
1372         gui->draw_9segment(mcanvas_x, mcanvas_y,
1373                 mcanvas_w, patchbay_h + yS(20),
1374                 tracks_bg);
1375
1376 // Timebar
1377         gui->draw_3segmenth(mtimebar_x, mtimebar_y,
1378                 mtimebar_w,
1379                 get_image("timebar_bg"));
1380
1381 // Zoombar
1382         int zoombar_center = xS(710);
1383         gui->draw_3segmenth(mzoom_x, mzoom_y,
1384                 zoombar_center, zoombar_left);
1385         if(mzoom_w > zoombar_center)
1386                 gui->draw_3segmenth(mzoom_x + zoombar_center, mzoom_y,
1387                         mzoom_w - zoombar_center, zoombar_right);
1388
1389 // Status
1390         gui->draw_3segmenth(mstatus_x, mstatus_y,
1391                 zoombar_center, statusbar_left);
1392
1393         if(mstatus_w > zoombar_center)
1394                 gui->draw_3segmenth(mstatus_x + zoombar_center,
1395                         mstatus_y,
1396                         mstatus_w - zoombar_center,
1397                         statusbar_right);
1398 }
1399
1400 void BlondCVTheme::draw_cwindow_bg(CWindowGUI *gui)
1401 {
1402         const int button_division = xS(570);
1403         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1404         gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1405         if(mwindow->edl->session->cwindow_meter)
1406         {
1407                 gui->draw_3segmenth(button_division,
1408                         ccomposite_h,
1409                         cmeter_x - CWINDOW_METER_MARGIN - button_division,
1410                         get_image("cbuttons_right"));
1411                 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1412                         0,
1413                         mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1414                         mwindow->session->cwindow_h,
1415                         get_image("cmeter_bg"));
1416         }
1417         else
1418         {
1419                 gui->draw_3segmenth(button_division,
1420                         ccomposite_h,
1421                         cmeter_x - CWINDOW_METER_MARGIN - button_division + xS(100),
1422                         get_image("cbuttons_right"));
1423         }
1424 }
1425
1426 void BlondCVTheme::draw_vwindow_bg(VWindowGUI *gui)
1427 {
1428         const int button_division = xS(400);
1429         gui->draw_3segmenth(0, vcanvas_h,
1430                 button_division, get_image("vbuttons_left"));
1431         if(mwindow->edl->session->vwindow_meter)
1432         {
1433                 gui->draw_3segmenth(button_division, vcanvas_h,
1434                         vmeter_x - VWINDOW_METER_MARGIN - button_division,
1435                         get_image("cbuttons_right"));
1436                 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN, 0,
1437                         mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1438                         mwindow->session->vwindow_h,
1439                         get_image("cmeter_bg"));
1440         }
1441         else
1442         {
1443                 gui->draw_3segmenth(button_division, vcanvas_h,
1444                         vmeter_x - VWINDOW_METER_MARGIN - button_division + xS(100),
1445                         get_image("cbuttons_right"));
1446         }
1447 }
1448
1449 void BlondCVTheme::get_preferences_sizes()
1450 {
1451 }
1452
1453
1454 void BlondCVTheme::draw_preferences_bg(PreferencesWindow *gui)
1455 {
1456         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1457 }
1458
1459 void BlondCVTheme::get_new_sizes(NewWindow *gui)
1460 {
1461 }
1462
1463 void BlondCVTheme::draw_new_bg(NewWindow *gui)
1464 {
1465         gui->draw_vframe(get_image("new_bg"), 0, 0);
1466 }
1467
1468 void BlondCVTheme::draw_setformat_bg(SetFormatWindow *gui)
1469 {
1470         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1471         gui->draw_vframe(setformat_bg, 0, 0);
1472 }
1473
1474
1475 // pmd: SUV (same), 1_2_2blond (nonexist)
1476 void BlondCVTheme::get_plugindialog_sizes()
1477 {
1478         int xs10 = xS(10), xs20 = xS(20);
1479         int ys10 = yS(10), ys120 = yS(120);
1480         int x = xs10, y = yS(30);
1481         plugindialog_new_x = x;
1482         plugindialog_new_y = y;
1483         plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
1484         plugindialog_shared_y = y;
1485         plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
1486         plugindialog_module_y = y;
1487
1488         plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - xs10;
1489         plugindialog_new_h = mwindow->session->plugindialog_h - ys120;
1490         plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - xs10;
1491         plugindialog_shared_h = mwindow->session->plugindialog_h - ys120;
1492         plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - xs10;
1493         plugindialog_module_h = mwindow->session->plugindialog_h - ys120;
1494
1495         plugindialog_newattach_x = plugindialog_new_x + xs20;
1496         plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + ys10;
1497         plugindialog_sharedattach_x = plugindialog_shared_x + xs20;
1498         plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + ys10;
1499         plugindialog_moduleattach_x = plugindialog_module_x + xs20;
1500         plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + ys10;
1501 }
1502
1503
1504
1505