add timecode units/alignment/probe, add prefs auto_rotate,
[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         new_image_set("tumblepatch_data", 4,
443                 "tumblepatch_up.png",
444                 "tumblepatch_hi.png",
445                 "tumblepatch_bottom.png",
446                 "tumblepatch_top.png");
447         resources->listbox_button = new_image_set(4,
448                 "listbox_button_up.png",
449                 "listbox_button_hi.png",
450                 "listbox_button_dn.png",
451                 "listbox_button_disabled.png"); // probably need to make this for the suv theme
452         resources->listbox_column = new_image_set(3,
453                 "column_up.png",
454                 "column_hi.png",
455                 "column_dn.png");
456         resources->listbox_expand = new_image_set(5,
457                 "listbox_expandup.png",
458                 "listbox_expanduphi.png",
459                 "listbox_expandchecked.png",
460                 "listbox_expanddn.png",
461                 "listbox_expandcheckedhi.png");
462         resources->listbox_up = new_image("listbox_up.png");
463         resources->listbox_dn = new_image("listbox_dn.png");
464         resources->pan_data = new_image_set(7,
465                         "pan_up.png",
466                         "pan_hi.png",
467                         "pan_popup.png",
468                         "pan_channel.png",
469                         "pan_stick.png",
470                         "pan_channel_small.png",
471                         "pan_stick_small.png");
472         resources->pan_text_color = WHITE;
473
474         resources->pot_images = new_image_set(3,
475                 "pot_up.png",
476                 "pot_hi.png",
477                 "pot_dn.png");   //Graphic Copied from default. Improve!!
478
479         resources->checkbox_images = new_image_set(5,
480                 "checkbox_up.png",
481                 "checkbox_uphi.png",
482                 "checkbox_checked.png",
483                 "checkbox_down.png",
484                 "checkbox_checkedhi.png");
485
486         resources->radial_images = new_image_set(5,
487                 "radial_up.png",
488                 "radial_uphi.png",
489                 "radial_checked.png",
490                 "radial_down.png",
491                 "radial_checkedhi.png");
492
493         resources->xmeter_images = new_image_set(7,
494                 "xmeter_normal.png",
495                 "xmeter_green.png",
496                 "xmeter_red.png",
497                 "xmeter_yellow.png",
498                 "xmeter_normal.png",
499                 "xmeter_over.png",
500                 "downmix51_2.png");
501         resources->ymeter_images = new_image_set(7,
502                 "ymeter_normal.png",
503                 "ymeter_green.png",
504                 "ymeter_red.png",
505                 "ymeter_yellow.png",
506                 "ymeter_normal.png",
507                 "ymeter_over.png",
508                 "downmix51_2.png");
509
510         resources->hscroll_data = new_image_set(10,
511                         "hscroll_center_up.png",
512                         "hscroll_center_hi.png",
513                         "hscroll_center_dn.png",
514                         "hscroll_bg.png",
515                         "hscroll_back_up.png",
516                         "hscroll_back_hi.png",
517                         "hscroll_back_dn.png",
518                         "hscroll_fwd_up.png",
519                         "hscroll_fwd_hi.png",
520                         "hscroll_fwd_dn.png");
521
522         resources->vscroll_data = new_image_set(10,
523                         "vscroll_center_up.png",
524                         "vscroll_center_hi.png",
525                         "vscroll_center_dn.png",
526                         "vscroll_bg.png",
527                         "vscroll_back_up.png",
528                         "vscroll_back_hi.png",
529                         "vscroll_back_dn.png",
530                         "vscroll_fwd_up.png",
531                         "vscroll_fwd_hi.png",
532                         "vscroll_fwd_dn.png");
533
534 //Graphic Copied from default. Improve!!
535 //To make this work better, it may be neccessary to replace new_button with new_image_set
536         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
537         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
538         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
539         new_button("swap_extents.png",
540                 "editpanel_up.png",
541                 "editpanel_hi.png",
542                 "editpanel_dn.png",
543                 "swap_extents");
544 //swap_extents.png not copied
545
546 // Record windows
547         rgui_batch = new_image("recordgui_batch.png");
548         rgui_controls = new_image("recordgui_controls.png");
549         rgui_list = new_image("recordgui_list.png");
550         rmonitor_panel = new_image("recordmonitor_panel.png");
551         rmonitor_meters = new_image("recordmonitor_meters.png");
552
553
554 //COPY START >>
555         preferences_category_overlap = 0;
556         preferencescategory_x = xS(5);
557         preferencescategory_y = yS(5);
558         preferencestitle_x = xS(5);
559         preferencestitle_y = yS(10);
560         preferencesoptions_x = xS(5);
561         preferencesoptions_y = 0;
562 //COPY END<<
563
564 // MWindow
565 //COPY START >>
566         message_normal = resources->text_default;
567         audio_color = BLACK;
568         mtransport_margin = xS(11);
569         toggle_margin = xS(11);
570 //COPY END >>
571
572         new_image("mbutton_left","mbutton_left.png");
573         new_image("mbutton_right","mbutton_right.png");
574         new_image("timebar_bg", "timebar_bg.png");
575         new_image("timebar_brender", "timebar_brender.png");
576         new_image("clock_bg", "mclock.png");
577         new_image("patchbay_bg", "patchbay_bg.png");
578         new_image("tracks_bg","tracks_bg.png");
579         new_image("zoombar_left","zoombar_left.png");
580         new_image("zoombar_right","zoombar_right.png");
581         new_image("statusbar_left","statusbar_left.png");
582         new_image("statusbar_right","statusbar_right.png");
583
584         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
585         new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
586         new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
587
588         //Here an improvement may be needed
589         new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
590         new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
591
592 //Graphic Copied from default. Improve!!
593         new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
594         new_image("mode_add", "mode_add.png");
595         new_image("mode_divide", "mode_divide.png");
596         new_image("mode_multiply", "mode_multiply.png");
597         new_image("mode_normal", "mode_normal.png");
598         new_image("mode_replace", "mode_replace.png");
599         new_image("mode_subtract", "mode_subtract.png");
600         new_image("mode_max", "mode_max.png");
601         new_image("mode_min", "mode_min.png");
602
603 //Graphic Copied from default. Improve!!
604         new_toggle("plugin_on.png",
605                 "pluginbutton_hi.png",
606                 "pluginbutton_hi.png",
607                 "pluginbutton_select.png",
608                 "pluginbutton_dn.png",
609                 "pluginbutton_selecthi.png",
610                 "plugin_on");
611
612 //Graphic Copied from default. Improve!!
613         new_toggle("plugin_show.png",
614                 "plugin_show.png",
615                 "pluginbutton_hi.png",
616                 "pluginbutton_select.png",
617                 "pluginbutton_dn.png",
618                 "pluginbutton_selecthi.png",
619                 "plugin_show");
620
621         new_image("cpanel_bg", "cpanel_bg.png");
622         new_image("cbuttons_left", "cbuttons_left.png");
623         new_image("cbuttons_right", "cbuttons_right.png");
624         new_image("cmeter_bg", "cmeter_bg.png");
625         new_image("cwindow_focus", "cwindow_focus.png");
626         new_image("vbuttons_left", "vbuttons_left.png");
627         new_image("vbuttons_right", "vbuttons_right.png");
628         timebar_view_data = new_image("timebar_view.png");
629
630 // CWindow
631         new_image("cpanel_bg.png");
632         new_image("cbuttons_left.png");
633         new_image("cbuttons_right.png");
634         new_image("cmeter_bg.png");
635
636 // VWindow
637         new_image("vbuttons_left.png");
638         new_image("vbuttons_right.png");
639         new_image("vmeter_bg.png");
640
641         new_image("preferences_bg", "preferences_bg.png");
642
643
644         new_image("new_bg", "new_bg.png");
645         new_image("setformat_bg", "setformat_bg2.png");
646
647 // x, y of Format dialog box
648         setformat_w = xS(600);
649         setformat_h = yS(560);
650         setformat_x1 = xS(15);
651         setformat_x2 = xS(100);
652
653         setformat_x3 = xS(315);
654         setformat_x4 = xS(415);
655         setformat_y1 = yS(20);
656         setformat_y2 = yS(85);
657         setformat_y3 = yS(125);
658         setformat_margin = xS(30);
659         setformat_channels_x = xS(25);
660         setformat_channels_y = yS(242);
661         setformat_channels_w = xS(250);
662         setformat_channels_h = yS(250);
663
664         loadfile_pad = yS(70);
665         browse_pad = yS(20);
666
667 //This buttons miss a bit. May need to be improved
668         new_image_set("playpatch_data",
669                 5,
670                 "playpatch_up.png",
671                 "playpatch_hi.png",
672                 "playpatch_checked.png",
673                 "playpatch_dn.png",
674                 "playpatch_checkedhi.png");
675
676         new_image_set("recordpatch_data",
677                 5,
678                 "recordpatch_up.png",
679                 "recordpatch_hi.png",
680                 "recordpatch_checked.png",
681                 "recordpatch_dn.png",
682                 "recordpatch_checkedhi.png");
683
684         new_image_set("gangpatch_data",
685                 5,
686                 "gangpatch_up.png",
687                 "gangpatch_hi.png",
688                 "gangpatch_checked.png",
689                 "gangpatch_dn.png",
690                 "gangpatch_checkedhi.png");
691
692         new_image_set("drawpatch_data",
693                 5,
694                 "drawpatch_up.png",
695                 "drawpatch_hi.png",
696                 "drawpatch_checked.png",
697                 "drawpatch_dn.png",
698                 "drawpatch_checkedhi.png");
699
700         new_toggle("masterpatch.png",
701                 "patch_up.png",
702                 "patch_hi.png",
703                 "patch_checked.png",
704                 "patch_dn.png",
705                 "patch_checkedhi.png",
706                 "masterpatch_data");
707
708
709         new_image_set("mutepatch_data",
710                 5,
711                 "mutepatch_up.png",
712                 "mutepatch_hi.png",
713                 "mutepatch_checked.png",
714                 "mutepatch_dn.png",
715                 "mutepatch_checkedhi.png");
716
717         new_image_set("expandpatch_data",
718                 5,
719                 "expandpatch_up.png",
720                 "expandpatch_hi.png",
721                 "expandpatch_checked.png",
722                 "expandpatch_dn.png",
723                 "expandpatch_checkedhi.png");
724
725         build_icons();
726         build_bg_data();
727         build_overlays();
728
729
730
731 //Graphic Copied from default. Improve!! -> See outpoint.png/inpoint.png
732         out_point = new_image_set(5,
733                 "out_up.png",
734                 "out_hi.png",
735                 "out_checked.png",
736                 "out_dn.png",
737                 "out_checkedhi.png");
738         in_point = new_image_set(5,
739                 "in_up.png",
740                 "in_hi.png",
741                 "in_checked.png",
742                 "in_dn.png",
743                 "in_checkedhi.png");
744
745 //Graphic Copied from default. Improve!! -> see label.png
746         label_toggle = new_image_set(5,
747                 "labeltoggle_up.png",
748                 "labeltoggle_uphi.png",
749                 "label_checked.png",
750                 "labeltoggle_dn.png",
751                 "label_checkedhi.png");
752
753         ffmpeg_toggle = new_image_set(5,
754                 "ff_up.png",
755                 "ff_hi.png",
756                 "ff_checked.png",
757                 "ff_down.png",
758                 "ff_checkedhi.png");
759
760         proxy_p_toggle = new_image_set(5,
761                 "proxy_p_up.png",
762                 "proxy_p_hi.png",
763                 "proxy_p_chkd.png",
764                 "proxy_p_down.png",
765                 "proxy_p_chkdhi.png");
766
767         proxy_s_toggle = new_image_set(5,
768                 "proxy_s_up.png",
769                 "proxy_s_hi.png",
770                 "proxy_s_chkd.png",
771                 "proxy_s_down.png",
772                 "proxy_s_chkdhi.png");
773
774         mask_mode_toggle = new_image_set(5,
775                 "mask_mode_up.png",
776                 "mask_mode_hi.png",
777                 "mask_mode_chkd.png",
778                 "mask_mode_down.png",
779                 "mask_mode_chkdhi.png");
780
781         shbtn_data = new_image_set(3,
782                 "shbtn_up.png",
783                 "shbtn_hi.png",
784                 "shbtn_dn.png");
785
786         new_image_set("preset_edit",
787                 3,
788                 "preset_edit0.png",
789                 "preset_edit1.png",
790                 "preset_edit2.png");
791
792         statusbar_cancel_data = new_image_set(3,
793                 "statusbar_cancel_up.png",
794                 "statusbar_cancel_hi.png",
795                 "statusbar_cancel_dn.png");
796
797 //Graphic Copied from default. Improve!! -> make transparent edges
798         VFrame *editpanel_up = new_image("editpanel_up.png");
799         VFrame *editpanel_hi = new_image("editpanel_hi.png");
800         VFrame *editpanel_dn = new_image("editpanel_dn.png");
801         VFrame *editpanel_checked = new_image("editpanel_checked.png");
802         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
803
804 //Graphic Copied from default. Improve!!
805         new_image("panel_divider", "panel_divider.png");
806         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
807         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
808         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
809         new_button("lok.png", editpanel_up, editpanel_hi, editpanel_dn, "lok");
810
811         new_toggle("histogram_toggle.png",
812                 editpanel_up,
813                 editpanel_hi,
814                 editpanel_checked,
815                 editpanel_dn,
816                 editpanel_checkedhi,
817                 "histogram_toggle");
818         new_toggle("histogram_rgb.png",
819                 editpanel_up,
820                 editpanel_hi,
821                 editpanel_checked,
822                 editpanel_dn,
823                 editpanel_checkedhi,
824                 "histogram_rgb_toggle");
825         new_toggle("waveform.png",
826                 editpanel_up,
827                 editpanel_hi,
828                 editpanel_checked,
829                 editpanel_dn,
830                 editpanel_checkedhi,
831                 "waveform_toggle");
832         new_toggle("waveform_rgb.png",
833                 editpanel_up,
834                 editpanel_hi,
835                 editpanel_checked,
836                 editpanel_dn,
837                 editpanel_checkedhi,
838                 "waveform_rgb_toggle");
839         new_toggle("scope.png",
840                 editpanel_up,
841                 editpanel_hi,
842                 editpanel_checked,
843                 editpanel_dn,
844                 editpanel_checkedhi,
845                 "scope_toggle");
846
847         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
848         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
849
850         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
851         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
852         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
853         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
854         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
855         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
856 //      indelete_data = new_button("clearinpoint.png", editpanel_up, editpanel_hi, editpanel_dn);   //Specific to BD
857         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
858         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
859         new_button("magnifyS.png", "editpanelW_up.png", "editpanelW_hi.png", "editpanelW_dn.png", "magnify_button");
860         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
861         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
862         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
863 //      outdelete_data = new_button("clearoutpoint.png", editpanel_up, editpanel_hi, editpanel_dn);   //Specific to BD
864         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
865         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
866         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
867         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
868         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
869         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
870         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
871         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
872         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
873         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
874         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
875         new_button("clapper.png", editpanel_up, editpanel_hi, editpanel_dn, "clapperbutton");
876         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
877         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
878         new_button("wrench.png", "editpanelW_up.png", "editpanelW_hi.png", "editpanelW_dn.png", "wrench");
879
880 //Make transparent borders
881 #define TRANSPORT_LEFT_IMAGES  "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
882 #define TRANSPORT_CENTER_IMAGES  "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
883 #define TRANSPORT_RIGHT_IMAGES  "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
884 //      build_transport(duplex_data, get_image_data("duplex.png"), transport_bg, 1);    //Specific to BD
885         new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
886         new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
887         new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
888         new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
889         new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
890         new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
891 //Graphic Copied from default. Improve!!
892         new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
893         new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
894 //Graphic Copied from default. Improve!!
895         new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
896         new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
897         new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
898         new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
899         new_button("stoprec.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
900
901
902
903 // CWindow icons
904 //Graphic Copied from default. Improve!!
905         new_image("cwindow_inactive", "cwindow_inactive.png");
906         new_image("cwindow_active", "cwindow_active.png");
907
908
909         new_image_set("batch_render_start",
910                 3,
911                 "batchstart_up.png",
912                 "batchstart_hi.png",
913                 "batchstart_dn.png");
914         new_image_set("batch_render_stop",
915                 3,
916                 "batchstop_up.png",
917                 "batchstop_hi.png",
918                 "batchstop_dn.png");
919         new_image_set("batch_render_cancel",
920                 3,
921                 "batchcancel_up.png",
922                 "batchcancel_hi.png",
923                 "batchcancel_dn.png");
924
925 //Graphic Copied from default. Improve!!
926         new_image_set("category_button",
927                 3,
928                 "preferencesbutton_dn.png",
929                 "preferencesbutton_dnhi.png",
930                 "preferencesbutton_dnlo.png");
931
932         new_image_set("category_button_checked",
933                 3,
934                 "preferencesbutton_up.png",
935                 "preferencesbutton_uphi.png",
936                 "preferencesbutton_dnlo.png");
937
938
939         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
940         new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
941         new_toggle("spankeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
942         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
943         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
944         new_toggle("blank30x30.png",
945                    new_image("locklabels_locked.png"),
946                    new_image("locklabels_lockedhi.png"),
947                    new_image("locklabels_unlocked.png"),
948                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
949                    new_image("locklabels_unlockedhi.png"),
950                    "locklabels");
951         new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
952         new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
953         new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
954
955 //Is that necessary??
956         VFrame *cpanel_up = new_image("editpanel_up.png");
957         VFrame *cpanel_hi = new_image("editpanel_hi.png");
958         VFrame *cpanel_dn = new_image("editpanel_dn.png");
959         VFrame *cpanel_checked = new_image("editpanel_checked.png");
960         VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
961
962         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
963         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
964         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
965         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
966         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
967         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
968         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
969         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
970         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
971         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
972
973
974 // Maybe we can live without the commented part
975 // MIHA: Commented out in favor of default version M4>>
976 //      new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"camera");
977 //      new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"crop");
978 //      new_toggle("eyedrop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"eyedrop");
979 //      new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"magnify");
980 //      new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"mask");
981 //      new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"projector");
982 //      new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"protect");
983 //      new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"titlesafe");
984 //      new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"tool");
985 // MIHA: Commented out in favor of default version M4<<
986
987         // toggle for tangent mode (compositor/tool window)
988         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
989         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
990
991         new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
992                 "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
993                 "mask_scale_x");
994         new_toggle("mask_scale_y.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
995                 "mask_scale_chkd.png",  "mask_scale_ydown.png",  "mask_scale_chkdhi.png",
996                 "mask_scale_y");
997         new_toggle("mask_scale_xy.png",  "mask_scale_up.png",   "mask_scale_uphi.png",
998                 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
999                 "mask_scale_xy");
1000
1001         flush_images();
1002
1003         title_font = MEDIUMFONT;
1004         title_color = BLACK;
1005         recordgui_fixed_color = BLACK;
1006         recordgui_variable_color = RED;
1007
1008         int font_size = (int)(14*resources->font_scale + 0.5);
1009         char string[BCTEXTLEN];
1010         sprintf(string,"-*-helvetica-medium-r-normal-*-%d-*", font_size);
1011         delete [] resources->medium_font;
1012         resources->medium_font = cstrdup(string);
1013
1014         channel_position_color = MEYELLOW;
1015         resources->meter_title_w = xS(28);
1016
1017         // (asset) edit info text color
1018         edit_font_color = BLACK;
1019
1020 //Specific to BD
1021         //clock
1022         resources->draw_clock_background = 0;
1023
1024 //Specific to BD
1025         //buttons
1026         resources->button_highlighted = LTGREY;
1027         resources->button_uphighlighted = DKGREY;
1028         resources->button_light = WHITE;
1029         resources->button_up = LTGREY;
1030         resources->button_shadow = DKGREY;
1031         resources->button_down = MDGREY;
1032
1033 //Specific to BD
1034         //listbox
1035
1036         //labels
1037         resources->label_images = new_image_set(5,
1038                 "radial_up.png",
1039                 "radial_uphi.png",
1040                 "radial_checked.png",
1041                 "radial_down.png",
1042                 "radial_checkedhi.png");
1043
1044         /*      resources->type_to_icon = new_image_set(5,
1045             "file_folder.png",
1046                 "file_unknown.png",
1047                 "file_film.png",
1048                 "file_sound.png",
1049                 "file_column.png");
1050    */
1051
1052 //Specific to BD
1053         resources->audiovideo_color = DKGREY;
1054
1055 //Specific to BD
1056         //tooltip
1057         resources->tooltip_bg_color = 0xfff7e3;
1058 }
1059
1060 #define CWINDOW_METER_MARGIN xS(5)
1061 #define VWINDOW_METER_MARGIN xS(5)
1062
1063 //Specific to BD
1064 void BlueDotTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
1065 {
1066 // Position of menu buttons (start, stop, ff, etc.)
1067         mbuttons_x = 0;
1068         mbuttons_y = gui->mainmenu->get_h();
1069         mbuttons_w = w - (ffmpeg_toggle[0]->get_w()+xS(2) + proxy_p_toggle[0]->get_w()+xS(2));
1070         mbuttons_h = get_image("mbutton_left")->get_h();
1071         mclock_x = xS(20);              //x position of digits in clock window
1072         mclock_y = mbuttons_y + 1 + mbuttons_h + CWINDOW_METER_MARGIN;
1073         mclock_w = get_image("clock_bg")->get_w() - xS(72);
1074         mclock_h = get_image("clock_bg")->get_h();
1075
1076 //Time bar - coordinates and dimensions
1077         mtimebar_x = get_image("patchbay_bg")->get_w();
1078         mtimebar_y = mbuttons_y + mbuttons_h;
1079         mtimebar_w = w - mtimebar_x;
1080         mtimebar_h = get_image("timebar_bg")->get_h();
1081
1082 // Zooming tracks - just above the status bar
1083         mzoom_h =  get_image("zoombar_left")->get_h();
1084         mzoom_x = 0;
1085         mzoom_y = h - get_image("statusbar_left")->get_h() - mzoom_h;
1086         mzoom_w = w;
1087
1088 // Status bar at the very bottom of the screen.
1089         mstatus_x = 0;
1090 //      mstatus_y = mzoom_y + mzoom_h;
1091         mstatus_y = mzoom_y + mzoom_h;
1092         mstatus_w = w;
1093         mstatus_h = h - mstatus_y;
1094         mstatus_message_x = xS(10);
1095         mstatus_message_y = yS(8);
1096         mstatus_progress_w = xS(230);
1097         mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - xS(240);
1098         mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
1099
1100 //Specific to BD
1101         mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
1102         mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
1103
1104 //This is Patch Bay - on the left side of the tracks.
1105         patchbay_x = 0;
1106         patchbay_y = mtimebar_y + mtimebar_h;
1107         patchbay_w = get_image("patchbay_bg")->get_w();
1108         patchbay_h = mzoom_y - patchbay_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
1109
1110 //Canvas where audio and video tracks are
1111         mcanvas_x = 0;
1112         mcanvas_y = mtimebar_y + mtimebar_h;
1113         mcanvas_w = w;
1114         mcanvas_h = patchbay_h;
1115 //COPIED START
1116         control_pixels = (mcanvas_w * control_pixels) / 1000;
1117         pane_w = get_image_set("xpane")[0]->get_w();
1118         pane_h = get_image_set("ypane")[0]->get_h();
1119         pane_x = mcanvas_x + mcanvas_w;
1120         pane_y = mcanvas_y + mcanvas_h;
1121         mhscroll_x = 0;
1122         mhscroll_y = mzoom_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
1123         mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT);
1124         mvscroll_x = mcanvas_x + mcanvas_w;
1125         mvscroll_y = mcanvas_y;
1126         mvscroll_h = mcanvas_h;
1127 //COPIED END
1128 }
1129
1130 void BlueDotTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
1131 {
1132         if(cwindow_controls)
1133         {
1134 SET_TRACE
1135                 ccomposite_x = 0;
1136                 ccomposite_y = yS(5);
1137                 ccomposite_w = get_image("cpanel_bg")->get_w();
1138                 ccomposite_h = mwindow->session->cwindow_h -
1139                         get_image("cbuttons_left")->get_h();
1140                 cslider_x = xS(5);
1141                 cslider_y = ccomposite_h + yS(23);
1142                 cedit_x = xS(10);
1143                 cedit_y = cslider_y + yS(17);
1144                 ctransport_x = xS(10);
1145                 ctransport_y = mwindow->session->cwindow_h -
1146                         get_image_set("autokeyframe")[0]->get_h();
1147                 ccanvas_x = ccomposite_x + ccomposite_w;
1148                 ccanvas_y = 0;
1149                 ccanvas_h = ccomposite_h;
1150
1151                 cstatus_x = xS(453);
1152                 cstatus_y = mwindow->session->cwindow_h - yS(66);
1153
1154                 if(mwindow->edl->session->cwindow_meter)
1155                 {
1156                         cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(this,
1157                                 mwindow->edl->session->audio_channels, mwindow->edl->session->cwindow_meter);
1158                         ccanvas_w = cmeter_x - ccanvas_x - xS(5);
1159                 }
1160                 else
1161                 {
1162                         cmeter_x = mwindow->session->cwindow_w;
1163                         ccanvas_w = cmeter_x - ccanvas_x;
1164                 }
1165 SET_TRACE
1166         }
1167         else
1168         {
1169 SET_TRACE
1170                 ccomposite_x = -get_image("cpanel_bg")->get_w();
1171                 ccomposite_y = 0;
1172                 ccomposite_w = get_image("cpanel_bg")->get_w();
1173                 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
1174
1175                 cslider_x = xS(5);
1176                 cslider_y = mwindow->session->cwindow_h;
1177                 cedit_x = xS(10);
1178                 cedit_y = cslider_y + yS(17);
1179                 ctransport_x = xS(10);
1180                 ctransport_y = cedit_y + yS(40);
1181                 ccanvas_x = 0;
1182                 ccanvas_y = 0;
1183                 ccanvas_w = mwindow->session->cwindow_w;
1184                 ccanvas_h = mwindow->session->cwindow_h;
1185                 cmeter_x = mwindow->session->cwindow_w;
1186 //COPIED START
1187                 cstatus_x = mwindow->session->cwindow_w;
1188                 cstatus_y = mwindow->session->cwindow_h;
1189 //COPIED END
1190 SET_TRACE
1191         }
1192
1193 SET_TRACE
1194
1195         czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + xS(20);
1196         czoom_y = ctransport_y + yS(5);
1197
1198         cmeter_y = yS(5);
1199         cmeter_h = mwindow->session->cwindow_h - cmeter_y;
1200
1201         ctimebar_x = ccanvas_x;
1202         ctimebar_y = ccanvas_y + ccanvas_h;
1203         ctimebar_w = ccanvas_w;
1204
1205 //Specific to BD
1206         cslider_w = ccanvas_x + ccanvas_w - cslider_x;
1207         ctimebar_x = ccanvas_x;
1208         ctimebar_y = ccanvas_y + ccanvas_h;
1209         ctimebar_w = ccanvas_w;
1210         ctimebar_h = yS(16);
1211
1212
1213 // Not used
1214         ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
1215         ctime_y = ctransport_y;
1216         cdest_x = czoom_x;
1217         cdest_y = czoom_y + yS(30);
1218 SET_TRACE
1219 }
1220
1221
1222
1223 void BlueDotTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
1224 {
1225
1226 }
1227
1228 // COPIED START--------
1229 void BlueDotTheme::get_rmonitor_sizes(int do_audio,
1230         int do_video,
1231         int do_channel,
1232         int do_interlace,
1233         int do_avc,
1234         int audio_channels)
1235 {
1236         Theme::get_rmonitor_sizes(do_audio,
1237                 do_video,
1238                 do_channel,
1239                 do_interlace,
1240                 do_avc,
1241                 audio_channels);
1242         if(!do_video && do_audio)
1243         {
1244                 rmonitor_meter_y -= yS(30);
1245                 rmonitor_meter_h += yS(30);
1246         }
1247 }
1248 // COPIED END--------
1249
1250
1251 void BlueDotTheme::get_vwindow_sizes(VWindowGUI *gui)
1252 {
1253         vmeter_y = yS(5);
1254         vmeter_h = mwindow->session->vwindow_h - cmeter_y;
1255         vcanvas_x = 0;
1256         vcanvas_y = 0;
1257         vcanvas_h = mwindow->session->vwindow_h - get_image("vbuttons_left")->get_h();
1258
1259         if(mwindow->edl->session->vwindow_meter)
1260         {
1261                 vmeter_x = mwindow->session->vwindow_w -
1262                         VWINDOW_METER_MARGIN -
1263                         MeterPanel::get_meters_width(this,
1264                         mwindow->edl->session->audio_channels, mwindow->edl->session->vwindow_meter);
1265                 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
1266         }
1267         else
1268         {
1269                 vmeter_x = mwindow->session->vwindow_w;
1270                 vcanvas_w = mwindow->session->vwindow_w;
1271         }
1272
1273         vtimebar_x = vcanvas_x;
1274         vtimebar_y = vcanvas_y + vcanvas_h;
1275         vtimebar_w = vcanvas_w;
1276         vtimebar_h = yS(16);
1277
1278 //Specific to BD
1279         vslider_x = xS(10);
1280         vslider_y = vtimebar_y + yS(25);
1281         vslider_w = vtimebar_w - vslider_x;
1282         vedit_x = xS(10);
1283         vedit_y = vslider_y + yS(17);
1284         vtransport_x = xS(10);
1285         vtransport_y = mwindow->session->vwindow_h -
1286                 get_image_set("autokeyframe")[0]->get_h();
1287         vtime_x = xS(373);
1288         vtime_y = vedit_y + yS(7);
1289         vtime_w = xS(100);
1290
1291         vzoom_x = vtime_x + xS(150);
1292         vzoom_y = vtime_y;
1293         vsource_x = vtime_x + xS(50);
1294         vsource_y = vtransport_y + yS(5);
1295 }
1296
1297
1298 void BlueDotTheme::build_icons()
1299 {
1300         new_image("mwindow_icon", "heroine_icon.png");
1301         new_image("vwindow_icon", "heroine_icon.png");
1302         new_image("cwindow_icon", "heroine_icon.png");
1303         new_image("awindow_icon", "heroine_icon.png");
1304         new_image("record_icon", "heroine_icon.png");
1305 }
1306
1307
1308
1309 void BlueDotTheme::build_bg_data()
1310 {
1311 // Audio settings
1312         channel_bg_data = new VFramePng(get_image_data("channel_bg.png"));
1313         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1314
1315 // Track bitmaps
1316         new_image1("resource1024", "resource1024.png");
1317         new_image1("resource512", "resource512.png");
1318         new_image1("resource256", "resource256.png");
1319         new_image1("resource128", "resource128.png");
1320         new_image1("resource64", "resource64.png");
1321         new_image1("resource32", "resource32.png");
1322 //Graphic Copied from default. Improve!!
1323         new_image("plugin_bg_data", "plugin_bg.png");
1324         new_image("title_bg_data", "title_bg.png");
1325         new_image("vtimebar_bg_data", "vwindow_timebar.png");
1326 }
1327
1328
1329 //Graphic Copied from default. Improve!!  -- use your imagination
1330 void BlueDotTheme::build_overlays()
1331 {
1332         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1333         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1334         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1335         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1336         hardedge_data = new VFramePng(get_image_data("hardedge.png"));
1337         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1338         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1339 }
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349 void BlueDotTheme::draw_rwindow_bg(RecordGUI *gui)
1350 {
1351 //      int y;
1352 //      int margin = xS(50);
1353 //      int margin2 = xS(80);
1354 //      gui->draw_9segment(recordgui_batch_x - margin, 0,
1355 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
1356 //              recordgui_buttons_y,
1357 //              rgui_batch);
1358 //      gui->draw_3segmenth(recordgui_options_x - margin2,
1359 //              recordgui_buttons_y - yS(5),
1360 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
1361 //              rgui_controls);
1362 //      y = recordgui_buttons_y - yS(5) + rgui_controls->get_h();
1363 //      gui->draw_9segment(0, y,
1364 //              mwindow->session->rwindow_w,
1365 //              mwindow->session->rwindow_h - y,
1366 //              rgui_list);
1367 }
1368
1369 void BlueDotTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
1370 {
1371 //      int margin = xS(45);
1372 //      int panel_w = xS(300);
1373 //      int x = rmonitor_meter_x - margin;
1374 //      int w = mwindow->session->rmonitor_w - x;
1375 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1376 //      gui->clear_box(0, 0,
1377 //              mwindow->session->rmonitor_w,
1378 //              mwindow->session->rmonitor_h);
1379 //      gui->draw_9segment(x, 0,
1380 //              w,
1381 //              mwindow->session->rmonitor_h,
1382 //              rmonitor_meters);
1383 }
1384
1385 //Specific to BD
1386 void BlueDotTheme::draw_mwindow_bg(MWindowGUI *gui)
1387 {
1388 // Button bar (not menu bar)
1389 #define MBUTTONS_RIGHTEDGE xS(290 + 11 + 2*30 + 11 + 2*30 + 11 + 14*30)
1390         gui->draw_3segmenth(mbuttons_x,
1391                 mbuttons_y,
1392                 MBUTTONS_RIGHTEDGE,
1393                 get_image("mbutton_left"),
1394                 0);
1395         gui->draw_3segmenth(mbuttons_x + MBUTTONS_RIGHTEDGE,
1396                 mbuttons_y,
1397                 mbuttons_w - xS(500),
1398                 get_image("mbutton_right"));
1399
1400         gui->draw_vframe(get_image("panel_divider"),
1401                 mbuttons_x + xS(290 + 5),
1402                 mbuttons_y - 1);
1403
1404         gui->draw_vframe(get_image("panel_divider"),
1405                 mbuttons_x + xS(290 + 11 + 30 * 2 + 5),
1406                 mbuttons_y - 1);
1407
1408         gui->draw_vframe(get_image("panel_divider"),
1409                 mbuttons_x + xS(290 + 11 +  30 * 2 + 11 + 30 * 3 + 5),
1410                 mbuttons_y - 1);
1411
1412 //Specific to BD
1413 // Clock (here the background of the clock is drawn)
1414         gui->draw_3segmenth(0,
1415                 mbuttons_y + get_image("mbutton_left")->get_h(),
1416                 get_image("patchbay_bg")->get_w(),
1417                 get_image("clock_bg"));
1418
1419 //Specific to BD
1420 // Patchbay
1421         gui->draw_3segmentv(patchbay_x, patchbay_y,
1422                 patchbay_h, get_image("patchbay_bg"));
1423 //patchbay_h + yS(10),
1424
1425 //Specific to BD
1426 //Drawing of Track's canvas
1427         gui->draw_9segment(mcanvas_x, mcanvas_y,
1428                 mcanvas_w, patchbay_h + yS(26),
1429                 get_image("tracks_bg"));
1430 //patchbay_h + yS(10),
1431
1432 // Timebar
1433         gui->draw_3segmenth(mtimebar_x, mtimebar_y,
1434                 mtimebar_w, get_image("timebar_bg"));
1435
1436 //Specific to BD
1437 // Zoombar
1438 #define ZOOMBAR_CENTER xS(1100)
1439         gui->draw_3segmenth(mzoom_x, mzoom_y,
1440                 ZOOMBAR_CENTER, get_image("zoombar_left"));
1441         if(mzoom_w > ZOOMBAR_CENTER)
1442                 gui->draw_3segmenth(mzoom_x + ZOOMBAR_CENTER, mzoom_y,
1443                         mzoom_w - ZOOMBAR_CENTER, get_image("zoombar_right"));
1444 // Status
1445         gui->draw_3segmenth(mstatus_x, mstatus_y,
1446                 ZOOMBAR_CENTER, get_image("statusbar_left"));
1447
1448         if(mstatus_w > ZOOMBAR_CENTER)
1449                 gui->draw_3segmenth(mstatus_x + ZOOMBAR_CENTER, mstatus_y,
1450                               mstatus_w - ZOOMBAR_CENTER, get_image("statusbar_right"));
1451
1452 }
1453
1454 void BlueDotTheme::draw_cwindow_bg(CWindowGUI *gui)
1455 {
1456 //Specific to BD
1457         const int button_division = xS(530);
1458         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1459         gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1460         if(mwindow->edl->session->cwindow_meter)
1461         {
1462                 gui->draw_3segmenth(button_division,
1463                         ccomposite_h,
1464                         cmeter_x - CWINDOW_METER_MARGIN - button_division,
1465                         get_image("cbuttons_right"));
1466                 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1467                         0,
1468                         mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1469                         mwindow->session->cwindow_h,
1470                         get_image("cmeter_bg"));
1471         }
1472         else
1473         {
1474                 gui->draw_3segmenth(button_division,
1475                         ccomposite_h,
1476                         cmeter_x - CWINDOW_METER_MARGIN - button_division + xS(100),
1477                         get_image("cbuttons_right"));
1478         }
1479 }
1480
1481 void BlueDotTheme::draw_vwindow_bg(VWindowGUI *gui)
1482 {
1483 //Specific to BD
1484         const int button_division = xS(535);
1485         gui->draw_3segmenth(0,
1486                 vcanvas_h,
1487                 button_division,
1488                 get_image("vbuttons_left"));
1489         if(mwindow->edl->session->vwindow_meter)
1490         {
1491                 gui->draw_3segmenth(button_division,
1492                         vcanvas_h,
1493                         vmeter_x - VWINDOW_METER_MARGIN - button_division,
1494                         get_image("vbuttons_right"));
1495                 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
1496                         0,
1497                         mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1498                         mwindow->session->vwindow_h,
1499                         get_image("vmeter_bg"));
1500         }
1501         else
1502         {
1503                 gui->draw_3segmenth(button_division,
1504                         vcanvas_h,
1505                         vmeter_x - VWINDOW_METER_MARGIN - button_division + xS(100),
1506                         get_image("vbuttons_right"));
1507         }
1508 }
1509
1510 void BlueDotTheme::get_preferences_sizes()
1511 {
1512 }
1513
1514 //Specific to BD
1515 void BlueDotTheme::draw_preferences_bg(PreferencesWindow *gui)
1516 {
1517         gui->draw_9segment(0, 0, gui->get_w(), gui->get_h() - yS(40), get_image("preferences_bg"));
1518 }
1519
1520 void BlueDotTheme::get_new_sizes(NewWindow *gui)
1521 {
1522 }
1523
1524 void BlueDotTheme::draw_new_bg(NewWindow *gui)
1525 {
1526         gui->draw_vframe(get_image("new_bg"), 0, 0);
1527 }
1528
1529 void BlueDotTheme::draw_setformat_bg(SetFormatWindow *gui)
1530 {
1531         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1532 }
1533
1534
1535
1536
1537