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