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