ea43e59d6a02801d85cba1608799df4522aca0f2
[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         resources->cancel_images = new_button("cancel.png",
286                 "filebox_bigbutton_up.png",
287                 "filebox_bigbutton_hi.png",
288                 "filebox_bigbutton_dn.png",
289                 "cancel_button");
290
291         new_button("cancel.png",
292                 "new_bigbutton_up.png",
293                 "new_bigbutton_hi.png",
294                 "new_bigbutton_dn.png",
295                 "new_cancel_images");
296
297         resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
298                 "0.png",
299                 "1.png",
300                 "2.png",
301                 "3.png",
302                 "4.png",
303                 "5.png",
304                 "6.png",
305                 "7.png",
306                 "8.png",
307                 "9.png",
308                 "colon.png",
309                 "period.png",
310                 "a.png",
311                 "b.png",
312                 "c.png",
313                 "d.png",
314                 "e.png",
315                 "f.png",
316                 "space.png",
317                 "dash.png");
318
319         resources->bar_data = new_image("bar", "bar.png");
320         resources->check = new_image("check", "check.png");
321
322         resources->min_menu_w = 96;
323         resources->menu_popup_bg = new_image("menu_popup_bg.png");
324         resources->menu_item_bg = new_image_set(3,
325                 "menuitem_up.png",
326                 "menuitem_hi.png",
327                 "menuitem_dn.png");
328         resources->menu_bar_bg = new_image("menubar_bg.png");
329         resources->menu_title_bg = new_image_set(3,
330                 "menubar_up.png",
331                 "menubar_hi.png",
332                 "menubar_dn.png");
333
334
335         resources->popupmenu_images = 0;
336 //              new_image_set(3,
337 //              "menupopup_up.png",
338 //              "menupopup_hi.png",
339 //              "menupopup_dn.png");
340
341         resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
342                 "text_highlight.png");
343
344         resources->generic_button_images = new_image_set(3,
345                         "generic_up.png",
346                         "generic_hi.png",
347                         "generic_dn.png");
348         resources->horizontal_slider_data = new_image_set(6,
349                         "hslider_fg_up.png",
350                         "hslider_fg_hi.png",
351                         "hslider_fg_dn.png",
352                         "hslider_bg_up.png",
353                         "hslider_bg_hi.png",
354                         "hslider_bg_dn.png");
355         resources->vertical_slider_data = new_image_set(6,
356                         "hslider_fg_up.png",
357                         "hslider_fg_hi.png",
358                         "hslider_fg_dn.png",
359                         "hslider_bg_up.png",
360                         "hslider_bg_hi.png",
361                         "hslider_bg_dn.png");
362         for( int i=0; i<6; ++i )
363                 resources->vertical_slider_data[i]->rotate90();
364
365         resources->progress_images = new_image_set(2,
366                         "progress_bg.png",
367                         "progress_hi.png");
368         resources->tumble_data = new_image_set(4,
369                 "tumble_up.png",
370                 "tumble_hi.png",
371                 "tumble_bottom.png",
372                 "tumble_top.png");
373         resources->listbox_button = new_button4("listbox_button.png",
374                 "editpanel_up.png",
375                 "editpanel_hi.png",
376                 "editpanel_dn.png",
377                 "editpanel_hi.png",
378                 "listbox_button");
379         resources->listbox_column = new_image_set(3,
380                 "column_up.png",
381                 "column_hi.png",
382                 "column_dn.png");
383         resources->listbox_up = new_image("listbox_up.png");
384         resources->listbox_dn = new_image("listbox_dn.png");
385         resources->pan_data = new_image_set(7,
386                         "pan_up.png",
387                         "pan_hi.png",
388                         "pan_popup.png",
389                         "pan_channel.png",
390                         "pan_stick.png",
391                         "pan_channel_small.png",
392                         "pan_stick_small.png");
393         resources->pan_text_color = WHITE;
394
395         resources->pot_images = new_image_set(3,
396                 "pot_up.png",
397                 "pot_hi.png",
398                 "pot_dn.png");
399
400         resources->checkbox_images = new_image_set(5,
401                 "checkbox_up.png",
402                 "checkbox_hi.png",
403                 "checkbox_checked.png",
404                 "checkbox_dn.png",
405                 "checkbox_checkedhi.png");
406
407         resources->radial_images = new_image_set(5,
408                 "radial_up.png",
409                 "radial_hi.png",
410                 "radial_checked.png",
411                 "radial_dn.png",
412                 "radial_checkedhi.png");
413
414         resources->xmeter_images = new_image_set(7,
415                 "xmeter_normal.png",
416                 "xmeter_green.png",
417                 "xmeter_red.png",
418                 "xmeter_yellow.png",
419                 "xmeter_white.png",
420                 "xmeter_over.png",
421                 "downmix51_2.png");
422         resources->ymeter_images = new_image_set(7,
423                 "ymeter_normal.png",
424                 "ymeter_green.png",
425                 "ymeter_red.png",
426                 "ymeter_yellow.png",
427                 "ymeter_white.png",
428                 "ymeter_over.png",
429                 "downmix51_2.png");
430
431         resources->hscroll_data = new_image_set(10,
432                         "hscroll_handle_up.png",
433                         "hscroll_handle_hi.png",
434                         "hscroll_handle_dn.png",
435                         "hscroll_handle_bg.png",
436                         "hscroll_left_up.png",
437                         "hscroll_left_hi.png",
438                         "hscroll_left_dn.png",
439                         "hscroll_right_up.png",
440                         "hscroll_right_hi.png",
441                         "hscroll_right_dn.png");
442
443         resources->vscroll_data = new_image_set(10,
444                         "vscroll_handle_up.png",
445                         "vscroll_handle_hi.png",
446                         "vscroll_handle_dn.png",
447                         "vscroll_handle_bg.png",
448                         "vscroll_left_up.png",
449                         "vscroll_left_hi.png",
450                         "vscroll_left_dn.png",
451                         "vscroll_right_up.png",
452                         "vscroll_right_hi.png",
453                         "vscroll_right_dn.png");
454         resources->scroll_minhandle = 20;
455
456
457         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
458         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
459         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
460         new_button("swap_extents.png",
461                 "editpanel_up.png",
462                 "editpanel_hi.png",
463                 "editpanel_dn.png",
464                 "swap_extents");
465
466
467 // Record windows
468
469
470         preferences_category_overlap = 0;
471         preferencescategory_x = 0;
472         preferencescategory_y = 5;
473         preferencestitle_x = 5;
474         preferencestitle_y = 10;
475         preferencesoptions_x = 5;
476         preferencesoptions_y = 0;
477
478 // MWindow
479         message_normal = resources->text_default;
480         audio_color = GREEN;
481         mtransport_margin = 10;
482         toggle_margin = 10;
483
484         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
485         new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
486         new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
487
488         new_image("mbutton_bg", "mbutton_bg.png");
489         new_image("timebar_bg", "timebar_bg_flat.png");
490         new_image("timebar_brender", "timebar_brender.png");
491         new_image("clock_bg", "mclock_flat.png");
492         new_image("patchbay_bg", "patchbay_bg.png");
493         new_image("statusbar", "statusbar.png");
494 //      new_image("mscroll_filler", "mscroll_filler.png");
495
496         new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
497         new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
498
499         new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
500         new_image("mode_add", "mode_add.png");
501         new_image("mode_divide", "mode_divide.png");
502         new_image("mode_multiply", "mode_multiply.png");
503         new_image("mode_normal", "mode_normal.png");
504         new_image("mode_replace", "mode_replace.png");
505         new_image("mode_subtract", "mode_subtract.png");
506         new_image("mode_max", "mode_max.png");
507
508         new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
509         new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
510
511 // CWindow
512         new_image("cpanel_bg", "cpanel_bg.png");
513         new_image("cbuttons_left", "cbuttons_left.png");
514         new_image("cbuttons_right", "cbuttons_right.png");
515         new_image("cmeter_bg", "cmeter_bg.png");
516
517 // VWindow
518         new_image("vbuttons_left", "vbuttons_left.png");
519         new_image("vclock", "vclock.png");
520
521         new_image("preferences_bg", "preferences_bg.png");
522
523
524         new_image("new_bg", "new_bg.png");
525         new_image("setformat_bg", "setformat_bg.png");
526
527
528         timebar_view_data = new_image("timebar_view.png");
529
530         setformat_w = get_image("setformat_bg")->get_w();
531         setformat_h = get_image("setformat_bg")->get_h();
532         setformat_x1 = 15;
533         setformat_x2 = 110;
534
535         setformat_x3 = 315;
536         setformat_x4 = 425;
537         setformat_y1 = 20;
538         setformat_y2 = 85;
539         setformat_y3 = 125;
540         setformat_margin = 30;
541         setformat_channels_x = 25;
542         setformat_channels_y = 242;
543         setformat_channels_w = 250;
544         setformat_channels_h = 250;
545
546         loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10;
547         browse_pad = 20;
548
549
550         new_toggle("playpatch.png",
551                 "playpatch_up.png",
552                 "playpatch_hi.png",
553                 "playpatch_checked.png",
554                 "playpatch_dn.png",
555                 "playpatch_checkedhi.png",
556                 "playpatch_data");
557
558         new_toggle("recordpatch.png",
559                 "recordpatch_up.png",
560                 "recordpatch_hi.png",
561                 "recordpatch_checked.png",
562                 "recordpatch_dn.png",
563                 "recordpatch_checkedhi.png",
564                 "recordpatch_data");
565
566         new_toggle("gangpatch.png",
567                 "patch_up.png",
568                 "patch_hi.png",
569                 "patch_checked.png",
570                 "patch_dn.png",
571                 "patch_checkedhi.png",
572                 "gangpatch_data");
573
574         new_toggle("drawpatch.png",
575                 "patch_up.png",
576                 "patch_hi.png",
577                 "patch_checked.png",
578                 "patch_dn.png",
579                 "patch_checkedhi.png",
580                 "drawpatch_data");
581
582
583         new_image_set("mutepatch_data",
584                 5,
585                 "mutepatch_up.png",
586                 "mutepatch_hi.png",
587                 "mutepatch_checked.png",
588                 "mutepatch_dn.png",
589                 "mutepatch_checkedhi.png");
590
591         new_image_set("expandpatch_data",
592                 5,
593                 "expandpatch_up.png",
594                 "expandpatch_hi.png",
595                 "expandpatch_checked.png",
596                 "expandpatch_dn.png",
597                 "expandpatch_checkedhi.png");
598
599         build_bg_data();
600         build_overlays();
601
602
603
604
605         out_point = new_image_set(5,
606                 "out_up.png",
607                 "out_hi.png",
608                 "out_checked.png",
609                 "out_dn.png",
610                 "out_checkedhi.png");
611         in_point = new_image_set(5,
612                 "in_up.png",
613                 "in_hi.png",
614                 "in_checked.png",
615                 "in_dn.png",
616                 "in_checkedhi.png");
617
618         label_toggle = new_image_set(5,
619                 "labeltoggle_up.png",
620                 "labeltoggle_uphi.png",
621                 "label_checked.png",
622                 "labeltoggle_dn.png",
623                 "label_checkedhi.png");
624
625         ffmpeg_toggle = new_image_set(5,
626                 "ff_up.png",
627                 "ff_hi.png",
628                 "ff_checked.png",
629                 "ff_down.png",
630                 "ff_checkedhi.png");
631
632         proxy_p_toggle = new_image_set(5,
633                 "proxy_p_up.png",
634                 "proxy_p_hi.png",
635                 "proxy_p_chkd.png",
636                 "proxy_p_down.png",
637                 "proxy_p_chkdhi.png");
638
639         proxy_s_toggle = new_image_set(5,
640                 "proxy_s_up.png",
641                 "proxy_s_hi.png",
642                 "proxy_s_chkd.png",
643                 "proxy_s_down.png",
644                 "proxy_s_chkdhi.png");
645
646         mask_mode_toggle = new_image_set(5,
647                 "mask_mode_up.png",
648                 "mask_mode_hi.png",
649                 "mask_mode_chkd.png",
650                 "mask_mode_down.png",
651                 "mask_mode_chkdhi.png");
652
653         shbtn_data = new_image_set(3,
654                 "shbtn_up.png",
655                 "shbtn_hi.png",
656                 "shbtn_dn.png");
657
658         new_image_set("preset_edit",
659                 3,
660                 "preset_edit0.png",
661                 "preset_edit1.png",
662                 "preset_edit2.png");
663
664         new_image_set("histogram_carrot",
665                 5,
666                 "histogram_carrot_up.png",
667                 "histogram_carrot_hi.png",
668                 "histogram_carrot_checked.png",
669                 "histogram_carrot_dn.png",
670                 "histogram_carrot_checkedhi.png");
671
672
673         statusbar_cancel_data = new_image_set(3,
674                 "statusbar_cancel_up.png",
675                 "statusbar_cancel_hi.png",
676                 "statusbar_cancel_dn.png");
677
678
679         VFrame *editpanel_up = new_image("editpanel_up.png");
680         VFrame *editpanel_hi = new_image("editpanel_hi.png");
681         VFrame *editpanel_dn = new_image("editpanel_dn.png");
682         VFrame *editpanel_checked = new_image("editpanel_checked.png");
683         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
684
685         new_image("panel_divider", "panel_divider.png");
686         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
687         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
688         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
689         new_button("lok.png", editpanel_up, editpanel_hi, editpanel_dn, "lok");
690
691         new_toggle("histogram_toggle.png",
692                 editpanel_up,
693                 editpanel_hi,
694                 editpanel_checked,
695                 editpanel_dn,
696                 editpanel_checkedhi,
697                 "histogram_toggle");
698         new_toggle("histogram_rgb.png",
699                 editpanel_up,
700                 editpanel_hi,
701                 editpanel_checked,
702                 editpanel_dn,
703                 editpanel_checkedhi,
704                 "histogram_rgb_toggle");
705         new_toggle("waveform.png",
706                 editpanel_up,
707                 editpanel_hi,
708                 editpanel_checked,
709                 editpanel_dn,
710                 editpanel_checkedhi,
711                 "waveform_toggle");
712         new_toggle("waveform_rgb.png",
713                 editpanel_up,
714                 editpanel_hi,
715                 editpanel_checked,
716                 editpanel_dn,
717                 editpanel_checkedhi,
718                 "waveform_rgb_toggle");
719         new_toggle("scope.png",
720                 editpanel_up,
721                 editpanel_hi,
722                 editpanel_checked,
723                 editpanel_dn,
724                 editpanel_checkedhi,
725                 "scope_toggle");
726
727         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
728         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
729
730         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
731         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
732         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
733         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
734         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
735         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
736         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
737         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
738         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
739         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
740         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
741         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
742         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
743         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
744         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
745         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
746         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
747         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
748         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
749         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
750         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
751         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
752         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
753         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
754         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
755         new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
756
757
758         VFrame *transport_up = new_image("transportup.png");
759         VFrame *transport_hi = new_image("transporthi.png");
760         VFrame *transport_dn = new_image("transportdn.png");
761
762         new_button("end.png", transport_up, transport_hi, transport_dn, "end");
763         new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd");
764         new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev");
765         new_button("play.png", transport_up, transport_hi, transport_dn, "play");
766         new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd");
767         new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev");
768         new_button("pause.png", transport_up, transport_hi, transport_dn, "pause");
769         new_button("record.png", transport_up, transport_hi, transport_dn, "record");
770         new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe");
771         new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse");
772         new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind");
773         new_button("stop.png", transport_up, transport_hi, transport_dn, "stop");
774         new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec");
775
776
777
778 // CWindow icons
779         new_image("cwindow_inactive", "cwindow_inactive.png");
780         new_image("cwindow_active", "cwindow_active.png");
781
782
783
784         new_image_set("category_button",
785                 3,
786                 "preferencesbutton_dn.png",
787                 "preferencesbutton_dnhi.png",
788                 "preferencesbutton_dnlo.png");
789
790         new_image_set("category_button_checked",
791                 3,
792                 "preferencesbutton_up.png",
793                 "preferencesbutton_uphi.png",
794                 "preferencesbutton_dnlo.png");
795
796
797
798
799
800         new_image_set("color3way_point",
801                 3,
802                 "color3way_up.png",
803                 "color3way_hi.png",
804                 "color3way_dn.png");
805
806         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
807         new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
808         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
809         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
810         new_toggle("blank30x30.png",
811                    new_image("locklabels_locked.png"),
812                    new_image("locklabels_lockedhi.png"),
813                    new_image("locklabels_unlocked.png"),
814                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
815                    new_image("locklabels_unlockedhi.png"),
816                    "locklabels");
817
818         VFrame *cpanel_up = new_image("cpanel_up.png");
819         VFrame *cpanel_hi = new_image("cpanel_hi.png");
820         VFrame *cpanel_dn = new_image("cpanel_dn.png");
821         VFrame *cpanel_checked = new_image("cpanel_checked.png");
822         VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
823
824
825         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
826         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
827         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
828         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
829         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
830         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
831         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
832         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
833         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
834         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
835
836         // toggle for tangent mode (compositor/tool window)
837         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
838         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
839
840
841         flush_images();
842
843         title_font = MEDIUMFONT_3D;
844         title_color = 0xeeeeff;
845         recordgui_fixed_color = YELLOW;
846         recordgui_variable_color = RED;
847
848         channel_position_color = MEYELLOW;
849         resources->meter_title_w = 25;
850
851         // (asset) edit info text color
852         edit_font_color = YELLOW;
853 }
854
855 #define VWINDOW_METER_MARGIN 5
856
857 void BlueDotTheme::build_bg_data()
858 {
859 // Audio settings
860         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
861
862 // Track bitmaps
863         new_image("resource1024", "resource1024.png");
864         new_image("resource512", "resource512.png");
865         new_image("resource256", "resource256.png");
866         new_image("resource128", "resource128.png");
867         new_image("resource64", "resource64.png");
868         new_image("resource32", "resource32.png");
869         new_image("plugin_bg_data", "plugin_bg.png");
870         new_image("title_bg_data", "title_bg.png");
871         new_image("vtimebar_bg_data", "vwindow_timebar.png");
872 }
873
874 void BlueDotTheme::build_overlays()
875 {
876         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
877         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
878         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
879         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
880         hardedge_data = new VFramePng(get_image_data("hardedge.png"));
881         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
882         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
883 }
884
885 void BlueDotTheme::draw_rwindow_bg(RecordGUI *gui)
886 {
887 //      int y;
888 //      int margin = 50;
889 //      int margin2 = 80;
890 //      gui->draw_9segment(recordgui_batch_x - margin,
891 //              0,
892 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
893 //              recordgui_buttons_y,
894 //              rgui_batch);
895 //      gui->draw_3segmenth(recordgui_options_x - margin2,
896 //              recordgui_buttons_y - 5,
897 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
898 //              rgui_controls);
899 //      y = recordgui_buttons_y - 5 + rgui_controls->get_h();
900 //      gui->draw_9segment(0,
901 //              y,
902 //              mwindow->session->rwindow_w,
903 //              mwindow->session->rwindow_h - y,
904 //              rgui_list);
905 }
906
907 void BlueDotTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
908 {
909 //      int margin = 45;
910 //      int panel_w = 300;
911 //      int x = rmonitor_meter_x - margin;
912 //      int w = mwindow->session->rmonitor_w - x;
913 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
914 //      gui->clear_box(0,
915 //              0,
916 //              mwindow->session->rmonitor_w,
917 //              mwindow->session->rmonitor_h);
918 //      gui->draw_9segment(x,
919 //              0,
920 //              w,
921 //              mwindow->session->rmonitor_h,
922 //              rmonitor_meters);
923 }
924
925
926
927
928
929
930 void BlueDotTheme::draw_mwindow_bg(MWindowGUI *gui)
931 {
932 // Button bar
933         gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
934                 gui->menu_w(), get_image("mbutton_bg"));
935
936         int pdw = get_image("panel_divider")->get_w();
937         int x = mbuttons_x;
938         x += 9 * get_image("play")->get_w();
939         x += mtransport_margin;                                       // the control buttons
940
941         gui->draw_vframe(get_image("panel_divider"),
942                 x - toggle_margin / 2 - pdw / 2 + 2,
943                 mbuttons_y - 1);
944         x += 2 * get_image("arrow")->get_w() + toggle_margin;           // the mode buttons
945
946         gui->draw_vframe(get_image("panel_divider"),
947                 x - toggle_margin / 2 - pdw / 2 + 2,
948                 mbuttons_y - 1);
949
950         x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;    // the state toggle buttons
951         gui->draw_vframe(get_image("panel_divider"),
952                 x - toggle_margin / 2 - pdw / 2 + 2,
953                 mbuttons_y - 1);
954
955 // Clock
956         gui->draw_3segmenth(0,
957                 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
958                 get_image("patchbay_bg")->get_w(),
959                 get_image("clock_bg"));
960
961 // Patchbay
962         gui->draw_3segmentv(patchbay_x,
963                 patchbay_y,
964                 patchbay_h,
965                 get_image("patchbay_bg"));
966
967 // Track canvas
968         gui->set_color(BLACK);
969         gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
970                 mcanvas_y + mtimebar_h,
971                 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
972                 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
973
974 // Timebar
975         gui->draw_3segmenth(mtimebar_x,
976                 mtimebar_y,
977                 mtimebar_w,
978                 get_image("timebar_bg"));
979
980 // Zoombar
981         gui->set_color(0x1a1447);
982         gui->draw_box(mzoom_x,
983                 mzoom_y,
984                 mwindow->session->mwindow_w,
985                 25);
986
987 // Scrollbar filler
988 //      gui->draw_vframe(get_image("mscroll_filler"),
989 //              mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
990 //              mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
991
992 // Status
993         gui->draw_3segmenth(mzoom_x,
994                 mzoom_y,
995                 mzoom_w,
996                 get_image("statusbar"));
997
998
999 }
1000
1001 void BlueDotTheme::draw_cwindow_bg(CWindowGUI *gui)
1002 {
1003         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1004
1005         gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1006
1007         if(mwindow->edl->session->cwindow_meter)
1008         {
1009                 gui->draw_3segmenth(cstatus_x,
1010                         ccomposite_h,
1011                         cmeter_x - widget_border - cstatus_x,
1012                         get_image("cbuttons_right"));
1013                 gui->draw_9segment(cmeter_x - widget_border,
1014                         0,
1015                         mwindow->session->cwindow_w - cmeter_x + widget_border,
1016                         mwindow->session->cwindow_h,
1017                         get_image("cmeter_bg"));
1018         }
1019         else
1020         {
1021                 gui->draw_3segmenth(cstatus_x,
1022                         ccomposite_h,
1023                         cmeter_x - widget_border - cstatus_x + 100,
1024                         get_image("cbuttons_right"));
1025         }
1026 }
1027
1028 void BlueDotTheme::draw_vwindow_bg(VWindowGUI *gui)
1029 {
1030         gui->draw_3segmenth(0,
1031                 vcanvas_h,
1032                 vdivision_x,
1033                 get_image("vbuttons_left"));
1034         if(mwindow->edl->session->vwindow_meter)
1035         {
1036                 gui->draw_3segmenth(vdivision_x,
1037                         vcanvas_h,
1038                         vmeter_x - widget_border - vdivision_x,
1039                         get_image("cbuttons_right"));
1040                 gui->draw_9segment(vmeter_x - widget_border,
1041                         0,
1042                         mwindow->session->vwindow_w - vmeter_x + widget_border,
1043                         mwindow->session->vwindow_h,
1044                         get_image("cmeter_bg"));
1045         }
1046         else
1047         {
1048                 gui->draw_3segmenth(vdivision_x,
1049                         vcanvas_h,
1050                         vmeter_x - widget_border - vdivision_x + 100,
1051                         get_image("cbuttons_right"));
1052         }
1053
1054 // Clock border
1055         gui->draw_3segmenth(vtime_x - 20,
1056                 vtime_y - 1,
1057                 vtime_w + 40,
1058                 get_image("vclock"));
1059 }
1060
1061 void BlueDotTheme::draw_preferences_bg(PreferencesWindow *gui)
1062 {
1063         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1064 }
1065
1066 void BlueDotTheme::draw_new_bg(NewWindow *gui)
1067 {
1068         gui->draw_vframe(get_image("new_bg"), 0, 0);
1069 }
1070
1071 void BlueDotTheme::draw_setformat_bg(SetFormatWindow *gui)
1072 {
1073         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1074 }
1075