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