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