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