add master/armed_gang track operations, tweak appearanceprefs layout, fix vicon video...
[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
598         new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
599         new_image("mode_add", "mode_add.png");
600         new_image("mode_divide", "mode_divide.png");
601         new_image("mode_multiply", "mode_multiply.png");
602         new_image("mode_normal", "mode_normal.png");
603         new_image("mode_replace", "mode_replace.png");
604         new_image("mode_subtract", "mode_subtract.png");
605         new_image("mode_max", "mode_max.png");
606         new_image("mode_min", "mode_min.png");
607
608         new_bg = new_image("new_bg.png");
609         setformat_bg = new_image("setformat_bg2.png");
610
611         new_toggle("plugin_on.png",
612                 "pluginbutton_hi.png",
613                 "pluginbutton_hi.png",
614                 "pluginbutton_select.png",
615                 "pluginbutton_dn.png",
616                 "pluginbutton_selecthi.png",
617                 "plugin_on");
618
619         new_toggle("plugin_show.png",
620                 "plugin_show.png",
621                 "pluginbutton_hi.png",
622                 "pluginbutton_select.png",
623                 "pluginbutton_dn.png",
624                 "pluginbutton_selecthi.png",
625                 "plugin_show");
626         new_image("cpanel_bg", "cpanel_bg.png");
627         new_image("cbuttons_left", "cbuttons_left.png");
628         new_image("cbuttons_right", "cbuttons_right.png");
629         new_image("cmeter_bg", "cmeter_bg.png");
630         new_image("vbuttons_left", "vbuttons_left.png");
631         timebar_view_data = new_image("timebar_view.png");
632
633         new_image("preferences_bg", "preferences_bg.png");
634
635
636         new_image("new_bg", "new_bg.png");
637         new_image("setformat_bg", "setformat_bg2.png");
638         setformat_w = get_image("setformat_bg")->get_w();
639         setformat_h = get_image("setformat_bg")->get_h();
640         setformat_x1 = xS(15);
641         setformat_x2 = xS(100);
642         setformat_x3 = xS(315);
643         setformat_x4 = xS(415);
644         setformat_y1 = yS(20);
645         setformat_y2 = yS(85);
646         setformat_y3 = yS(125);
647         setformat_margin = xS(30);
648         setformat_channels_x = xS(25);
649         setformat_channels_y = yS(242);
650         setformat_channels_w = xS(250);
651         setformat_channels_h = yS(250);
652
653         loadfile_pad = yS(52);
654         browse_pad = yS(20);
655
656         new_image_set("playpatch_data",
657                 5,
658                 "playpatch_up.png",
659                 "playpatch_hi.png",
660                 "playpatch_checked.png",
661                 "playpatch_dn.png",
662                 "playpatch_checkedhi.png");
663
664         new_image_set("recordpatch_data",
665                 5,
666                 "recordpatch_up.png",
667                 "recordpatch_hi.png",
668                 "recordpatch_checked.png",
669                 "recordpatch_dn.png",
670                 "recordpatch_checkedhi.png");
671
672         new_image_set("gangpatch_data",
673                 5,
674                 "gangpatch_up.png",
675                 "gangpatch_hi.png",
676                 "gangpatch_checked.png",
677                 "gangpatch_dn.png",
678                 "gangpatch_checkedhi.png");
679
680         new_image_set("drawpatch_data",
681                 5,
682                 "drawpatch_up.png",
683                 "drawpatch_hi.png",
684                 "drawpatch_checked.png",
685                 "drawpatch_dn.png",
686                 "drawpatch_checkedhi.png");
687
688
689         new_image_set("mutepatch_data",
690                 5,
691                 "mutepatch_up.png",
692                 "mutepatch_hi.png",
693                 "mutepatch_checked.png",
694                 "mutepatch_dn.png",
695                 "mutepatch_checkedhi.png");
696         build_icons();
697         build_bg_data();
698
699         new_image_set("expandpatch_data",
700                 5,
701                 "expandpatch_up.png",
702                 "expandpatch_hi.png",
703                 "expandpatch_checked.png",
704                 "expandpatch_dn.png",
705                 "expandpatch_checkedhi.png");
706         new_image_set("drawpatch_data", 5, "drawpatch_up.png", "drawpatch_hi.png", "drawpatch_checked.png", "drawpatch_dn.png", "drawpatch_checkedhi.png");
707         new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png");
708         new_image_set("gangpatch_data", 5, "gangpatch_up.png", "gangpatch_hi.png", "gangpatch_checked.png", "gangpatch_dn.png", "gangpatch_checkedhi.png");
709         new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png");
710         new_image_set("playpatch_data", 5, "playpatch_up.png", "playpatch_hi.png", "playpatch_checked.png", "playpatch_dn.png", "playpatch_checkedhi.png");
711         new_image_set("recordpatch_data", 5, "recordpatch_up.png", "recordpatch_hi.png", "recordpatch_checked.png", "recordpatch_dn.png", "recordpatch_checkedhi.png");
712
713         build_overlays();
714
715         out_point = new_image_set(5,
716                 "out_up.png",
717                 "out_hi.png",
718                 "out_checked.png",
719                 "out_dn.png",
720                 "out_checkedhi.png");
721         in_point = new_image_set(5,
722                 "in_up.png",
723                 "in_hi.png",
724                 "in_checked.png",
725                 "in_dn.png",
726                 "in_checkedhi.png");
727
728         label_toggle = new_image_set(5,
729                 "labeltoggle_up.png",
730                 "labeltoggle_uphi.png",
731                 "label_checked.png",
732                 "labeltoggle_dn.png",
733                 "label_checkedhi.png");
734
735         ffmpeg_toggle = new_image_set(5,
736                 "ff_up.png",
737                 "ff_hi.png",
738                 "ff_checked.png",
739                 "ff_down.png",
740                 "ff_checkedhi.png");
741
742         proxy_p_toggle = new_image_set(5,
743                 "proxy_p_up.png",
744                 "proxy_p_hi.png",
745                 "proxy_p_chkd.png",
746                 "proxy_p_down.png",
747                 "proxy_p_chkdhi.png");
748
749         proxy_s_toggle = new_image_set(5,
750                 "proxy_s_up.png",
751                 "proxy_s_hi.png",
752                 "proxy_s_chkd.png",
753                 "proxy_s_down.png",
754                 "proxy_s_chkdhi.png");
755
756         mask_mode_toggle = new_image_set(5,
757                 "mask_mode_up.png",
758                 "mask_mode_hi.png",
759                 "mask_mode_chkd.png",
760                 "mask_mode_down.png",
761                 "mask_mode_chkdhi.png");
762
763         shbtn_data = new_image_set(3,
764                 "shbtn_up.png",
765                 "shbtn_hi.png",
766                 "shbtn_dn.png");
767
768         new_image_set("preset_edit",
769                 3,
770                 "preset_edit0.png",
771                 "preset_edit1.png",
772                 "preset_edit2.png");
773
774         statusbar_cancel_data = new_image_set(3,
775                 "statusbar_cancel_up.png",
776                 "statusbar_cancel_hi.png",
777                 "statusbar_cancel_dn.png");
778
779
780         VFrame *editpanel_up = new_image("editpanel_up.png");
781         VFrame *editpanel_hi = new_image("editpanel_hi.png");
782         VFrame *editpanel_dn = new_image("editpanel_dn.png");
783         VFrame *editpanel_checked = new_image("editpanel_checked.png");
784         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
785
786         new_image("panel_divider", "panel_divider.png");
787         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
788         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
789         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
790         new_button("lok.png", editpanel_up, editpanel_hi, editpanel_dn, "lok");
791
792         new_toggle("histogram_toggle.png",
793                 editpanel_up,
794                 editpanel_hi,
795                 editpanel_checked,
796                 editpanel_dn,
797                 editpanel_checkedhi,
798                 "histogram_toggle");
799         new_toggle("histogram_rgb.png",
800                 editpanel_up,
801                 editpanel_hi,
802                 editpanel_checked,
803                 editpanel_dn,
804                 editpanel_checkedhi,
805                 "histogram_rgb_toggle");
806         new_toggle("waveform.png",
807                 editpanel_up,
808                 editpanel_hi,
809                 editpanel_checked,
810                 editpanel_dn,
811                 editpanel_checkedhi,
812                 "waveform_toggle");
813         new_toggle("waveform_rgb.png",
814                 editpanel_up,
815                 editpanel_hi,
816                 editpanel_checked,
817                 editpanel_dn,
818                 editpanel_checkedhi,
819                 "waveform_rgb_toggle");
820         new_toggle("scope.png",
821                 editpanel_up,
822                 editpanel_hi,
823                 editpanel_checked,
824                 editpanel_dn,
825                 editpanel_checkedhi,
826                 "scope_toggle");
827
828         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
829         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
830
831         //bottom_justify = new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
832         //center_justify = new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
833         //channel_data = new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn);
834         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
835         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
836         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
837         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
838         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
839         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
840         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
841         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
842         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
843         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
844         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
845         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
846         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
847         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
848         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
849         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
850         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
851         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
852         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
853         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
854         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
855         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
856         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
857         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
858         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
859         //new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
860         //wrench_data = new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn);
861
862 // CWindow icons
863         new_image("cwindow_inactive", "cwindow_inactive.png");
864         new_image("cwindow_active", "cwindow_active.png");
865
866 #define TRANSPORT_LEFT_IMAGES  "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
867 #define TRANSPORT_CENTER_IMAGES  "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
868 #define TRANSPORT_RIGHT_IMAGES  "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
869
870         new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
871         new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
872         new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
873         new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
874         new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
875         new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
876         new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
877         new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
878         new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
879         new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
880         new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
881         new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
882         new_button("stop.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
883         new_image_set("batch_render_start",
884                 3,
885                 "batchstart_up.png",
886                 "batchstart_hi.png",
887                 "batchstart_dn.png");
888         new_image_set("batch_render_stop",
889                 3,
890                 "batchstop_up.png",
891                 "batchstop_hi.png",
892                 "batchstop_dn.png");
893         new_image_set("batch_render_cancel",
894                 3,
895                 "batchcancel_up.png",
896                 "batchcancel_hi.png",
897                 "batchcancel_dn.png");
898
899
900         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
901         new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
902         new_toggle("spankeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
903         new_image_set("category_button",
904                 3,
905                 "preferencesbutton_dn.png",
906                 "preferencesbutton_dnhi.png",
907                 "preferencesbutton_dnlo.png");
908         //camera_data = new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
909         //crop_data = new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
910         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
911         //magnify_data = new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
912         //mask_data = new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
913         //proj_data = new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
914         //protect_data = new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
915         //show_meters = new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
916         //titlesafe_data = new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
917         //tool_data = new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
918         new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
919         new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
920         new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
921         new_toggle("eyedrop.png",
922                 editpanel_up,
923                 editpanel_hi,
924                 editpanel_checked,
925                 editpanel_dn,
926                 editpanel_checkedhi,
927                 "cwindow_eyedrop");
928
929         new_image_set("category_button_checked",
930                 3,
931                 "preferencesbutton_up.png",
932                 "preferencesbutton_uphi.png",
933                 "preferencesbutton_dnlo.png");
934
935
936
937
938
939
940         static VFrame **transport_bg = new_image_set(3,
941                 "transportup.png",
942                 "transporthi.png",
943                 "transportdn.png");
944         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
945         build_transport((char*)"end", get_image_data("end.png"), transport_bg, 2);
946         build_transport((char*)"fastfwd", get_image_data("fastfwd.png"), transport_bg, 1);
947         build_transport((char*)"fastrev", get_image_data("fastrev.png"), transport_bg, 1);
948         build_transport((char*)"play", get_image_data("play.png"), transport_bg, 1);
949         build_transport((char*)"framefwd", get_image_data("framefwd.png"), transport_bg, 1);
950         build_transport((char*)"framerev", get_image_data("framerev.png"), transport_bg, 1);
951         build_transport((char*)"pause", get_image_data("pause.png"), transport_bg, 1);
952         build_transport((char*)"record", get_image_data("record.png"), transport_bg, 1);
953         build_transport((char*)"singleframe", get_image_data("singleframe.png"), transport_bg, 1);
954         build_transport((char*)"reverse", get_image_data("reverse.png"), transport_bg, 1);
955         build_transport((char*)"rewind", get_image_data("rewind.png"), transport_bg, 0);
956         build_transport((char*)"stop", get_image_data("stop.png"), transport_bg, 1);
957         build_transport((char*)"stoprec", get_image_data("stoprec.png"), transport_bg, 2);
958
959         VFrame *cpanel_up = new_image("editpanel_up.png");
960         VFrame *cpanel_hi = new_image("editpanel_hi.png");
961         VFrame *cpanel_dn = new_image("editpanel_dn.png");
962         VFrame *cpanel_checked = new_image("editpanel_checked.png");
963         VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
964         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
965         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
966         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
967         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
968         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
969         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
970         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
971         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
972         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
973         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
974         // toggle for tangent mode (compositor/tool window)
975         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
976         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
977
978         new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
979                 "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
980                 "mask_scale_x");
981         new_toggle("mask_scale_y.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
982                 "mask_scale_chkd.png",  "mask_scale_ydown.png",  "mask_scale_chkdhi.png",
983                 "mask_scale_y");
984         new_toggle("mask_scale_xy.png",  "mask_scale_up.png",   "mask_scale_uphi.png",
985                 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
986                 "mask_scale_xy");
987
988         flush_images();
989
990         new_toggle("blank30x30.png",
991                    new_image("locklabels_locked.png"),
992                    new_image("locklabels_lockedhi.png"),
993                    new_image("locklabels_unlocked.png"),
994                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
995                    new_image("locklabels_unlockedhi.png"),
996                    "locklabels");
997         title_font = MEDIUMFONT_3D;
998         title_color = WHITE;
999         recordgui_fixed_color = YELLOW;
1000         recordgui_variable_color = RED;
1001
1002         int font_size = (int)(14*resources->font_scale + 0.5);
1003         char string[BCTEXTLEN];
1004         sprintf(string,"-*-helvetica-bold-r-normal-*-%d-*", font_size);
1005         delete [] resources->medium_font;
1006         resources->medium_font = cstrdup(string);
1007
1008         channel_position_color = MEYELLOW;
1009         resources->meter_title_w = xS(28);
1010
1011         // (asset) edit info text color
1012         edit_font_color = YELLOW;
1013
1014         //labels
1015         resources->label_images = new_image_set(5,
1016                 "radial_up.png",
1017                 "radial_hi.png",
1018                 "radial_checked.png",
1019                 "radial_dn.png",
1020                 "radial_checkedhi.png");
1021
1022         /*      resources->type_to_icon = new_image_set(5,
1023             "file_folder.png",
1024                 "file_unknown.png",
1025                 "file_film.png",
1026                 "file_sound.png",
1027                 "file_column.png");
1028    */
1029 }
1030
1031
1032 #define CWINDOW_METER_MARGIN xS(5)
1033 #define VWINDOW_METER_MARGIN xS(5)
1034
1035
1036 void BlondCVTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
1037 {
1038         mbuttons_x = 0;
1039         mbuttons_y = gui->mainmenu->get_h();
1040         mbuttons_w = w - (ffmpeg_toggle[0]->get_w()+xS(2) + proxy_p_toggle[0]->get_w()+xS(2));
1041         mbuttons_h = get_image("mbutton_bg")->get_h();
1042         mclock_x = xS(10);
1043         mclock_y = mbuttons_y + mbuttons_h + CWINDOW_METER_MARGIN;
1044         mclock_w = get_image("clock_bg")->get_w() - xS(40);
1045         mclock_h = get_image("clock_bg")->get_h();
1046         mtimebar_x = get_image("patchbay_bg")->get_w();
1047         mtimebar_y = mbuttons_y + mbuttons_h;
1048         mtimebar_w = w - mtimebar_x;
1049         mtimebar_h = get_image("timebar_bg")->get_h();
1050         mstatus_x = 0;
1051         mstatus_y = h - statusbar_left->get_h();
1052         mstatus_w = w;
1053         mstatus_h = statusbar_left->get_h();
1054         mstatus_message_x = xS(10);
1055         mstatus_message_y = yS(5);
1056         mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - xS(240);
1057         mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
1058         mstatus_progress_w = xS(230);
1059         mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
1060         mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
1061         mzoom_x = 0;
1062         mzoom_y = mstatus_y - zoombar_left->get_h();
1063         mzoom_h = zoombar_left->get_h();
1064         mzoom_w = w;
1065         patchbay_x = 0;
1066         patchbay_y = mtimebar_y + mtimebar_h;
1067         patchbay_w = get_image("patchbay_bg")->get_w();
1068         patchbay_h = mzoom_y - patchbay_y;
1069         mcanvas_x = 0;
1070         mcanvas_y = mtimebar_y + mtimebar_h;
1071         mcanvas_w = w;
1072         mcanvas_h = patchbay_h;
1073         pane_w = get_image_set("xpane")[0]->get_w();
1074         pane_h = get_image_set("ypane")[0]->get_h();
1075         pane_x = mcanvas_x + mcanvas_w;
1076         pane_y = mcanvas_y + mcanvas_h;
1077         mhscroll_x = 0;
1078         mhscroll_y = mcanvas_y + mcanvas_h;
1079         mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT) - patchbay_w;
1080         mvscroll_x = mcanvas_x + mcanvas_w;
1081         mvscroll_y = mcanvas_y;
1082         mvscroll_h = mcanvas_h;
1083 }
1084
1085 void BlondCVTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
1086 {
1087         if(cwindow_controls)
1088         {
1089                 ccomposite_x = 0;
1090                 ccomposite_y = yS(5);
1091                 ccomposite_w = cpanel_bg->get_w();
1092                 ccomposite_h = mwindow->session->cwindow_h - cbuttons_left->get_h();
1093                 cedit_x = xS(10);
1094                 cedit_y = ccomposite_h + yS(17);
1095                 ctransport_x = xS(10);
1096                 ctransport_y = mwindow->session->cwindow_h - get_image_set("autokeyframe")[0]->get_h();
1097                 ccanvas_x = ccomposite_x + ccomposite_w;
1098                 ccanvas_y = 0;
1099                 ccanvas_h = ccomposite_h;
1100                 cstatus_x = xS(525);
1101                 cstatus_y = mwindow->session->cwindow_h - yS(40);
1102                 if(mwindow->edl->session->cwindow_meter)
1103                 {
1104                         cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(this,mwindow->edl->session->audio_channels,
1105                                 mwindow->edl->session->cwindow_meter);
1106                         ccanvas_w = cmeter_x - ccanvas_x - xS(5);
1107                 }
1108                 else
1109                 {
1110                         cmeter_x = mwindow->session->cwindow_w;
1111                         ccanvas_w = cmeter_x - ccanvas_x;
1112                 }
1113 SET_TRACE
1114         }
1115         else
1116         {
1117 SET_TRACE
1118                 ccomposite_x = -cpanel_bg->get_w();
1119                 ccomposite_y = 0;
1120                 ccomposite_w = cpanel_bg->get_w();
1121                 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
1122
1123                 cedit_x = xS(10);
1124                 cedit_y = mwindow->session->cwindow_h + yS(17);
1125                 ctransport_x = xS(10);
1126                 ctransport_y = cedit_y + yS(40);
1127                 ccanvas_x = 0;
1128                 ccanvas_y = 0;
1129                 ccanvas_w = mwindow->session->cwindow_w;
1130                 ccanvas_h = mwindow->session->cwindow_h;
1131                 cmeter_x = mwindow->session->cwindow_w;
1132                 cstatus_x = mwindow->session->cwindow_w;
1133                 cstatus_y = mwindow->session->cwindow_h;
1134 SET_TRACE
1135         }
1136
1137 SET_TRACE
1138
1139         czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + xS(20);
1140         czoom_y = ctransport_y + yS(5);
1141
1142         cmeter_y = yS(5);
1143         cmeter_h = mwindow->session->cwindow_h - cmeter_y;
1144
1145         cslider_w = ccanvas_x + ccanvas_w - cslider_x - xS(5);
1146         ctimebar_x = ccanvas_x;
1147         ctimebar_y = ccanvas_y + ccanvas_h;
1148         ctimebar_w = ccanvas_w;
1149         ctimebar_h = yS(16);
1150
1151
1152 // Not used
1153         ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
1154         ctime_y = ctransport_y;
1155         cdest_x = czoom_x;
1156         cdest_y = czoom_y + yS(30);
1157 SET_TRACE
1158 }
1159
1160
1161 void BlondCVTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
1162 {
1163
1164         recordgui_status_x = xS(10);
1165         recordgui_status_y = yS(10);
1166         recordgui_status_x2 = xS(160);
1167         recordgui_batch_x = xS(310);
1168         recordgui_batch_y = yS(10);
1169         recordgui_batchcaption_x = recordgui_batch_x + xS(110);
1170
1171
1172         recordgui_transport_x = recordgui_batch_x;
1173         recordgui_transport_y = recordgui_batch_y + yS(150);
1174
1175         //recordgui_buttons_x = recordgui_batch_x - xS(50);
1176         //recordgui_buttons_y = recordgui_transport_y + yS(40);
1177         //recordgui_options_x = recordgui_buttons_x;
1178         //recordgui_options_y = recordgui_buttons_y + yS(35);
1179
1180         recordgui_batches_x = xS(10);
1181         recordgui_batches_y = yS(270);
1182         recordgui_batches_w = w - xS(20);
1183         recordgui_batches_h = h - recordgui_batches_y - yS(70);
1184         recordgui_loadmode_x = w / 2 - loadmode_w / 2;
1185         recordgui_loadmode_y = h - yS(60);
1186
1187         recordgui_controls_x = xS(10);
1188         recordgui_controls_y = h - yS(40);
1189 }
1190 /*
1191 void BlondCVTheme::get_rmonitor_sizes(int do_audio, int do_video,
1192         int do_channel, int do_interlace, int do_avc, int audio_channels)
1193 {
1194         Theme::get_rmonitor_sizes(do_audio, do_video,
1195                 do_channel, do_interlace, do_avc, audio_channels);
1196         if(!do_video && do_audio)
1197         {
1198                 rmonitor_meter_y -= yS(30);
1199                 rmonitor_meter_h += yS(30);
1200         }
1201 }
1202 */
1203
1204 void BlondCVTheme::get_vwindow_sizes(VWindowGUI *gui)
1205 {
1206         vmeter_y = yS(5);
1207         vmeter_h = mwindow->session->vwindow_h - cmeter_y;
1208         vcanvas_x = 0;
1209         vcanvas_y = 0;
1210         vcanvas_h = mwindow->session->vwindow_h - vbuttons_left->get_h();
1211
1212         if(mwindow->edl->session->vwindow_meter)
1213         {
1214                 rmonitor_meter_y -= yS(30);
1215                 rmonitor_meter_h += yS(30);
1216                 vmeter_x = mwindow->session->vwindow_w -
1217                         VWINDOW_METER_MARGIN -
1218                         MeterPanel::get_meters_width(this,
1219                                 mwindow->edl->session->audio_channels,
1220                                 mwindow->edl->session->vwindow_meter);
1221                 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
1222         }
1223         else
1224         {
1225                 vmeter_x = mwindow->session->vwindow_w;
1226                 vcanvas_w = mwindow->session->vwindow_w;
1227         }
1228
1229         vtimebar_x = vcanvas_x;
1230         vtimebar_y = vcanvas_y + vcanvas_h;
1231         vtimebar_w = vcanvas_w;
1232         vtimebar_h = yS(16);
1233
1234         vslider_x = xS(10);
1235         vslider_y = vtimebar_y + yS(25);
1236         vslider_w = vtimebar_w - vslider_x;
1237         vedit_x = xS(10);
1238         vedit_y = vslider_y + BC_Slider::get_span(0);
1239         vtransport_x = xS(10);
1240         vtransport_y = mwindow->session->vwindow_h -
1241                 get_image_set("autokeyframe")[0]->get_h();
1242         vtime_x = xS(380);
1243         vtime_y = vedit_y + yS(10);
1244         vtime_w = xS(125);
1245 }
1246
1247
1248
1249
1250
1251 void BlondCVTheme::build_icons()
1252 {
1253         new_image("mwindow_icon", "heroine_icon.png");
1254         new_image("vwindow_icon", "heroine_icon.png");
1255         new_image("cwindow_icon", "heroine_icon.png");
1256         new_image("awindow_icon", "heroine_icon.png");
1257         new_image("record_icon", "heroine_icon.png");
1258 }
1259
1260
1261
1262 void BlondCVTheme::build_bg_data()
1263 {
1264 // Audio settings
1265         channel_bg_data = new VFramePng(get_image_data("channel_bg.png"));
1266         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1267
1268 // Track bitmaps
1269         new_image1("resource1024", "resource1024.png");
1270         new_image1("resource512", "resource512.png");
1271         new_image1("resource256", "resource256.png");
1272         new_image1("resource128", "resource128.png");
1273         new_image1("resource64", "resource64.png");
1274         new_image1("resource32", "resource32.png");
1275         new_image("plugin_bg_data", "plugin_bg.png");
1276         new_image("title_bg_data", "title_bg.png");
1277         new_image("vtimebar_bg_data", "vwindow_timebar.png");
1278 }
1279
1280
1281
1282 void BlondCVTheme::build_overlays()
1283 {
1284         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1285         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1286         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1287         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1288         hardedge_data = new VFramePng(get_image_data("hardedge.png"));
1289         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1290         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1291 }
1292
1293
1294 void BlondCVTheme::draw_rwindow_bg(RecordGUI *gui)
1295 {
1296 //      int y;
1297 //      int margin = xS(50);
1298 //      int margin2 = xS(80);
1299 //      gui->draw_9segment(recordgui_batch_x - margin,
1300 //              0,
1301 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
1302 //              recordgui_buttons_y,
1303 //              rgui_batch);
1304 //      gui->draw_3segmenth(recordgui_options_x - margin2,
1305 //              recordgui_buttons_y - yS(5),
1306 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
1307 //              rgui_controls);
1308 //      y = recordgui_buttons_y - yS(5) + rgui_controls->get_h();
1309 //      gui->draw_9segment(0,
1310 //              y,
1311 //              mwindow->session->rwindow_w,
1312 //              mwindow->session->rwindow_h - y,
1313 //              rgui_list);
1314 }
1315
1316 void BlondCVTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
1317 {
1318 //      int margin = xS(45);
1319 //      int panel_w = xS(300);
1320 //      int x = rmonitor_meter_x - margin;
1321 //      int w = mwindow->session->rmonitor_w - x;
1322 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1323 //      gui->clear_box(0, 0,
1324 //              mwindow->session->rmonitor_w,
1325 //              mwindow->session->rmonitor_h);
1326 //      gui->draw_9segment(x, 0,
1327 //              w,
1328 //              mwindow->session->rmonitor_h,
1329 //              rmonitor_meters);
1330 }
1331
1332
1333 void BlondCVTheme::draw_mwindow_bg(MWindowGUI *gui)
1334 {
1335 // Button bar
1336         gui->draw_3segmenth(mbuttons_x, mbuttons_y,
1337                 xS(750), mbutton_left);
1338         gui->draw_3segmenth(mbuttons_x + xS(750), mbuttons_y,
1339                 mbuttons_w - xS(500), mbutton_right);
1340
1341 // Clock
1342         gui->draw_3segmenth(0, mbuttons_y + mbutton_left->get_h(),
1343                 get_image("patchbay_bg")->get_w(), get_image("clock_bg"));
1344
1345 // Patchbay
1346         gui->draw_3segmentv(patchbay_x, patchbay_y,
1347                 patchbay_h + yS(20), get_image("patchbay_bg"));
1348
1349 // Track canvas
1350         gui->draw_9segment(mcanvas_x, mcanvas_y,
1351                 mcanvas_w, patchbay_h + yS(20),
1352                 tracks_bg);
1353
1354 // Timebar
1355         gui->draw_3segmenth(mtimebar_x, mtimebar_y,
1356                 mtimebar_w,
1357                 get_image("timebar_bg"));
1358
1359 // Zoombar
1360         int zoombar_center = xS(710);
1361         gui->draw_3segmenth(mzoom_x, mzoom_y,
1362                 zoombar_center, zoombar_left);
1363         if(mzoom_w > zoombar_center)
1364                 gui->draw_3segmenth(mzoom_x + zoombar_center, mzoom_y,
1365                         mzoom_w - zoombar_center, zoombar_right);
1366
1367 // Status
1368         gui->draw_3segmenth(mstatus_x, mstatus_y,
1369                 zoombar_center, statusbar_left);
1370
1371         if(mstatus_w > zoombar_center)
1372                 gui->draw_3segmenth(mstatus_x + zoombar_center,
1373                         mstatus_y,
1374                         mstatus_w - zoombar_center,
1375                         statusbar_right);
1376 }
1377
1378 void BlondCVTheme::draw_cwindow_bg(CWindowGUI *gui)
1379 {
1380         const int button_division = xS(570);
1381         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1382         gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1383         if(mwindow->edl->session->cwindow_meter)
1384         {
1385                 gui->draw_3segmenth(button_division,
1386                         ccomposite_h,
1387                         cmeter_x - CWINDOW_METER_MARGIN - button_division,
1388                         get_image("cbuttons_right"));
1389                 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1390                         0,
1391                         mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1392                         mwindow->session->cwindow_h,
1393                         get_image("cmeter_bg"));
1394         }
1395         else
1396         {
1397                 gui->draw_3segmenth(button_division,
1398                         ccomposite_h,
1399                         cmeter_x - CWINDOW_METER_MARGIN - button_division + xS(100),
1400                         get_image("cbuttons_right"));
1401         }
1402 }
1403
1404 void BlondCVTheme::draw_vwindow_bg(VWindowGUI *gui)
1405 {
1406         const int button_division = xS(400);
1407         gui->draw_3segmenth(0, vcanvas_h,
1408                 button_division, get_image("vbuttons_left"));
1409         if(mwindow->edl->session->vwindow_meter)
1410         {
1411                 gui->draw_3segmenth(button_division, vcanvas_h,
1412                         vmeter_x - VWINDOW_METER_MARGIN - button_division,
1413                         get_image("cbuttons_right"));
1414                 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN, 0,
1415                         mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1416                         mwindow->session->vwindow_h,
1417                         get_image("cmeter_bg"));
1418         }
1419         else
1420         {
1421                 gui->draw_3segmenth(button_division, vcanvas_h,
1422                         vmeter_x - VWINDOW_METER_MARGIN - button_division + xS(100),
1423                         get_image("cbuttons_right"));
1424         }
1425 }
1426
1427 void BlondCVTheme::get_preferences_sizes()
1428 {
1429 }
1430
1431
1432 void BlondCVTheme::draw_preferences_bg(PreferencesWindow *gui)
1433 {
1434         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1435 }
1436
1437 void BlondCVTheme::get_new_sizes(NewWindow *gui)
1438 {
1439 }
1440
1441 void BlondCVTheme::draw_new_bg(NewWindow *gui)
1442 {
1443         gui->draw_vframe(get_image("new_bg"), 0, 0);
1444 }
1445
1446 void BlondCVTheme::draw_setformat_bg(SetFormatWindow *gui)
1447 {
1448         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1449         gui->draw_vframe(setformat_bg, 0, 0);
1450 }
1451
1452
1453 // pmd: SUV (same), 1_2_2blond (nonexist)
1454 void BlondCVTheme::get_plugindialog_sizes()
1455 {
1456         int xs10 = xS(10), xs20 = xS(20);
1457         int ys10 = yS(10), ys120 = yS(120);
1458         int x = xs10, y = yS(30);
1459         plugindialog_new_x = x;
1460         plugindialog_new_y = y;
1461         plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
1462         plugindialog_shared_y = y;
1463         plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
1464         plugindialog_module_y = y;
1465
1466         plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - xs10;
1467         plugindialog_new_h = mwindow->session->plugindialog_h - ys120;
1468         plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - xs10;
1469         plugindialog_shared_h = mwindow->session->plugindialog_h - ys120;
1470         plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - xs10;
1471         plugindialog_module_h = mwindow->session->plugindialog_h - ys120;
1472
1473         plugindialog_newattach_x = plugindialog_new_x + xs20;
1474         plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + ys10;
1475         plugindialog_sharedattach_x = plugindialog_shared_x + xs20;
1476         plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + ys10;
1477         plugindialog_moduleattach_x = plugindialog_module_x + xs20;
1478         plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + ys10;
1479 }
1480
1481
1482
1483