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