add lv2 plugin interface
[goodguy/history.git] / cinelerra-5.1 / plugins / theme_bright / brighttheme.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "bcsignals.h"
23 #include "brighttheme.h"
24 #include "clip.h"
25 #include "cwindowgui.h"
26 #include "edl.h"
27 #include "edlsession.h"
28 #include "mainmenu.h"
29 #include "mainsession.h"
30 #include "mbuttons.h"
31 #include "meterpanel.h"
32 #include "mwindow.h"
33 #include "mwindowgui.h"
34 #include "new.h"
35 #include "patchbay.h"
36 #include "preferencesthread.h"
37 #include "recordgui.h"
38 #include "recordmonitor.h"
39 #include "setformat.h"
40 #include "statusbar.h"
41 #include "timebar.h"
42 #include "trackcanvas.h"
43 #include "vframe.h"
44 #include "vwindowgui.h"
45
46
47
48
49 PluginClient* new_plugin(PluginServer *server)
50 {
51         return new BrightThemeMain(server);
52 }
53
54
55
56
57
58
59
60 BrightThemeMain::BrightThemeMain(PluginServer *server)
61  : PluginTClient(server)
62 {
63 }
64
65 BrightThemeMain::~BrightThemeMain()
66 {
67 }
68
69 const char* BrightThemeMain::plugin_title() { return N_("Bright"); }
70
71 Theme* BrightThemeMain::new_theme()
72 {
73         theme = new BrightTheme;
74         extern unsigned char _binary_theme_bright_data_start[];
75         theme->set_data(_binary_theme_bright_data_start);
76         return theme;
77 }
78
79
80
81
82
83
84
85
86 BrightTheme::BrightTheme()
87  : Theme()
88 {
89 }
90
91 BrightTheme::~BrightTheme()
92 {
93         delete camerakeyframe_data;
94         delete channel_position_data;
95         delete keyframe_data;
96         delete maskkeyframe_data;
97         delete modekeyframe_data;
98         delete pankeyframe_data;
99         delete projectorkeyframe_data;
100 }
101
102 void BrightTheme::initialize()
103 {
104         BC_Resources *resources = BC_WindowBase::get_resources();
105
106
107         resources->text_default = 0x000000;
108         resources->text_background = 0xffffff;
109         resources->text_background_disarmed = 0xaaaaaa;
110         resources->text_background_hi = 0xffffff;
111         resources->text_border1 = 0x000000;
112         resources->text_border2 = 0xffffff;
113         resources->text_border3 = 0xffffff;
114         resources->text_border2_hi = 0x000000;
115         resources->text_border3_hi = 0x000000;
116         resources->text_border4 = 0x000000;
117         resources->text_inactive_highlight = 0xd0d0d0;
118         resources->text_highlight = 0xe0e0e0;
119         resources->text_selected_highlight = 0xf0e0e0;
120
121         resources->bg_color = 0xffffff;
122         resources->default_text_color = 0x000000;
123         resources->menu_title_text = 0x000000;
124         resources->popup_title_text = 0x000000;
125         resources->menu_item_text = 0x000000;
126         resources->generic_button_margin = 20;
127         resources->pot_needle_color = resources->text_default;
128         resources->pot_offset = 1;
129         resources->progress_text = resources->text_default;
130         resources->meter_font_color = resources->default_text_color;
131         resources->tooltip_bg_color = WHITE;
132         clock_bg_color = WHITE;
133
134         resources->menu_light = 0x000000;
135         resources->menu_highlighted = 0xe0e0e0;
136         resources->menu_down = 0xc0c0c0;
137         resources->menu_up = 0xffffff;
138         resources->menu_shadow = 0x000000;
139         resources->popupmenu_margin = 10;
140         resources->popupmenu_triangle_margin = 15;
141
142         resources->listbox_title_color = 0x000000;
143
144         resources->listbox_title_overlap = 20;
145         resources->listbox_title_margin = 20;
146         resources->listbox_title_hotspot = 20;
147         resources->listbox_border1 = 0x000000;
148         resources->listbox_border2 = 0xffffff;
149         resources->listbox_border3 = 0xffffff;
150         resources->listbox_border2_hi = 0x000000;
151         resources->listbox_border3_hi = 0x000000;
152         resources->listbox_border4 = 0x000000;
153         resources->listbox_highlighted = 0xfefefe;
154         resources->listbox_inactive = 0xffffff;
155         resources->listbox_selected = 0xe0e0e0;
156         resources->listbox_bg = 0;
157         resources->listbox_text = 0x000000;
158
159         resources->filebox_margin = 130;
160         resources->file_color = 0x000000;
161         resources->directory_color = 0x0000ff;
162
163         resources->scroll_minhandle = 24;
164
165         new_toggle("loadmode_new.png",
166                 "loadmode_up.png",
167                 "loadmode_hi.png",
168                 "loadmode_checked.png",
169                 "loadmode_dn.png",
170                 "loadmode_checkedhi.png",
171                 "loadmode_new");
172         new_toggle("loadmode_none.png",
173                 "loadmode_up.png",
174                 "loadmode_hi.png",
175                 "loadmode_checked.png",
176                 "loadmode_dn.png",
177                 "loadmode_checkedhi.png",
178                 "loadmode_none");
179         new_toggle("loadmode_newcat.png",
180                 "loadmode_up.png",
181                 "loadmode_hi.png",
182                 "loadmode_checked.png",
183                 "loadmode_dn.png",
184                 "loadmode_checkedhi.png",
185                 "loadmode_newcat");
186         new_toggle("loadmode_cat.png",
187                 "loadmode_up.png",
188                 "loadmode_hi.png",
189                 "loadmode_checked.png",
190                 "loadmode_dn.png",
191                 "loadmode_checkedhi.png",
192                 "loadmode_cat");
193         new_toggle("loadmode_newtracks.png",
194                 "loadmode_up.png",
195                 "loadmode_hi.png",
196                 "loadmode_checked.png",
197                 "loadmode_dn.png",
198                 "loadmode_checkedhi.png",
199                 "loadmode_newtracks");
200         new_toggle("loadmode_paste.png",
201                 "loadmode_up.png",
202                 "loadmode_hi.png",
203                 "loadmode_checked.png",
204                 "loadmode_dn.png",
205                 "loadmode_checkedhi.png",
206                 "loadmode_paste");
207         new_toggle("loadmode_resource.png",
208                 "loadmode_up.png",
209                 "loadmode_hi.png",
210                 "loadmode_checked.png",
211                 "loadmode_dn.png",
212                 "loadmode_checkedhi.png",
213                 "loadmode_resource");
214         new_toggle("loadmode_nested.png",
215                 "loadmode_up.png",
216                 "loadmode_hi.png",
217                 "loadmode_checked.png",
218                 "loadmode_dn.png",
219                 "loadmode_checkedhi.png",
220                 "loadmode_nested");
221
222
223         resources->filebox_icons_images = new_button("icons.png",
224                 "fileboxbutton_up.png",
225                 "fileboxbutton_hi.png",
226                 "fileboxbutton_dn.png",
227                 "filebox_icons");
228
229         resources->filebox_text_images = new_button("text.png",
230                 "fileboxbutton_up.png",
231                 "fileboxbutton_hi.png",
232                 "fileboxbutton_dn.png",
233                 "filebox_text");
234
235         resources->filebox_newfolder_images = new_button("folder.png",
236                 "fileboxbutton_up.png",
237                 "fileboxbutton_hi.png",
238                 "fileboxbutton_dn.png",
239                 "filebox_newfolder");
240
241         resources->filebox_rename_images = new_button("rename.png",
242                 "fileboxbutton_up.png",
243                 "fileboxbutton_hi.png",
244                 "fileboxbutton_dn.png",
245                 "filebox_rename");
246
247         resources->filebox_updir_images = new_button("updir.png",
248                 "fileboxbutton_up.png",
249                 "fileboxbutton_hi.png",
250                 "fileboxbutton_dn.png",
251                 "filebox_updir");
252
253         resources->filebox_delete_images = new_button("delete.png",
254                 "fileboxbutton_up.png",
255                 "fileboxbutton_hi.png",
256                 "fileboxbutton_dn.png",
257                 "filebox_delete");
258
259         resources->filebox_reload_images = new_button("reload.png",
260                 "fileboxbutton_up.png",
261                 "fileboxbutton_hi.png",
262                 "fileboxbutton_dn.png",
263                 "filebox_reload");
264
265
266         resources->filebox_descend_images = new_button("openfolder.png",
267                 "bigbutton_up.png",
268                 "bigbutton_hi.png",
269                 "bigbutton_dn.png",
270                 "filebox_descend");
271
272         resources->usethis_button_images =
273                 resources->ok_images = new_button("ok.png",
274                 "bigbutton_up.png",
275                 "bigbutton_hi.png",
276                 "bigbutton_dn.png",
277                 "ok_button");
278
279         new_button("ok.png",
280                 "bigbutton_up.png",
281                 "bigbutton_hi.png",
282                 "bigbutton_dn.png",
283                 "new_ok_images");
284
285         resources->cancel_images = new_button("cancel.png",
286                 "bigbutton_up.png",
287                 "bigbutton_hi.png",
288                 "bigbutton_dn.png",
289                 "cancel_button");
290
291         new_button("cancel.png",
292                 "bigbutton_up.png",
293                 "bigbutton_hi.png",
294                 "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
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
336         resources->toggle_text_margin = resources->generic_button_margin;
337         resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
338                 "generic_up.png");
339
340         resources->generic_button_images = new_image_set(3,
341                         "generic_up.png",
342                         "generic_hi.png",
343                         "generic_dn.png");
344         resources->horizontal_slider_data = new_image_set(6,
345                         "hslider_fg_up.png",
346                         "hslider_fg_hi.png",
347                         "hslider_fg_dn.png",
348                         "hslider_bg_up.png",
349                         "hslider_bg_hi.png",
350                         "hslider_bg_dn.png");
351         resources->vertical_slider_data = new_image_set(6,
352                         "hslider_fg_up.png",
353                         "hslider_fg_hi.png",
354                         "hslider_fg_dn.png",
355                         "hslider_bg_up.png",
356                         "hslider_bg_hi.png",
357                         "hslider_bg_dn.png");
358         for( int i=0; i<6; ++i )
359                 resources->vertical_slider_data[i]->rotate90();
360
361         resources->progress_images = new_image_set(2,
362                         "progress_bg.png",
363                         "progress_hi.png");
364         resources->tumble_data = new_image_set(4,
365                 "tumble_up.png",
366                 "tumble_hi.png",
367                 "tumble_bottom.png",
368                 "tumble_top.png");
369         resources->listbox_button = new_button4("listbox_button.png",
370                 "editpanel_up.png",
371                 "editpanel_hi.png",
372                 "editpanel_dn.png",
373                 "editpanel_hi.png",
374                 "listbox_button");
375         resources->listbox_column = new_image_set(3,
376                 "column_up.png",
377                 "column_hi.png",
378                 "column_dn.png");
379         resources->listbox_up = new_image("listbox_up.png");
380         resources->listbox_dn = new_image("listbox_dn.png");
381         resources->pan_data = new_image_set(7,
382                         "pan_up.png",
383                         "pan_hi.png",
384                         "pan_popup.png",
385                         "pan_channel.png",
386                         "pan_stick.png",
387                         "pan_channel_small.png",
388                         "pan_stick_small.png");
389         resources->pan_text_color = BLACK;
390
391         resources->pot_images = new_image_set(3,
392                 "bright_pot_up.png",
393                 "bright_pot_hi.png",
394                 "bright_pot_dn.png");
395
396         resources->checkbox_images = new_image_set(5,
397                 "bright_checkbox_up.png",
398                 "bright_checkbox_hi.png",
399                 "bright_checkbox_checked.png",
400                 "bright_checkbox_dn.png",
401                 "bright_checkbox_checkedhi.png");
402
403         resources->radial_images = new_image_set(5,
404                 "radial_up.png",
405                 "radial_hi.png",
406                 "radial_checked.png",
407                 "radial_dn.png",
408                 "radial_checkedhi.png");
409
410         resources->xmeter_images = new_image_set(7,
411                 "xmeter_normal.png",
412                 "xmeter_green.png",
413                 "xmeter_red.png",
414                 "xmeter_yellow.png",
415                 "xmeter_white.png",
416                 "xmeter_over.png",
417                 "downmix51_2.png");
418         resources->ymeter_images = new_image_set(7,
419                 "ymeter_normal.png",
420                 "ymeter_green.png",
421                 "ymeter_red.png",
422                 "ymeter_yellow.png",
423                 "ymeter_white.png",
424                 "ymeter_over.png",
425                 "downmix51_2.png");
426
427         resources->hscroll_data = new_image_set(10,
428                         "bright_hscroll_handle_up.png",
429                         "bright_hscroll_handle_hi.png",
430                         "bright_hscroll_handle_dn.png",
431                         "bright_hscroll_handle_bg.png",
432                         "bright_hscroll_left_up.png",
433                         "bright_hscroll_left_hi.png",
434                         "bright_hscroll_left_dn.png",
435                         "bright_hscroll_right_up.png",
436                         "bright_hscroll_right_hi.png",
437                         "bright_hscroll_right_dn.png");
438
439         resources->vscroll_data = new_image_set(10,
440                         "bright_vscroll_handle_up.png",
441                         "bright_vscroll_handle_hi.png",
442                         "bright_vscroll_handle_dn.png",
443                         "bright_vscroll_handle_bg.png",
444                         "bright_vscroll_left_up.png",
445                         "bright_vscroll_left_hi.png",
446                         "bright_vscroll_left_dn.png",
447                         "bright_vscroll_right_up.png",
448                         "bright_vscroll_right_hi.png",
449                         "bright_vscroll_right_dn.png");
450
451
452         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
453         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
454         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
455         new_button("swap_extents.png",
456                 "editpanel_up.png",
457                 "editpanel_hi.png",
458                 "editpanel_dn.png",
459                 "swap_extents");
460
461
462
463
464         preferences_category_overlap = 0;
465         preferencescategory_x = 0;
466         preferencescategory_y = 5;
467         preferencestitle_x = 5;
468         preferencestitle_y = 10;
469         preferencesoptions_x = 5;
470         preferencesoptions_y = 0;
471
472 // MWindow
473         message_normal = resources->text_default;
474         audio_color = 0x00ff00;
475         assetedit_color = BLACK;
476         mtransport_margin = 20;
477         toggle_margin = 20;
478         timebar_cursor_color = BLACK;
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         pane_color = BLACK;
488         drag_pane_color = BLACK;
489
490         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
491         new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
492         new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
493
494         new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
495         new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
496
497         new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
498         new_image("mode_add", "mode_add.png");
499         new_image("mode_divide", "mode_divide.png");
500         new_image("mode_multiply", "mode_multiply.png");
501         new_image("mode_normal", "mode_normal.png");
502         new_image("mode_replace", "mode_replace.png");
503         new_image("mode_subtract", "mode_subtract.png");
504         new_image("mode_max", "mode_max.png");
505         new_image("mode_min", "mode_min.png");
506
507         new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
508         new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
509
510 // CWindow
511         new_image("cpanel_bg", "cpanel_bg.png");
512         new_image("cbuttons_left", "cbuttons_left.png");
513         new_image("cbuttons_right", "cbuttons_right.png");
514         new_image("cmeter_bg", "cmeter_bg.png");
515
516 // VWindow
517         new_image("vbuttons_left", "vbuttons_left.png");
518         new_image("vclock", "vclock.png");
519
520         new_image("preferences_bg", "preferences_bg.png");
521
522
523         new_image("new_bg", "new_bg.png");
524         new_image("setformat_bg", "setformat_bg.png");
525
526
527         timebar_view_data = new_image("timebar_view.png");
528
529         setformat_w = get_image("setformat_bg")->get_w();
530         setformat_h = get_image("setformat_bg")->get_h();
531         setformat_x1 = 15;
532         setformat_x2 = 100;
533
534         setformat_x3 = 315;
535         setformat_x4 = 415;
536         setformat_y1 = 20;
537         setformat_y2 = 85;
538         setformat_y3 = 125;
539         setformat_margin = 30;
540         setformat_channels_x = 25;
541         setformat_channels_y = 242;
542         setformat_channels_w = 250;
543         setformat_channels_h = 250;
544
545         loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10;
546         browse_pad = 20;
547
548
549         new_toggle("playpatch.png",
550                 "patch_up.png",
551                 "patch_hi.png",
552                 "patch_checked.png",
553                 "patch_dn.png",
554                 "patch_checkedhi.png",
555                 "playpatch_data");
556
557         new_toggle("recordpatch.png",
558                 "patch_up.png",
559                 "patch_hi.png",
560                 "patch_checked.png",
561                 "patch_dn.png",
562                 "patch_checkedhi.png",
563                 "recordpatch_data");
564
565         new_toggle("gangpatch.png",
566                 "patch_up.png",
567                 "patch_hi.png",
568                 "patch_checked.png",
569                 "patch_dn.png",
570                 "patch_checkedhi.png",
571                 "gangpatch_data");
572
573         new_toggle("drawpatch.png",
574                 "patch_up.png",
575                 "patch_hi.png",
576                 "patch_checked.png",
577                 "patch_dn.png",
578                 "patch_checkedhi.png",
579                 "drawpatch_data");
580
581
582         new_image_set("mutepatch_data",
583                 5,
584                 "mutepatch_up.png",
585                 "mutepatch_hi.png",
586                 "mutepatch_checked.png",
587                 "mutepatch_dn.png",
588                 "mutepatch_checkedhi.png");
589
590         new_image_set("expandpatch_data",
591                 5,
592                 "expandpatch_up.png",
593                 "expandpatch_hi.png",
594                 "expandpatch_checked.png",
595                 "expandpatch_dn.png",
596                 "expandpatch_checkedhi.png");
597
598         build_bg_data();
599         build_overlays();
600
601
602
603
604         out_point = new_image_set(5,
605                 "out_up.png",
606                 "out_hi.png",
607                 "out_checked.png",
608                 "out_dn.png",
609                 "out_checkedhi.png");
610         in_point = new_image_set(5,
611                 "in_up.png",
612                 "in_hi.png",
613                 "in_checked.png",
614                 "in_dn.png",
615                 "in_checkedhi.png");
616
617         label_toggle = new_image_set(5,
618                 "labeltoggle_up.png",
619                 "labeltoggle_uphi.png",
620                 "label_checked.png",
621                 "labeltoggle_dn.png",
622                 "label_checkedhi.png");
623
624         ffmpeg_toggle = new_image_set(5,
625                 "ff_up.png",
626                 "ff_hi.png",
627                 "ff_checked.png",
628                 "ff_down.png",
629                 "ff_checkedhi.png");
630
631         shbtn_data = new_image_set(3,
632                 "shbtn_up.png",
633                 "shbtn_hi.png",
634                 "shbtn_dn.png");
635
636         new_image_set("preset_edit",
637                 3,
638                 "preset_edit0.png",
639                 "preset_edit1.png",
640                 "preset_edit2.png");
641
642         new_image_set("histogram_carrot",
643                 5,
644                 "histogram_carrot_up.png",
645                 "histogram_carrot_hi.png",
646                 "histogram_carrot_checked.png",
647                 "histogram_carrot_dn.png",
648                 "histogram_carrot_checkedhi.png");
649
650
651         statusbar_cancel_data = new_image_set(3,
652                 "statusbar_cancel_up.png",
653                 "statusbar_cancel_hi.png",
654                 "statusbar_cancel_dn.png");
655
656
657         VFrame *editpanel_up = new_image("editpanel_up.png");
658         VFrame *editpanel_hi = new_image("editpanel_hi.png");
659         VFrame *editpanel_dn = new_image("editpanel_dn.png");
660         VFrame *editpanel_checked = new_image("editpanel_checked.png");
661         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
662
663         new_image("panel_divider", "panel_divider.png");
664         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
665         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
666         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
667
668         new_toggle("histogram_toggle.png",
669                 editpanel_up,
670                 editpanel_hi,
671                 editpanel_checked,
672                 editpanel_dn,
673                 editpanel_checkedhi,
674                 "histogram_toggle");
675         new_toggle("histogram_rgb.png",
676                 editpanel_up,
677                 editpanel_hi,
678                 editpanel_checked,
679                 editpanel_dn,
680                 editpanel_checkedhi,
681                 "histogram_rgb_toggle");
682         new_toggle("waveform.png",
683                 editpanel_up,
684                 editpanel_hi,
685                 editpanel_checked,
686                 editpanel_dn,
687                 editpanel_checkedhi,
688                 "waveform_toggle");
689         new_toggle("waveform_rgb.png",
690                 editpanel_up,
691                 editpanel_hi,
692                 editpanel_checked,
693                 editpanel_dn,
694                 editpanel_checkedhi,
695                 "waveform_rgb_toggle");
696         new_toggle("scope.png",
697                 editpanel_up,
698                 editpanel_hi,
699                 editpanel_checked,
700                 editpanel_dn,
701                 editpanel_checkedhi,
702                 "scope_toggle");
703
704         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
705         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
706
707         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
708         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
709         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
710         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
711         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
712         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
713         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
714         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
715         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
716         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
717         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
718         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
719         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
720         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
721         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
722         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
723         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
724         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
725         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
726         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
727         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
728         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
729         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
730         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
731         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
732         new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
733
734
735         VFrame *transport_up = new_image("transportup.png");
736         VFrame *transport_hi = new_image("transporthi.png");
737         VFrame *transport_dn = new_image("transportdn.png");
738
739         new_button("end.png", transport_up, transport_hi, transport_dn, "end");
740         new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd");
741         new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev");
742         new_button("play.png", transport_up, transport_hi, transport_dn, "play");
743         new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd");
744         new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev");
745         new_button("pause.png", transport_up, transport_hi, transport_dn, "pause");
746         new_button("record.png", transport_up, transport_hi, transport_dn, "record");
747         new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe");
748         new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse");
749         new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind");
750         new_button("stop.png", transport_up, transport_hi, transport_dn, "stop");
751         new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec");
752
753
754
755 // CWindow icons
756         new_image("cwindow_inactive", "cwindow_inactive.png");
757         new_image("cwindow_active", "cwindow_active.png");
758
759
760
761         new_image_set("category_button",
762                 3,
763                 "preferencesbutton_dn.png",
764                 "preferencesbutton_dnhi.png",
765                 "preferencesbutton_dnlo.png");
766
767         new_image_set("category_button_checked",
768                 3,
769                 "preferencesbutton_up.png",
770                 "preferencesbutton_uphi.png",
771                 "preferencesbutton_dnlo.png");
772
773
774
775         new_image_set("color3way_point",
776                 3,
777                 "color3way_up.png",
778                 "color3way_hi.png",
779                 "color3way_dn.png");
780
781
782
783
784         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
785         new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
786         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
787         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
788         new_toggle("blank30x30.png",
789                    new_image("locklabels_locked.png"),
790                    new_image("locklabels_lockedhi.png"),
791                    new_image("locklabels_unlocked.png"),
792                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
793                    new_image("locklabels_unlockedhi.png"),
794                    "locklabels");
795
796         VFrame *cpanel_up = new_image("cpanel_up.png");
797         VFrame *cpanel_hi = new_image("cpanel_hi.png");
798         VFrame *cpanel_dn = new_image("cpanel_dn.png");
799         VFrame *cpanel_checked = new_image("cpanel_checked.png");
800         VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
801
802
803         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
804         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
805         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
806         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
807         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
808         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
809         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
810         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
811         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
812         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
813
814         // toggle for tangent mode (compositor/tool window)
815         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
816         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
817
818
819         flush_images();
820
821         title_font = MEDIUMFONT;
822         title_color = 0x000000;
823         recordgui_fixed_color = BLACK;
824         recordgui_variable_color = BLACK;
825
826         channel_position_color = BLACK;
827         resources->meter_title_w = 25;
828 }
829
830
831
832 void BrightTheme::build_bg_data()
833 {
834 // Audio settings
835         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
836
837 // Track bitmaps
838         new_image("resource1024", "resource1024.png");
839         new_image("resource512", "resource512.png");
840         new_image("resource256", "resource256.png");
841         new_image("resource128", "resource128.png");
842         new_image("resource64", "resource64.png");
843         new_image("resource32", "resource32.png");
844         new_image("plugin_bg_data", "plugin_bg.png");
845         new_image("title_bg_data", "title_bg.png");
846         new_image("vtimebar_bg_data", "vwindow_timebar.png");
847 }
848
849
850
851 void BrightTheme::build_overlays()
852 {
853         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
854         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
855         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
856         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
857         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
858         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
859 }
860
861
862
863
864
865
866
867
868
869 void BrightTheme::draw_rwindow_bg(RecordGUI *gui)
870 {
871 //      int y;
872 //      int margin = 50;
873 //      int margin2 = 80;
874 //      gui->draw_9segment(recordgui_batch_x - margin,
875 //              0,
876 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
877 //              recordgui_buttons_y,
878 //              rgui_batch);
879 //      gui->draw_3segmenth(recordgui_options_x - margin2,
880 //              recordgui_buttons_y - 5,
881 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
882 //              rgui_controls);
883 //      y = recordgui_buttons_y - 5 + rgui_controls->get_h();
884 //      gui->draw_9segment(0,
885 //              y,
886 //              mwindow->session->rwindow_w,
887 //              mwindow->session->rwindow_h - y,
888 //              rgui_list);
889 }
890
891 void BrightTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
892 {
893 //      int margin = 45;
894 //      int panel_w = 300;
895 //      int x = rmonitor_meter_x - margin;
896 //      int w = mwindow->session->rmonitor_w - x;
897 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
898 //      gui->clear_box(0,
899 //              0,
900 //              mwindow->session->rmonitor_w,
901 //              mwindow->session->rmonitor_h);
902 //      gui->draw_9segment(x,
903 //              0,
904 //              w,
905 //              mwindow->session->rmonitor_h,
906 //              rmonitor_meters);
907 }
908
909
910
911
912
913
914 void BrightTheme::draw_mwindow_bg(MWindowGUI *gui)
915 {
916 // Button bar
917         gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
918                 gui->menu_w(), get_image("mbutton_bg"));
919
920         gui->draw_vframe(get_image("panel_divider"),
921                 mbuttons_x + 228,
922                 mbuttons_y - 1);
923
924         gui->draw_vframe(get_image("panel_divider"),
925                 mbuttons_x + 320,
926                 mbuttons_y - 1);
927
928 // Clock
929         gui->draw_3segmenth(0,
930                 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
931                 get_image("patchbay_bg")->get_w(),
932                 get_image("clock_bg"));
933
934 // Patchbay
935         gui->draw_3segmentv(patchbay_x,
936                 patchbay_y,
937                 patchbay_h,
938                 get_image("patchbay_bg"));
939
940 // Track canvas
941         int patchbay_w = get_image("patchbay_bg")->get_w();
942         gui->clear_box(mcanvas_x + patchbay_w,
943                 mcanvas_y + mtimebar_h,
944                 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT) - patchbay_w,
945                 patchbay_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
946
947 // Timebar
948         gui->draw_3segmenth(mtimebar_x,
949                 mtimebar_y,
950                 mtimebar_w,
951                 get_image("timebar_bg"));
952
953 // Zoombar
954 //      gui->set_color(0x373737);
955 //      gui->draw_box(mzoom_x,
956 //              mzoom_y,
957 //              mwindow->session->mwindow_w,
958 //              25);
959
960 // Scrollbar filler
961 //      gui->draw_vframe(get_image("mscroll_filler"),
962 //              mhscroll_x + mhscroll_w,
963 //              mvscroll_y + mvscroll_h);
964
965 // Status
966         gui->draw_3segmenth(mzoom_x,
967                 mzoom_y,
968                 mzoom_w,
969                 get_image("statusbar"));
970
971
972 }
973
974 void BrightTheme::draw_cwindow_bg(CWindowGUI *gui)
975 {
976         BC_Resources *resources = BC_WindowBase::get_resources();
977
978         gui->set_color(WHITE);
979         gui->draw_box(ccanvas_x + ccanvas_w - resources->vscroll_data[0]->get_w(),
980                 ccanvas_y + ccanvas_h - resources->hscroll_data[0]->get_h(),
981                 resources->vscroll_data[0]->get_w(),
982                 resources->hscroll_data[0]->get_h());
983         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
984         gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
985         if(mwindow->edl->session->cwindow_meter)
986         {
987                 gui->draw_3segmenth(cstatus_x,
988                         ccomposite_h,
989                         cmeter_x - widget_border - cstatus_x,
990                         get_image("cbuttons_right"));
991                 gui->draw_9segment(cmeter_x - widget_border,
992                         0,
993                         mwindow->session->cwindow_w - cmeter_x + widget_border,
994                         mwindow->session->cwindow_h,
995                         get_image("cmeter_bg"));
996         }
997         else
998         {
999                 gui->draw_3segmenth(cstatus_x,
1000                         ccomposite_h,
1001                         cmeter_x - widget_border - cstatus_x + 100,
1002                         get_image("cbuttons_right"));
1003         }
1004 }
1005
1006 void BrightTheme::draw_vwindow_bg(VWindowGUI *gui)
1007 {
1008         gui->draw_3segmenth(0,
1009                 vcanvas_h,
1010                 vdivision_x,
1011                 get_image("vbuttons_left"));
1012
1013
1014         if(mwindow->edl->session->vwindow_meter)
1015         {
1016                 gui->draw_3segmenth(vdivision_x,
1017                         vcanvas_h,
1018                         vmeter_x - widget_border - vdivision_x,
1019                         get_image("cbuttons_right"));
1020                 gui->draw_9segment(vmeter_x - widget_border,
1021                         0,
1022                         mwindow->session->vwindow_w - vmeter_x + widget_border,
1023                         mwindow->session->vwindow_h,
1024                         get_image("cmeter_bg"));
1025         }
1026         else
1027         {
1028                 gui->draw_3segmenth(vdivision_x,
1029                         vcanvas_h,
1030                         vmeter_x - widget_border - vdivision_x + 100,
1031                         get_image("cbuttons_right"));
1032         }
1033
1034 // Clock border
1035         gui->draw_3segmenth(vtime_x - 20,
1036                 vtime_y - 1,
1037                 vtime_w + 40,
1038                 get_image("vclock"));
1039 }
1040
1041
1042
1043 void BrightTheme::draw_preferences_bg(PreferencesWindow *gui)
1044 {
1045         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1046 }
1047
1048
1049 void BrightTheme::draw_new_bg(NewWindow *gui)
1050 {
1051         gui->draw_vframe(get_image("new_bg"), 0, 0);
1052 }
1053
1054 void BrightTheme::draw_setformat_bg(SetFormatWindow *gui)
1055 {
1056         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1057 }
1058
1059
1060