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