tweak loadmode icons/tooltips, change snap/grabshot default path, fix broken vicon...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / theme_blue / bluetheme.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6  * by Paolo Rampino <akir4d at gmail dot com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  *
22  */
23
24 #include "bcsignals.h"
25 #include "clip.h"
26 #include "cwindowgui.h"
27 #include "bluetheme.h"
28 #include "edl.h"
29 #include "edlsession.h"
30 #include "mainmenu.h"
31 #include "mainsession.h"
32 #include "mbuttons.h"
33 #include "meterpanel.h"
34 #include "mwindow.h"
35 #include "mwindowgui.h"
36 #include "new.h"
37 #include "patchbay.h"
38 #include "preferencesthread.h"
39 #include "recordgui.h"
40 #include "recordmonitor.h"
41 #include "setformat.h"
42 #include "statusbar.h"
43 #include "timebar.h"
44 #include "trackcanvas.h"
45 #include "vframe.h"
46 #include "vwindowgui.h"
47
48
49 PluginClient* new_plugin(PluginServer *server)
50 {
51         return new BlueDotThemeMain(server);
52 }
53
54 BlueDotThemeMain::BlueDotThemeMain(PluginServer *server)
55  : PluginTClient(server)
56 {
57 }
58
59 BlueDotThemeMain::~BlueDotThemeMain()
60 {
61 }
62
63 const char* BlueDotThemeMain::plugin_title() { return N_("Blue"); }
64
65 Theme* BlueDotThemeMain::new_theme()
66 {
67         theme = new BlueDotTheme;
68         extern unsigned char _binary_theme_blue_data_start[];
69         theme->set_data(_binary_theme_blue_data_start);
70         return theme;
71 }
72
73
74 BlueDotTheme::BlueDotTheme()
75  : Theme()
76 {
77 }
78
79 BlueDotTheme::~BlueDotTheme()
80 {
81         delete camerakeyframe_data;
82         delete channel_position_data;
83         delete keyframe_data;
84         delete maskkeyframe_data;
85         delete modekeyframe_data;
86         delete hardedge_data;
87         delete pankeyframe_data;
88         delete projectorkeyframe_data;
89 }
90
91 void BlueDotTheme::initialize()
92 {
93         BC_Resources *resources = BC_WindowBase::get_resources();
94
95
96         resources->text_default = 0xeeeeff;
97         resources->text_background = 0x1a1447;
98         resources->text_background_disarmed = 0x7282d4;
99         resources->text_border1 = 0x202020;
100         resources->text_border2 = 0x1a1447;
101         resources->text_border3 = 0x1a1447;
102         resources->text_border4 = 0x969696;
103         resources->text_inactive_highlight = 0x707070;
104
105         resources->bg_color = 0x939ed4;
106         resources->border_light2 = resources->bg_color;
107         resources->border_shadow2 = resources->bg_color;
108         resources->default_text_color = 0xeeeeff;
109         resources->menu_title_text = 0xeeeeff;
110         resources->popup_title_text = 0xeeeeff;
111         resources->menu_item_text = 0xeeeeff;
112         resources->menu_highlighted_fontcolor = WHITE;
113         resources->generic_button_margin = xS(30);
114         resources->pot_needle_color = resources->text_default;
115         resources->pot_offset = 1;
116         resources->progress_text = resources->text_default;
117         resources->meter_font_color = resources->default_text_color;
118
119         resources->menu_light = 0xababab;
120         resources->menu_highlighted = 0x6f6f6f;
121         resources->menu_down = 0x4b4b4b;
122         resources->menu_up = 0x4b4b4b;
123         resources->menu_shadow = 0x202020;
124         resources->popupmenu_margin = xS(15);
125         resources->popupmenu_triangle_margin = xS(15);
126
127         resources->listbox_title_color = 0xeeeeff;
128
129         resources->listbox_title_margin = xS(20);
130         resources->listbox_title_hotspot = xS(20);
131         resources->listbox_border1 = 0x1a1a1a;
132         resources->listbox_border2 = 0x1a1447;
133         resources->listbox_border3 = 0x1a1447;
134         resources->listbox_border4 = 0x646464;
135         resources->listbox_highlighted = 0x505050;
136         resources->listbox_inactive = 0x1a1447;
137         resources->listbox_bg = 0;
138         resources->listbox_text = 0xeeeeff;
139
140         resources->filebox_margin = yS(130);
141         resources->file_color = 0xeeeeff;
142         resources->directory_color = 0xa0a0ff;
143
144
145         new_toggle("loadmode_new.png",
146                 "loadmode_up.png",
147                 "loadmode_hi.png",
148                 "loadmode_checked.png",
149                 "loadmode_dn.png",
150                 "loadmode_checkedhi.png",
151                 "loadmode_new");
152         new_toggle("loadmode_none.png",
153                 "loadmode_up.png",
154                 "loadmode_hi.png",
155                 "loadmode_checked.png",
156                 "loadmode_dn.png",
157                 "loadmode_checkedhi.png",
158                 "loadmode_none");
159         new_toggle("loadmode_newcat.png",
160                 "loadmode_up.png",
161                 "loadmode_hi.png",
162                 "loadmode_checked.png",
163                 "loadmode_dn.png",
164                 "loadmode_checkedhi.png",
165                 "loadmode_newcat");
166         new_toggle("loadmode_cat.png",
167                 "loadmode_up.png",
168                 "loadmode_hi.png",
169                 "loadmode_checked.png",
170                 "loadmode_dn.png",
171                 "loadmode_checkedhi.png",
172                 "loadmode_cat");
173         new_toggle("loadmode_newtracks.png",
174                 "loadmode_up.png",
175                 "loadmode_hi.png",
176                 "loadmode_checked.png",
177                 "loadmode_dn.png",
178                 "loadmode_checkedhi.png",
179                 "loadmode_newtracks");
180         new_toggle("loadmode_paste.png",
181                 "loadmode_up.png",
182                 "loadmode_hi.png",
183                 "loadmode_checked.png",
184                 "loadmode_dn.png",
185                 "loadmode_checkedhi.png",
186                 "loadmode_paste");
187         new_toggle("loadmode_resource.png",
188                 "loadmode_up.png",
189                 "loadmode_hi.png",
190                 "loadmode_checked.png",
191                 "loadmode_dn.png",
192                 "loadmode_checkedhi.png",
193                 "loadmode_resource");
194
195         new_toggle("loadmode_edl_clip.png",
196                 "loadmode_up.png",
197                 "loadmode_hi.png",
198                 "loadmode_checked.png",
199                 "loadmode_dn.png",
200                 "loadmode_checkedhi.png",
201                 "loadmode_edl_clip");
202         new_toggle("loadmode_edl_nested.png",
203                 "loadmode_up.png",
204                 "loadmode_hi.png",
205                 "loadmode_checked.png",
206                 "loadmode_dn.png",
207                 "loadmode_checkedhi.png",
208                 "loadmode_edl_nested");
209         new_toggle("loadmode_edl_fileref.png",
210                 "loadmode_up.png",
211                 "loadmode_hi.png",
212                 "loadmode_checked.png",
213                 "loadmode_dn.png",
214                 "loadmode_checkedhi.png",
215                 "loadmode_edl_fileref");
216
217         resources->filebox_icons_images = new_button("icons.png",
218                 "fileboxbutton_up.png",
219                 "fileboxbutton_hi.png",
220                 "fileboxbutton_dn.png",
221                 "filebox_icons");
222
223         resources->filebox_text_images = new_button("text.png",
224                 "fileboxbutton_up.png",
225                 "fileboxbutton_hi.png",
226                 "fileboxbutton_dn.png",
227                 "filebox_text");
228
229         resources->filebox_newfolder_images = new_button("folder.png",
230                 "fileboxbutton_up.png",
231                 "fileboxbutton_hi.png",
232                 "fileboxbutton_dn.png",
233                 "filebox_newfolder");
234
235         resources->filebox_rename_images = new_button("rename.png",
236                 "fileboxbutton_up.png",
237                 "fileboxbutton_hi.png",
238                 "fileboxbutton_dn.png",
239                 "filebox_rename");
240
241         resources->filebox_updir_images = new_button("updir.png",
242                 "fileboxbutton_up.png",
243                 "fileboxbutton_hi.png",
244                 "fileboxbutton_dn.png",
245                 "filebox_updir");
246
247         resources->filebox_delete_images = new_button("delete.png",
248                 "fileboxbutton_up.png",
249                 "fileboxbutton_hi.png",
250                 "fileboxbutton_dn.png",
251                 "filebox_delete");
252
253         resources->filebox_reload_images = new_button("reload.png",
254                 "fileboxbutton_up.png",
255                 "fileboxbutton_hi.png",
256                 "fileboxbutton_dn.png",
257                 "filebox_reload");
258
259
260         resources->filebox_descend_images = new_button("openfolder.png",
261                 "filebox_bigbutton_up.png",
262                 "filebox_bigbutton_hi.png",
263                 "filebox_bigbutton_dn.png",
264                 "filebox_descend");
265
266         resources->usethis_button_images =
267                 resources->ok_images = new_button("ok.png",
268                 "filebox_bigbutton_up.png",
269                 "filebox_bigbutton_hi.png",
270                 "filebox_bigbutton_dn.png",
271                 "ok_button");
272
273         new_button("ok.png",
274                 "new_bigbutton_up.png",
275                 "new_bigbutton_hi.png",
276                 "new_bigbutton_dn.png",
277                 "new_ok_images");
278
279         new_button("reset.png",
280                 "reset_up.png",
281                 "reset_hi.png",
282                 "reset_dn.png",
283                 "reset_button");
284
285         new_button("unclear.png",
286                 "unclear_up.png",
287                 "unclear_hi.png",
288                 "unclear_dn.png",
289                 "unclear_button");
290
291         new_button("keyframe.png",
292                 "keyframe_up.png",
293                 "keyframe_hi.png",
294                 "keyframe_dn.png",
295                 "keyframe_button");
296
297         resources->cancel_images = new_button("cancel.png",
298                 "filebox_bigbutton_up.png",
299                 "filebox_bigbutton_hi.png",
300                 "filebox_bigbutton_dn.png",
301                 "cancel_button");
302
303         new_button("cancel.png",
304                 "new_bigbutton_up.png",
305                 "new_bigbutton_hi.png",
306                 "new_bigbutton_dn.png",
307                 "new_cancel_images");
308
309         new_button("mask_pnt_linear.png",
310                 "mask_button_up.png",
311                 "mask_button_hi.png",
312                 "mask_button_dn.png",
313                 "mask_pnt_linear_images");
314         new_button("mask_crv_linear.png",
315                 "mask_button_up.png",
316                 "mask_button_hi.png",
317                 "mask_button_dn.png",
318                 "mask_crv_linear_images");
319         new_button("mask_all_linear.png",
320                 "mask_button_up.png",
321                 "mask_button_hi.png",
322                 "mask_button_dn.png",
323                 "mask_all_linear_images");
324
325         new_button("mask_pnt_smooth.png",
326                 "mask_button_up.png",
327                 "mask_button_hi.png",
328                 "mask_button_dn.png",
329                 "mask_pnt_smooth_images");
330         new_button("mask_crv_smooth.png",
331                 "mask_button_up.png",
332                 "mask_button_hi.png",
333                 "mask_button_dn.png",
334                 "mask_crv_smooth_images");
335         new_button("mask_all_smooth.png",
336                 "mask_button_up.png",
337                 "mask_button_hi.png",
338                 "mask_button_dn.png",
339                 "mask_all_smooth_images");
340
341         new_button("mask_prst_sqr.png",
342                 "mask_button_up.png",
343                 "mask_button_hi.png",
344                 "mask_button_dn.png",
345                 "mask_prst_sqr_images");
346         new_button("mask_prst_crc.png",
347                 "mask_button_up.png",
348                 "mask_button_hi.png",
349                 "mask_button_dn.png",
350                 "mask_prst_crc_images");
351         new_button("mask_prst_tri.png",
352                 "mask_button_up.png",
353                 "mask_button_hi.png",
354                 "mask_button_dn.png",
355                 "mask_prst_tri_images");
356         new_button("mask_prst_ovl.png",
357                 "mask_button_up.png",
358                 "mask_button_hi.png",
359                 "mask_button_dn.png",
360                 "mask_prst_ovl_images");
361
362         new_button("mask_prst_load.png",
363                 "mask_button_up.png",
364                 "mask_button_hi.png",
365                 "mask_button_dn.png",
366                 "mask_prst_load_images");
367         new_button("mask_prst_save.png",
368                 "mask_button_up.png",
369                 "mask_button_hi.png",
370                 "mask_button_dn.png",
371                 "mask_prst_save_images");
372         new_button("mask_prst_trsh.png",
373                 "mask_button_up.png",
374                 "mask_button_hi.png",
375                 "mask_button_dn.png",
376                 "mask_prst_trsh_images");
377
378         new_button("mask_pstn_cen.png",
379                 "mask_button_up.png",
380                 "mask_button_hi.png",
381                 "mask_button_dn.png",
382                 "mask_pstn_cen_images");
383         new_button("mask_pstn_nrm.png",
384                 "mask_button_up.png",
385                 "mask_button_hi.png",
386                 "mask_button_dn.png",
387                 "mask_pstn_nrm_images");
388
389         resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
390                 "0.png", "1.png", "2.png", "3.png", "4.png", "5.png", "6.png", "7.png",
391                 "8.png", "9.png", "colon.png", "period.png", "a.png", "b.png", "c.png",
392                 "d.png", "e.png", "f.png", "space.png", "dash.png");
393
394         resources->bar_data = new_image("bar", "bar.png");
395         resources->check = new_image("check", "check.png");
396
397         resources->min_menu_w = xS(96);
398         resources->menu_popup_bg = new_image("menu_popup_bg.png");
399         resources->menu_item_bg = new_image_set(3,
400                 "menuitem_up.png",
401                 "menuitem_hi.png",
402                 "menuitem_dn.png");
403         resources->menu_bar_bg = new_image("menubar_bg.png");
404         resources->menu_title_bg = new_image_set(3,
405                 "menubar_up.png",
406                 "menubar_hi.png",
407                 "menubar_dn.png");
408
409
410         resources->popupmenu_images = 0;
411 //              new_image_set(3,
412 //              "menupopup_up.png",
413 //              "menupopup_hi.png",
414 //              "menupopup_dn.png");
415
416         resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
417                 "text_highlight.png");
418
419         resources->generic_button_images = new_image_set(3,
420                         "generic_up.png",
421                         "generic_hi.png",
422                         "generic_dn.png");
423         resources->horizontal_slider_data = new_image_set(6,
424                         "hslider_fg_up.png",
425                         "hslider_fg_hi.png",
426                         "hslider_fg_dn.png",
427                         "hslider_bg_up.png",
428                         "hslider_bg_hi.png",
429                         "hslider_bg_dn.png");
430         resources->vertical_slider_data = new_image_set(6,
431                         "hslider_fg_up.png",
432                         "hslider_fg_hi.png",
433                         "hslider_fg_dn.png",
434                         "hslider_bg_up.png",
435                         "hslider_bg_hi.png",
436                         "hslider_bg_dn.png");
437         for( int i=0; i<6; ++i )
438                 resources->vertical_slider_data[i]->rotate90();
439
440         resources->progress_images = new_image_set(2,
441                         "progress_bg.png",
442                         "progress_hi.png");
443         resources->tumble_data = new_image_set(4,
444                 "tumble_up.png",
445                 "tumble_hi.png",
446                 "tumble_bottom.png",
447                 "tumble_top.png");
448         resources->listbox_button = new_button4("listbox_button.png",
449                 "editpanel_up.png",
450                 "editpanel_hi.png",
451                 "editpanel_dn.png",
452                 "editpanel_hi.png",
453                 "listbox_button");
454         resources->listbox_column = new_image_set(3,
455                 "column_up.png",
456                 "column_hi.png",
457                 "column_dn.png");
458         resources->listbox_up = new_image("listbox_up.png");
459         resources->listbox_dn = new_image("listbox_dn.png");
460         resources->pan_data = new_image_set(7,
461                         "pan_up.png",
462                         "pan_hi.png",
463                         "pan_popup.png",
464                         "pan_channel.png",
465                         "pan_stick.png",
466                         "pan_channel_small.png",
467                         "pan_stick_small.png");
468         resources->pan_text_color = WHITE;
469
470         resources->pot_images = new_image_set(3,
471                 "pot_up.png",
472                 "pot_hi.png",
473                 "pot_dn.png");
474
475         resources->checkbox_images = new_image_set(5,
476                 "checkbox_up.png",
477                 "checkbox_hi.png",
478                 "checkbox_checked.png",
479                 "checkbox_dn.png",
480                 "checkbox_checkedhi.png");
481
482         resources->radial_images = new_image_set(5,
483                 "radial_up.png",
484                 "radial_hi.png",
485                 "radial_checked.png",
486                 "radial_dn.png",
487                 "radial_checkedhi.png");
488
489         resources->xmeter_images = new_image_set(7,
490                 "xmeter_normal.png",
491                 "xmeter_green.png",
492                 "xmeter_red.png",
493                 "xmeter_yellow.png",
494                 "xmeter_white.png",
495                 "xmeter_over.png",
496                 "downmix51_2.png");
497         resources->ymeter_images = new_image_set(7,
498                 "ymeter_normal.png",
499                 "ymeter_green.png",
500                 "ymeter_red.png",
501                 "ymeter_yellow.png",
502                 "ymeter_white.png",
503                 "ymeter_over.png",
504                 "downmix51_2.png");
505
506         resources->hscroll_data = new_image_set(10,
507                         "hscroll_handle_up.png",
508                         "hscroll_handle_hi.png",
509                         "hscroll_handle_dn.png",
510                         "hscroll_handle_bg.png",
511                         "hscroll_left_up.png",
512                         "hscroll_left_hi.png",
513                         "hscroll_left_dn.png",
514                         "hscroll_right_up.png",
515                         "hscroll_right_hi.png",
516                         "hscroll_right_dn.png");
517
518         resources->vscroll_data = new_image_set(10,
519                         "vscroll_handle_up.png",
520                         "vscroll_handle_hi.png",
521                         "vscroll_handle_dn.png",
522                         "vscroll_handle_bg.png",
523                         "vscroll_left_up.png",
524                         "vscroll_left_hi.png",
525                         "vscroll_left_dn.png",
526                         "vscroll_right_up.png",
527                         "vscroll_right_hi.png",
528                         "vscroll_right_dn.png");
529         resources->scroll_minhandle = xS(20);
530
531
532         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
533         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
534         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
535         new_button("swap_extents.png",
536                 "editpanel_up.png",
537                 "editpanel_hi.png",
538                 "editpanel_dn.png",
539                 "swap_extents");
540
541
542 // Record windows
543
544
545         preferences_category_overlap = 0;
546         preferencescategory_x = 0;
547         preferencescategory_y = yS(5);
548         preferencestitle_x = xS(5);
549         preferencestitle_y = yS(10);
550         preferencesoptions_x = xS(5);
551         preferencesoptions_y = 0;
552
553 // MWindow
554         message_normal = resources->text_default;
555         audio_color = GREEN;
556         mtransport_margin = xS(10);
557         toggle_margin = xS(10);
558
559         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
560         new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
561         new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
562
563         new_image("mbutton_bg", "mbutton_bg.png");
564         new_image("timebar_bg", "timebar_bg_flat.png");
565         new_image("timebar_brender", "timebar_brender.png");
566         new_image("clock_bg", "mclock_flat.png");
567         new_image("patchbay_bg", "patchbay_bg.png");
568         new_image("statusbar", "statusbar.png");
569 //      new_image("mscroll_filler", "mscroll_filler.png");
570
571         new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
572         new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
573
574         new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
575         new_image("mode_add", "mode_add.png");
576         new_image("mode_divide", "mode_divide.png");
577         new_image("mode_multiply", "mode_multiply.png");
578         new_image("mode_normal", "mode_normal.png");
579         new_image("mode_replace", "mode_replace.png");
580         new_image("mode_subtract", "mode_subtract.png");
581         new_image("mode_max", "mode_max.png");
582
583         new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
584         new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
585
586 // CWindow
587         new_image("cpanel_bg", "cpanel_bg.png");
588         new_image("cbuttons_left", "cbuttons_left.png");
589         new_image("cbuttons_right", "cbuttons_right.png");
590         new_image("cmeter_bg", "cmeter_bg.png");
591         new_image("cwindow_focus", "cwindow_focus.png");
592
593 // VWindow
594         new_image("vbuttons_left", "vbuttons_left.png");
595         new_image("vclock", "vclock.png");
596
597         new_image("preferences_bg", "preferences_bg.png");
598
599
600         new_image("new_bg", "new_bg.png");
601         new_image("setformat_bg", "setformat_bg.png");
602
603
604         timebar_view_data = new_image("timebar_view.png");
605
606         setformat_w = get_image("setformat_bg")->get_w();
607         setformat_h = get_image("setformat_bg")->get_h();
608         setformat_x1 = xS(15);
609         setformat_x2 = xS(110);
610
611         setformat_x3 = xS(315);
612         setformat_x4 = xS(425);
613         setformat_y1 = yS(20);
614         setformat_y2 = yS(85);
615         setformat_y3 = yS(125);
616         setformat_margin = xS(30);
617         setformat_channels_x = xS(25);
618         setformat_channels_y = yS(242);
619         setformat_channels_w = xS(250);
620         setformat_channels_h = yS(250);
621
622         loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + yS(10);
623         browse_pad = yS(20);
624
625
626         new_toggle("playpatch.png",
627                 "playpatch_up.png",
628                 "playpatch_hi.png",
629                 "playpatch_checked.png",
630                 "playpatch_dn.png",
631                 "playpatch_checkedhi.png",
632                 "playpatch_data");
633
634         new_toggle("recordpatch.png",
635                 "recordpatch_up.png",
636                 "recordpatch_hi.png",
637                 "recordpatch_checked.png",
638                 "recordpatch_dn.png",
639                 "recordpatch_checkedhi.png",
640                 "recordpatch_data");
641
642         new_toggle("gangpatch.png",
643                 "patch_up.png",
644                 "patch_hi.png",
645                 "patch_checked.png",
646                 "patch_dn.png",
647                 "patch_checkedhi.png",
648                 "gangpatch_data");
649
650         new_toggle("drawpatch.png",
651                 "patch_up.png",
652                 "patch_hi.png",
653                 "patch_checked.png",
654                 "patch_dn.png",
655                 "patch_checkedhi.png",
656                 "drawpatch_data");
657
658
659         new_image_set("mutepatch_data",
660                 5,
661                 "mutepatch_up.png",
662                 "mutepatch_hi.png",
663                 "mutepatch_checked.png",
664                 "mutepatch_dn.png",
665                 "mutepatch_checkedhi.png");
666
667         new_image_set("expandpatch_data",
668                 5,
669                 "expandpatch_up.png",
670                 "expandpatch_hi.png",
671                 "expandpatch_checked.png",
672                 "expandpatch_dn.png",
673                 "expandpatch_checkedhi.png");
674
675         build_bg_data();
676         build_overlays();
677
678
679
680
681         out_point = new_image_set(5,
682                 "out_up.png",
683                 "out_hi.png",
684                 "out_checked.png",
685                 "out_dn.png",
686                 "out_checkedhi.png");
687         in_point = new_image_set(5,
688                 "in_up.png",
689                 "in_hi.png",
690                 "in_checked.png",
691                 "in_dn.png",
692                 "in_checkedhi.png");
693
694         label_toggle = new_image_set(5,
695                 "labeltoggle_up.png",
696                 "labeltoggle_uphi.png",
697                 "label_checked.png",
698                 "labeltoggle_dn.png",
699                 "label_checkedhi.png");
700
701         ffmpeg_toggle = new_image_set(5,
702                 "ff_up.png",
703                 "ff_hi.png",
704                 "ff_checked.png",
705                 "ff_down.png",
706                 "ff_checkedhi.png");
707
708         proxy_p_toggle = new_image_set(5,
709                 "proxy_p_up.png",
710                 "proxy_p_hi.png",
711                 "proxy_p_chkd.png",
712                 "proxy_p_down.png",
713                 "proxy_p_chkdhi.png");
714
715         proxy_s_toggle = new_image_set(5,
716                 "proxy_s_up.png",
717                 "proxy_s_hi.png",
718                 "proxy_s_chkd.png",
719                 "proxy_s_down.png",
720                 "proxy_s_chkdhi.png");
721
722         mask_mode_toggle = new_image_set(5,
723                 "mask_mode_up.png",
724                 "mask_mode_hi.png",
725                 "mask_mode_chkd.png",
726                 "mask_mode_down.png",
727                 "mask_mode_chkdhi.png");
728
729         shbtn_data = new_image_set(3,
730                 "shbtn_up.png",
731                 "shbtn_hi.png",
732                 "shbtn_dn.png");
733
734         new_image_set("preset_edit",
735                 3,
736                 "preset_edit0.png",
737                 "preset_edit1.png",
738                 "preset_edit2.png");
739
740         new_image_set("histogram_carrot",
741                 5,
742                 "histogram_carrot_up.png",
743                 "histogram_carrot_hi.png",
744                 "histogram_carrot_checked.png",
745                 "histogram_carrot_dn.png",
746                 "histogram_carrot_checkedhi.png");
747
748
749         statusbar_cancel_data = new_image_set(3,
750                 "statusbar_cancel_up.png",
751                 "statusbar_cancel_hi.png",
752                 "statusbar_cancel_dn.png");
753
754
755         VFrame *editpanel_up = new_image("editpanel_up.png");
756         VFrame *editpanel_hi = new_image("editpanel_hi.png");
757         VFrame *editpanel_dn = new_image("editpanel_dn.png");
758         VFrame *editpanel_checked = new_image("editpanel_checked.png");
759         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
760
761         new_image("panel_divider", "panel_divider.png");
762         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
763         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
764         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
765         new_button("lok.png", editpanel_up, editpanel_hi, editpanel_dn, "lok");
766
767         new_toggle("histogram_toggle.png",
768                 editpanel_up,
769                 editpanel_hi,
770                 editpanel_checked,
771                 editpanel_dn,
772                 editpanel_checkedhi,
773                 "histogram_toggle");
774         new_toggle("histogram_rgb.png",
775                 editpanel_up,
776                 editpanel_hi,
777                 editpanel_checked,
778                 editpanel_dn,
779                 editpanel_checkedhi,
780                 "histogram_rgb_toggle");
781         new_toggle("waveform.png",
782                 editpanel_up,
783                 editpanel_hi,
784                 editpanel_checked,
785                 editpanel_dn,
786                 editpanel_checkedhi,
787                 "waveform_toggle");
788         new_toggle("waveform_rgb.png",
789                 editpanel_up,
790                 editpanel_hi,
791                 editpanel_checked,
792                 editpanel_dn,
793                 editpanel_checkedhi,
794                 "waveform_rgb_toggle");
795         new_toggle("scope.png",
796                 editpanel_up,
797                 editpanel_hi,
798                 editpanel_checked,
799                 editpanel_dn,
800                 editpanel_checkedhi,
801                 "scope_toggle");
802
803         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
804         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
805
806         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
807         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
808         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
809         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
810         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
811         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
812         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
813         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
814         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
815         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
816         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
817         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
818         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
819         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
820         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
821         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
822         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
823         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
824         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
825         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
826         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
827         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
828         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
829         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
830         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
831         new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
832
833
834         VFrame *transport_up = new_image("transportup.png");
835         VFrame *transport_hi = new_image("transporthi.png");
836         VFrame *transport_dn = new_image("transportdn.png");
837
838         new_button("end.png", transport_up, transport_hi, transport_dn, "end");
839         new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd");
840         new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev");
841         new_button("play.png", transport_up, transport_hi, transport_dn, "play");
842         new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd");
843         new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev");
844         new_button("pause.png", transport_up, transport_hi, transport_dn, "pause");
845         new_button("record.png", transport_up, transport_hi, transport_dn, "record");
846         new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe");
847         new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse");
848         new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind");
849         new_button("stop.png", transport_up, transport_hi, transport_dn, "stop");
850         new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec");
851
852
853
854 // CWindow icons
855         new_image("cwindow_inactive", "cwindow_inactive.png");
856         new_image("cwindow_active", "cwindow_active.png");
857
858
859
860         new_image_set("category_button",
861                 3,
862                 "preferencesbutton_dn.png",
863                 "preferencesbutton_dnhi.png",
864                 "preferencesbutton_dnlo.png");
865
866         new_image_set("category_button_checked",
867                 3,
868                 "preferencesbutton_up.png",
869                 "preferencesbutton_uphi.png",
870                 "preferencesbutton_dnlo.png");
871
872
873
874
875
876         new_image_set("color3way_point",
877                 3,
878                 "color3way_up.png",
879                 "color3way_hi.png",
880                 "color3way_dn.png");
881
882         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
883         new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
884         new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
885         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
886         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
887         new_toggle("blank30x30.png",
888                    new_image("locklabels_locked.png"),
889                    new_image("locklabels_lockedhi.png"),
890                    new_image("locklabels_unlocked.png"),
891                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
892                    new_image("locklabels_unlockedhi.png"),
893                    "locklabels");
894
895         VFrame *cpanel_up = new_image("cpanel_up.png");
896         VFrame *cpanel_hi = new_image("cpanel_hi.png");
897         VFrame *cpanel_dn = new_image("cpanel_dn.png");
898         VFrame *cpanel_checked = new_image("cpanel_checked.png");
899         VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
900
901
902         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
903         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
904         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
905         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
906         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
907         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
908         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
909         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
910         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
911         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
912
913         // toggle for tangent mode (compositor/tool window)
914         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
915         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
916
917         new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
918                 "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
919                 "mask_scale_x");
920         new_toggle("mask_scale_y.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
921                 "mask_scale_chkd.png",  "mask_scale_ydown.png",  "mask_scale_chkdhi.png",
922                 "mask_scale_y");
923         new_toggle("mask_scale_xy.png",  "mask_scale_up.png",   "mask_scale_uphi.png",
924                 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
925                 "mask_scale_xy");
926
927         flush_images();
928
929         title_font = MEDIUMFONT_3D;
930         title_color = 0xeeeeff;
931         recordgui_fixed_color = YELLOW;
932         recordgui_variable_color = RED;
933
934         channel_position_color = MEYELLOW;
935         resources->meter_title_w = xS(28);
936
937         // (asset) edit info text color
938         edit_font_color = YELLOW;
939 }
940
941 #define VWINDOW_METER_MARGIN xS(5)
942
943 void BlueDotTheme::build_bg_data()
944 {
945 // Audio settings
946         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
947
948 // Track bitmaps
949         new_image1("resource1024", "resource1024.png");
950         new_image1("resource512", "resource512.png");
951         new_image1("resource256", "resource256.png");
952         new_image1("resource128", "resource128.png");
953         new_image1("resource64", "resource64.png");
954         new_image1("resource32", "resource32.png");
955         new_image("plugin_bg_data", "plugin_bg.png");
956         new_image("title_bg_data", "title_bg.png");
957         new_image("vtimebar_bg_data", "vwindow_timebar.png");
958 }
959
960 void BlueDotTheme::build_overlays()
961 {
962         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
963         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
964         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
965         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
966         hardedge_data = new VFramePng(get_image_data("hardedge.png"));
967         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
968         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
969 }
970
971 void BlueDotTheme::draw_rwindow_bg(RecordGUI *gui)
972 {
973 //      int y;
974 //      int margin = xS(50);
975 //      int margin2 = xS(80);
976 //      gui->draw_9segment(recordgui_batch_x - margin,
977 //              0,
978 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
979 //              recordgui_buttons_y,
980 //              rgui_batch);
981 //      gui->draw_3segmenth(recordgui_options_x - margin2,
982 //              recordgui_buttons_y - yS(5),
983 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
984 //              rgui_controls);
985 //      y = recordgui_buttons_y - yS(5) + rgui_controls->get_h();
986 //      gui->draw_9segment(0,
987 //              y,
988 //              mwindow->session->rwindow_w,
989 //              mwindow->session->rwindow_h - y,
990 //              rgui_list);
991 }
992
993 void BlueDotTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
994 {
995 //      int margin = xS(45);
996 //      int panel_w = xS(300;
997 //      int x = rmonitor_meter_x - margin;
998 //      int w = mwindow->session->rmonitor_w - x;
999 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1000 //      gui->clear_box(0, 0,
1001 //              mwindow->session->rmonitor_w,
1002 //              mwindow->session->rmonitor_h);
1003 //      gui->draw_9segment(x, 0,
1004 //              w,
1005 //              mwindow->session->rmonitor_h,
1006 //              rmonitor_meters);
1007 }
1008
1009
1010
1011
1012
1013
1014 void BlueDotTheme::draw_mwindow_bg(MWindowGUI *gui)
1015 {
1016 // Button bar
1017         gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
1018                 gui->menu_w(), get_image("mbutton_bg"));
1019
1020         int pdw = get_image("panel_divider")->get_w();
1021         int x = mbuttons_x;
1022         x += 9 * get_image("play")->get_w();
1023         x += mtransport_margin;                                       // the control buttons
1024
1025         int xs2 = xS(2);
1026         gui->draw_vframe(get_image("panel_divider"),
1027                 x - toggle_margin / 2 - pdw / 2 + xs2,
1028                 mbuttons_y - 1);
1029         x += 2 * get_image("arrow")->get_w() + toggle_margin;           // the mode buttons
1030
1031         gui->draw_vframe(get_image("panel_divider"),
1032                 x - toggle_margin / 2 - pdw / 2 + xs2,
1033                 mbuttons_y - 1);
1034
1035         x += 3 * get_image("autokeyframe")->get_w() + toggle_margin;    // the state toggle buttons
1036         gui->draw_vframe(get_image("panel_divider"),
1037                 x - toggle_margin / 2 - pdw / 2 + xs2,
1038                 mbuttons_y - 1);
1039
1040 // Clock
1041         gui->draw_3segmenth(0, mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1042                 get_image("patchbay_bg")->get_w(), get_image("clock_bg"));
1043
1044 // Patchbay
1045         gui->draw_3segmentv(patchbay_x, patchbay_y,
1046                 patchbay_h, get_image("patchbay_bg"));
1047
1048 // Track canvas
1049         gui->set_color(BLACK);
1050         gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1051                 mcanvas_y + mtimebar_h,
1052                 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1053                 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1054
1055 // Timebar
1056         gui->draw_3segmenth(mtimebar_x, mtimebar_y,
1057                 mtimebar_w, get_image("timebar_bg"));
1058
1059 // Zoombar
1060         gui->set_color(0x1a1447);
1061         gui->draw_box(mzoom_x, mzoom_y,
1062                 mwindow->session->mwindow_w, yS(25));
1063
1064 // Scrollbar filler
1065 //      gui->draw_vframe(get_image("mscroll_filler"),
1066 //              mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1067 //              mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
1068
1069 // Status
1070         gui->draw_3segmenth(mzoom_x,
1071                 mzoom_y,
1072                 mzoom_w,
1073                 get_image("statusbar"));
1074
1075
1076 }
1077
1078 void BlueDotTheme::draw_cwindow_bg(CWindowGUI *gui)
1079 {
1080         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1081
1082         gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1083
1084         if(mwindow->edl->session->cwindow_meter)
1085         {
1086                 gui->draw_3segmenth(cstatus_x,
1087                         ccomposite_h,
1088                         cmeter_x - widget_border - cstatus_x,
1089                         get_image("cbuttons_right"));
1090                 gui->draw_9segment(cmeter_x - widget_border,
1091                         0,
1092                         mwindow->session->cwindow_w - cmeter_x + widget_border,
1093                         mwindow->session->cwindow_h,
1094                         get_image("cmeter_bg"));
1095         }
1096         else
1097         {
1098                 gui->draw_3segmenth(cstatus_x,
1099                         ccomposite_h,
1100                         cmeter_x - widget_border - cstatus_x + xS(100),
1101                         get_image("cbuttons_right"));
1102         }
1103 }
1104
1105 void BlueDotTheme::draw_vwindow_bg(VWindowGUI *gui)
1106 {
1107         gui->draw_3segmenth(0, vcanvas_h,
1108                 vdivision_x, get_image("vbuttons_left"));
1109         if(mwindow->edl->session->vwindow_meter)
1110         {
1111                 gui->draw_3segmenth(vdivision_x, vcanvas_h,
1112                         vmeter_x - widget_border - vdivision_x,
1113                         get_image("cbuttons_right"));
1114                 gui->draw_9segment(vmeter_x - widget_border, 0,
1115                         mwindow->session->vwindow_w - vmeter_x + widget_border,
1116                         mwindow->session->vwindow_h,
1117                         get_image("cmeter_bg"));
1118         }
1119         else
1120         {
1121                 gui->draw_3segmenth(vdivision_x, vcanvas_h,
1122                         vmeter_x - widget_border - vdivision_x + xS(100),
1123                         get_image("cbuttons_right"));
1124         }
1125
1126 // Clock border
1127         gui->draw_3segmenth(vtime_x - xS(20), vtime_y - 1,
1128                 vtime_w + xS(40), get_image("vclock"));
1129 }
1130
1131 void BlueDotTheme::draw_preferences_bg(PreferencesWindow *gui)
1132 {
1133         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1134 }
1135
1136 void BlueDotTheme::draw_new_bg(NewWindow *gui)
1137 {
1138         gui->draw_vframe(get_image("new_bg"), 0, 0);
1139 }
1140
1141 void BlueDotTheme::draw_setformat_bg(SetFormatWindow *gui)
1142 {
1143         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1144 }
1145