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