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