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