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