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