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