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