add olaf's neophyte theme, honor numlock and use kp numerics
[goodguy/history.git] / cinelerra-5.1 / plugins / theme_neophyte / neophyte.C
1 /*
2  * Neophyte theme (2018-08-01)
3  * Design: Olaf Wolff <cinmail · womentie.de>
4  * Based on unflat theme, based on S.U.V. theme.
5  *
6  * CINELERRA
7  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
8  * by Paolo Rampino <info at tuttoainternet dot it>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23  *
24  */
25
26 #include "bcsignals.h"
27 #include "clip.h"
28 #include "cwindowgui.h"
29 #include "neophyte.h"
30 #include "edl.h"
31 #include "edlsession.h"
32 #include "mainmenu.h"
33 #include "mainsession.h"
34 #include "mbuttons.h"
35 #include "meterpanel.h"
36 #include "mwindow.h"
37 #include "mwindowgui.h"
38 #include "new.h"
39 #include "patchbay.h"
40 #include "preferencesthread.h"
41 #include "recordgui.h"
42 #include "recordmonitor.h"
43 #include "setformat.h"
44 #include "statusbar.h"
45 #include "timebar.h"
46 #include "trackcanvas.h"
47 #include "vframe.h"
48 #include "vwindowgui.h"
49
50 #define CWHITE  0xfffdee // creamy white without black
51
52 // so einfach ist das nicht
53 // #undef RED
54 // #define RED  0xfffdee
55 // #undef BLUE
56 // #define BLUE 0xfffdee
57
58 PluginClient* new_plugin(PluginServer *server)
59 {
60         return new NEOPHYTETHEMEMain(server);
61 }
62
63 NEOPHYTETHEMEMain::NEOPHYTETHEMEMain(PluginServer *server)
64   : PluginTClient(server)
65 {
66 }
67
68 NEOPHYTETHEMEMain::~NEOPHYTETHEMEMain()
69 {
70 }
71
72 const char* NEOPHYTETHEMEMain::plugin_title() { return N_("Neophyte"); }
73
74 Theme* NEOPHYTETHEMEMain::new_theme()
75 {
76         theme = new NEOPHYTETHEME;
77         extern unsigned char _binary_theme_neophyte_data_start[];
78         theme->set_data(_binary_theme_neophyte_data_start);
79         return theme;
80 }
81
82 NEOPHYTETHEME::NEOPHYTETHEME()
83   : Theme()
84 {
85 }
86
87 NEOPHYTETHEME::~NEOPHYTETHEME()
88 {
89         delete camerakeyframe_data;
90         delete channel_position_data;
91         delete keyframe_data;
92         delete maskkeyframe_data;
93         delete modekeyframe_data;
94         delete pankeyframe_data;
95         delete projectorkeyframe_data;
96 }
97
98 void NEOPHYTETHEME::initialize()
99 {
100         BC_Resources *resources = BC_WindowBase::get_resources();
101
102         resources->text_default = 0xe6e4dd;    // creamy white 10% black
103         resources->text_background = 0x141414; // 92% black
104         resources->text_background_disarmed = 0x400000; // lock-ed (!)
105
106         resources->text_border2 = 0x141414; // l,t outside -  92% black
107   resources->text_border1 = 0x000000; // l,t inside  - 100% black
108   resources->text_border3 = 0x474747; // r,d inside  -  72% black
109         resources->text_border4 = 0x141414; // r,d outside -  92% black
110
111   resources->text_inactive_highlight = 0x162d50; // z.B. Subtitle, baby-blue -3
112
113         resources->bg_color = 0x262626; // 85% black
114   resources->border_light2 = resources->bg_color;
115         resources->border_shadow2 = resources->bg_color;
116
117   resources->default_text_color = 0xffffff; //0xf2f2f2; timeline …
118         resources->menu_title_text = 0xffffff;    // f2f2f2;
119   resources->popup_title_text = 0xffffff;   // f2f2f2;
120         resources->menu_item_text = 0xffffff;     // f2f2f2;
121
122   resources->menu_highlighted_fontcolor = CWHITE;
123         resources->generic_button_margin = 30;  // 30
124         resources->pot_needle_color = 0xe6e4dd; // [resources->text_default] – marginal
125         resources->pot_offset = 1;              // nur die Nadel.
126         resources->progress_text = resources->text_default;
127         resources->meter_font_color = resources->default_text_color;
128
129         resources->menu_light = 0x262626;       // wird von Grafik überschrieben
130         resources->menu_down = 0x00ffff;        // 
131         resources->menu_up = 0x00ffff;          // 
132         resources->menu_shadow = 0x00ffff;      // 
133
134         resources->menu_highlighted = 0x5f8dd3; // baby-blue
135         resources->popupmenu_margin = 15;       // Einzug, verschiebt den Knopf-Text nach rechts
136         resources->popupmenu_triangle_margin = 15;
137
138         resources->listbox_title_color = CWHITE; // Spalten Überschrift 
139         resources->listbox_title_margin = 15;  // [20] Einzug
140         resources->listbox_title_hotspot = 15; // [20]
141
142         resources->listbox_border2 = 0x141414; // wie text_border
143   resources->listbox_border1 = 0x000000; // 
144   resources->listbox_border3 = 0x474747; // 
145   resources->listbox_border4 = 0x141414; //
146   
147         resources->listbox_highlighted = 0x5f8dd3; // recources, loadfiles
148         resources->listbox_inactive = 0x141414;    //          Hintergrund
149         resources->listbox_bg = 0;                 // siehe ../theme_blond_cv/blondcvtheme.C:249
150         resources->listbox_text = 0xe6e4dd;        // 
151 // es fehlt "markiert" in allen Themen, derzeit 0000ff.
152   
153         resources->filebox_margin = 130;
154         resources->file_color = 0xf2f2f2;
155         resources->directory_color = 0x5f8dd3; // 0xa0a0ff;
156
157         new_toggle(
158       "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(
166       "loadmode_none.png",
167       "loadmode_up.png",
168       "loadmode_hi.png",
169       "loadmode_checked.png",
170       "loadmode_dn.png",
171       "loadmode_checkedhi.png",
172       "loadmode_none");
173         new_toggle(
174       "loadmode_newcat.png",
175       "loadmode_up.png",
176       "loadmode_hi.png",
177       "loadmode_checked.png",
178       "loadmode_dn.png",
179       "loadmode_checkedhi.png",
180       "loadmode_newcat");
181         new_toggle(
182       "loadmode_cat.png",
183       "loadmode_up.png",
184       "loadmode_hi.png",
185       "loadmode_checked.png",
186       "loadmode_dn.png",
187       "loadmode_checkedhi.png",
188       "loadmode_cat");
189         new_toggle(
190       "loadmode_newtracks.png",
191       "loadmode_up.png",
192       "loadmode_hi.png",
193       "loadmode_checked.png",
194       "loadmode_dn.png",
195       "loadmode_checkedhi.png",
196       "loadmode_newtracks");
197         new_toggle(
198       "loadmode_paste.png",
199       "loadmode_up.png",
200       "loadmode_hi.png",
201       "loadmode_checked.png",
202       "loadmode_dn.png",
203       "loadmode_checkedhi.png",
204       "loadmode_paste");
205         new_toggle(
206        "loadmode_resource.png",
207        "loadmode_up.png",
208        "loadmode_hi.png",
209        "loadmode_checked.png",
210        "loadmode_dn.png",
211        "loadmode_checkedhi.png",
212        "loadmode_resource");
213         new_toggle(
214        "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         resources->filebox_icons_images = new_button(
223        "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         resources->filebox_descend_images = new_button("openfolder.png",
266                 "filebox_bigbutton_up.png",
267                 "filebox_bigbutton_hi.png",
268                 "filebox_bigbutton_dn.png",
269                 "filebox_descend");
270
271         resources->usethis_button_images =
272                 resources->ok_images = new_button("ok.png",
273                 "filebox_bigbutton_up.png",
274                 "filebox_bigbutton_hi.png",
275                 "filebox_bigbutton_dn.png",
276                 "ok_button");
277
278         new_button("ok.png",
279                 "new_bigbutton_up.png",
280                 "new_bigbutton_hi.png",
281                 "new_bigbutton_dn.png",
282                 "new_ok_images");
283
284         resources->cancel_images = new_button("cancel.png",
285                 "filebox_bigbutton_up.png",
286                 "filebox_bigbutton_hi.png",
287                 "filebox_bigbutton_dn.png",
288                 "cancel_button");
289
290         new_button("cancel.png",
291                 "new_bigbutton_up.png",
292                 "new_bigbutton_hi.png",
293                 "new_bigbutton_dn.png",
294                 "new_cancel_images");
295
296   // Uhr – wo?
297         resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
298         "0.png",
299                 "1.png",
300                 "2.png",
301                 "3.png",
302                 "4.png",
303                 "5.png",
304                 "6.png",
305                 "7.png",
306                 "8.png",
307                 "9.png",
308                 "colon.png",
309                 "period.png",
310                 "a.png",
311                 "b.png",
312                 "c.png",
313                 "d.png",
314                 "e.png",
315                 "f.png",
316                 "space.png",
317                 "dash.png");
318
319         resources->bar_data = new_image("bar", "bar.png");
320         resources->check = new_image("check", "check.png");
321
322         resources->min_menu_w = 96;
323         resources->menu_popup_bg = new_image("menu_popup_bg.png");
324         resources->menu_item_bg = new_image_set(3,
325                 "menuitem_up.png",
326                 "menuitem_hi.png",
327                 "menuitem_dn.png");
328         resources->menu_bar_bg = new_image("menubar_bg.png");
329         resources->menu_title_bg = new_image_set(3,
330                 "menubar_up.png",
331                 "menubar_hi.png",
332                 "menubar_dn.png");
333
334         resources->popupmenu_images = 0;
335 //              new_image_set(3,
336 //              "menupopup_up.png",
337 //              "menupopup_hi.png",
338 //              "menupopup_dn.png");
339
340         resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
341                 "text_highlight.png");
342
343         resources->generic_button_images = new_image_set(3,
344                         "generic_up.png",
345                         "generic_hi.png",
346                         "generic_dn.png");
347         resources->horizontal_slider_data = new_image_set(6,
348                         "hslider_fg_up.png",
349                         "hslider_fg_hi.png",
350                         "hslider_fg_dn.png",
351                         "hslider_bg_up.png",
352                         "hslider_bg_hi.png",
353                         "hslider_bg_dn.png");
354         resources->vertical_slider_data = new_image_set(6,
355                         "hslider_fg_up.png",
356                         "hslider_fg_hi.png",
357                         "hslider_fg_dn.png",
358                         "hslider_bg_up.png",
359                         "hslider_bg_hi.png",
360                         "hslider_bg_dn.png");
361         for( int i=0; i<6; ++i )
362                 resources->vertical_slider_data[i]->rotate90();
363
364         resources->progress_images = new_image_set(2,
365                         "progress_bg.png",
366                         "progress_hi.png");
367         resources->tumble_data = new_image_set(4,
368                 "tumble_up.png",
369                 "tumble_hi.png",
370                 "tumble_bottom.png",
371                 "tumble_top.png");
372         resources->listbox_button = new_button4("listbox_button.png",
373                 "editpanel_up.png",
374                 "editpanel_hi.png",
375                 "editpanel_dn.png",
376                 "editpanel_hi.png",
377                 "listbox_button");
378         resources->listbox_column = new_image_set(3,
379                 "column_up.png",
380                 "column_hi.png",
381                 "column_dn.png");
382         resources->listbox_up = new_image("listbox_up.png");
383         resources->listbox_dn = new_image("listbox_dn.png");
384         resources->pan_data = new_image_set(7,
385                         "pan_up.png",
386                         "pan_hi.png",
387                         "pan_popup.png",
388                         "pan_channel.png",
389                         "pan_stick.png",
390                         "pan_channel_small.png",
391                         "pan_stick_small.png");
392         resources->pan_text_color = CWHITE;
393
394         resources->pot_images = new_image_set(3,
395                 "pot_up.png",
396                 "pot_hi.png",
397                 "pot_dn.png");
398
399         resources->checkbox_images = new_image_set(5,
400                 "checkbox_up.png",
401                 "checkbox_hi.png",
402                 "checkbox_checked.png",
403                 "checkbox_dn.png",
404                 "checkbox_checkedhi.png");
405
406         resources->radial_images = new_image_set(5,
407                 "radial_up.png",
408                 "radial_hi.png",
409                 "radial_checked.png",
410                 "radial_dn.png",
411                 "radial_checkedhi.png");
412
413         resources->xmeter_images = new_image_set(7,
414                 "xmeter_normal.png",
415                 "xmeter_green.png",
416                 "xmeter_red.png",
417                 "xmeter_yellow.png",
418                 "xmeter_white.png",
419                 "xmeter_over.png",
420                 "downmix51_2.png");
421         resources->ymeter_images = new_image_set(7,
422                 "ymeter_normal.png",
423                 "ymeter_green.png",
424                 "ymeter_red.png",
425                 "ymeter_yellow.png",
426                 "ymeter_white.png",
427                 "ymeter_over.png",
428                 "downmix51_2.png");
429
430         resources->hscroll_data = new_image_set(10,
431                         "hscroll_handle_up.png",
432                         "hscroll_handle_hi.png",
433                         "hscroll_handle_dn.png",
434                         "hscroll_handle_bg.png",
435                         "hscroll_left_up.png",
436                         "hscroll_left_hi.png",
437                         "hscroll_left_dn.png",
438                         "hscroll_right_up.png",
439                         "hscroll_right_hi.png",
440                         "hscroll_right_dn.png");
441
442         resources->vscroll_data = new_image_set(10,
443                         "vscroll_handle_up.png",
444                         "vscroll_handle_hi.png",
445                         "vscroll_handle_dn.png",
446                         "vscroll_handle_bg.png",
447                         "vscroll_left_up.png",
448                         "vscroll_left_hi.png",
449                         "vscroll_left_dn.png",
450                         "vscroll_right_up.png",
451                         "vscroll_right_hi.png",
452                         "vscroll_right_dn.png");
453         resources->scroll_minhandle = 20;
454
455         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
456         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
457         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
458         new_button("swap_extents.png",
459                 "editpanel_up.png",
460                 "editpanel_hi.png",
461                 "editpanel_dn.png",
462                 "swap_extents");
463
464 // Record windows
465         preferences_category_overlap = 0;
466         preferencescategory_x = 0;
467         preferencescategory_y = 5;
468         preferencestitle_x = 5;
469         preferencestitle_y = 10;
470         preferencesoptions_x = 5;
471         preferencesoptions_y = 0;
472
473 // MWindow
474         message_normal = resources->text_default;
475         audio_color = GREEN;
476         mtransport_margin = 10;
477         toggle_margin = 10;
478
479         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
480         new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
481         new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
482
483         new_image("mbutton_bg", "mbutton_bg.png");
484         new_image("timebar_bg", "timebar_bg_flat.png");
485         new_image("timebar_brender", "timebar_brender.png");
486         new_image("clock_bg", "mclock_flat.png");
487         new_image("patchbay_bg", "patchbay_bg.png");
488         new_image("statusbar", "statusbar.png");
489 //      new_image("mscroll_filler", "mscroll_filler.png");
490
491         new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
492         new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
493
494         new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
495         new_image("mode_add", "mode_add.png");
496         new_image("mode_divide", "mode_divide.png");
497         new_image("mode_multiply", "mode_multiply.png");
498         new_image("mode_normal", "mode_normal.png");
499         new_image("mode_replace", "mode_replace.png");
500         new_image("mode_subtract", "mode_subtract.png");
501         new_image("mode_max", "mode_max.png");
502
503         new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
504         new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
505
506 // CWindow
507         new_image("cpanel_bg", "cpanel_bg.png");
508         new_image("cbuttons_left", "cbuttons_left.png");
509         new_image("cbuttons_right", "cbuttons_right.png");
510         new_image("cmeter_bg", "cmeter_bg.png");
511
512 // VWindow
513         new_image("vbuttons_left", "vbuttons_left.png");
514         new_image("vclock", "vclock.png");
515
516         new_image("preferences_bg", "preferences_bg.png");
517
518         new_image("new_bg", "new_bg.png");
519         new_image("setformat_bg", "setformat_bg.png");
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         new_toggle("playpatch.png",
543                 "playpatch_up.png",
544                 "playpatch_hi.png",
545                 "playpatch_checked.png",
546                 "playpatch_dn.png",
547                 "playpatch_checkedhi.png",
548                 "playpatch_data");
549
550         new_toggle("recordpatch.png",
551                 "recordpatch_up.png",
552                 "recordpatch_hi.png",
553                 "recordpatch_checked.png",
554                 "recordpatch_dn.png",
555                 "recordpatch_checkedhi.png",
556                 "recordpatch_data");
557
558         new_toggle("gangpatch.png",
559                 "patch_up.png",
560                 "patch_hi.png",
561                 "patch_checked.png",
562                 "patch_dn.png",
563                 "patch_checkedhi.png",
564                 "gangpatch_data");
565
566         new_toggle("drawpatch.png",
567                 "patch_up.png",
568                 "patch_hi.png",
569                 "patch_checked.png",
570                 "patch_dn.png",
571                 "patch_checkedhi.png",
572                 "drawpatch_data");
573
574         new_image_set("mutepatch_data",
575                 5,
576                 "mutepatch_up.png",
577                 "mutepatch_hi.png",
578                 "mutepatch_checked.png",
579                 "mutepatch_dn.png",
580                 "mutepatch_checkedhi.png");
581
582         new_image_set("expandpatch_data",
583                 5,
584                 "expandpatch_up.png",
585                 "expandpatch_hi.png",
586                 "expandpatch_checked.png",
587                 "expandpatch_dn.png",
588                 "expandpatch_checkedhi.png");
589
590         build_bg_data();
591         build_overlays();
592
593         out_point = new_image_set(5,
594                 "out_up.png",
595                 "out_hi.png",
596                 "out_checked.png",
597                 "out_dn.png",
598                 "out_checkedhi.png");
599         in_point = new_image_set(5,
600                 "in_up.png",
601                 "in_hi.png",
602                 "in_checked.png",
603                 "in_dn.png",
604                 "in_checkedhi.png");
605
606         label_toggle = new_image_set(5,
607                 "labeltoggle_up.png",
608                 "labeltoggle_uphi.png",
609                 "label_checked.png",
610                 "labeltoggle_dn.png",
611                 "label_checkedhi.png");
612
613         ffmpeg_toggle = new_image_set(5,
614                 "ff_up.png",
615                 "ff_hi.png",
616                 "ff_checked.png",
617                 "ff_down.png",
618                 "ff_checkedhi.png");
619
620         proxy_p_toggle = new_image_set(5,
621                 "proxy_p_up.png",
622                 "proxy_p_hi.png",
623                 "proxy_p_chkd.png",
624                 "proxy_p_down.png",
625                 "proxy_p_chkdhi.png");
626
627         proxy_s_toggle = new_image_set(5,
628                 "proxy_s_up.png",
629                 "proxy_s_hi.png",
630                 "proxy_s_chkd.png",
631                 "proxy_s_down.png",
632                 "proxy_s_chkdhi.png");
633
634         shbtn_data = new_image_set(3,
635                 "shbtn_up.png",
636                 "shbtn_hi.png",
637                 "shbtn_dn.png");
638
639         new_image_set("preset_edit",
640                 3,
641                 "preset_edit0.png",
642                 "preset_edit1.png",
643                 "preset_edit2.png");
644
645         new_image_set("histogram_carrot",
646                 5,
647                 "histogram_carrot_up.png",
648                 "histogram_carrot_hi.png",
649                 "histogram_carrot_checked.png",
650                 "histogram_carrot_dn.png",
651                 "histogram_carrot_checkedhi.png");
652
653         statusbar_cancel_data = new_image_set(3,
654                 "statusbar_cancel_up.png",
655                 "statusbar_cancel_hi.png",
656                 "statusbar_cancel_dn.png");
657
658         VFrame *editpanel_up = new_image("editpanel_up.png");
659         VFrame *editpanel_hi = new_image("editpanel_hi.png");
660         VFrame *editpanel_dn = new_image("editpanel_dn.png");
661         VFrame *editpanel_checked = new_image("editpanel_checked.png");
662         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
663
664         new_image("panel_divider", "panel_divider.png");
665         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
666         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
667         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
668
669         new_toggle("histogram_toggle.png",
670                 editpanel_up,
671                 editpanel_hi,
672                 editpanel_checked,
673                 editpanel_dn,
674                 editpanel_checkedhi,
675                 "histogram_toggle");
676         new_toggle("histogram_rgb.png",
677                 editpanel_up,
678                 editpanel_hi,
679                 editpanel_checked,
680                 editpanel_dn,
681                 editpanel_checkedhi,
682                 "histogram_rgb_toggle");
683         new_toggle("waveform.png",
684                 editpanel_up,
685                 editpanel_hi,
686                 editpanel_checked,
687                 editpanel_dn,
688                 editpanel_checkedhi,
689                 "waveform_toggle");
690         new_toggle("waveform_rgb.png",
691                 editpanel_up,
692                 editpanel_hi,
693                 editpanel_checked,
694                 editpanel_dn,
695                 editpanel_checkedhi,
696                 "waveform_rgb_toggle");
697         new_toggle("scope.png",
698                 editpanel_up,
699                 editpanel_hi,
700                 editpanel_checked,
701                 editpanel_dn,
702                 editpanel_checkedhi,
703                 "scope_toggle");
704
705         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
706         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
707
708         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
709         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
710         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
711         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
712         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
713         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
714         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
715         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
716         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
717         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
718         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
719         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
720         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
721         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
722         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
723         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn,"overbutton");
724         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn,"overwritebutton");
725         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
726         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
727         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
728         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn,"splicebutton");
729         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
730         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
731         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
732         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
733         new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
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 // CWindow icons
754         new_image("cwindow_inactive", "cwindow_inactive.png");
755         new_image("cwindow_active", "cwindow_active.png");
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         new_image_set("color3way_point",
770                 3,
771                 "color3way_up.png",
772                 "color3way_hi.png",
773                 "color3way_dn.png");
774
775         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
776         new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
777         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
778         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
779         new_toggle("blank30x30.png",
780                    new_image("locklabels_locked.png"),
781                    new_image("locklabels_lockedhi.png"),
782                    new_image("locklabels_unlocked.png"),
783                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
784                    new_image("locklabels_unlockedhi.png"),
785                    "locklabels");
786
787         VFrame *cpanel_up = new_image("cpanel_up.png");
788         VFrame *cpanel_hi = new_image("cpanel_hi.png");
789         VFrame *cpanel_dn = new_image("cpanel_dn.png");
790         VFrame *cpanel_checked = new_image("cpanel_checked.png");
791         VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
792
793
794         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
795         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
796         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
797         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
798         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
799         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
800         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
801         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
802         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
803         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
804
805         // toggle for tangent mode (compositor/tool window)
806         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
807         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
808
809
810         flush_images();
811
812         title_font = MEDIUMFONT_3D;
813         title_color = 0xf2f2f2;
814         recordgui_fixed_color = YELLOW;
815         recordgui_variable_color = 0xffaaff; // RED;
816
817         channel_position_color = MEYELLOW;
818         resources->meter_title_w = 25;
819
820         // (asset) edit info text color
821         edit_font_color = YELLOW;
822 }
823
824 #define VWINDOW_METER_MARGIN 5
825
826 void NEOPHYTETHEME::build_bg_data()
827 {
828 // Audio settings
829         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
830
831 // Track bitmaps
832         new_image("resource1024", "resource1024.png");
833         new_image("resource512", "resource512.png");
834         new_image("resource256", "resource256.png");
835         new_image("resource128", "resource128.png");
836         new_image("resource64", "resource64.png");
837         new_image("resource32", "resource32.png");
838         new_image("plugin_bg_data", "plugin_bg.png");
839         new_image("title_bg_data", "title_bg.png");
840         new_image("vtimebar_bg_data", "vwindow_timebar.png");
841 }
842
843 void NEOPHYTETHEME::build_overlays()
844 {
845         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
846         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
847         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
848   modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
849         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
850         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
851 }
852
853 void NEOPHYTETHEME::draw_rwindow_bg(RecordGUI *gui)
854 {
855 //      int y;
856 //      int margin = 50;
857 //      int margin2 = 80;
858 //      gui->draw_9segment(recordgui_batch_x - margin,
859 //              0,
860 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
861 //              recordgui_buttons_y,
862 //              rgui_batch);
863 //      gui->draw_3segmenth(recordgui_options_x - margin2,
864 //              recordgui_buttons_y - 5,
865 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
866 //              rgui_controls);
867 //      y = recordgui_buttons_y - 5 + rgui_controls->get_h();
868 //      gui->draw_9segment(0,
869 //              y,
870 //              mwindow->session->rwindow_w,
871 //              mwindow->session->rwindow_h - y,
872 //              rgui_list);
873 }
874
875 void NEOPHYTETHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
876 {
877 //      int margin = 45;
878 //      int panel_w = 300;
879 //      int x = rmonitor_meter_x - margin;
880 //      int w = mwindow->session->rmonitor_w - x;
881 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
882 //      gui->clear_box(0,
883 //              0,
884 //              mwindow->session->rmonitor_w,
885 //              mwindow->session->rmonitor_h);
886 //      gui->draw_9segment(x,
887 //              0,
888 //              w,
889 //              mwindow->session->rmonitor_h,
890 //              rmonitor_meters);
891 }
892
893 void NEOPHYTETHEME::draw_mwindow_bg(MWindowGUI *gui)
894 {
895 // Button bar
896         gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
897                 gui->menu_w(), get_image("mbutton_bg"));
898
899         int pdw = get_image("panel_divider")->get_w();
900         int x = mbuttons_x;
901         x += 9 * get_image("play")->get_w();
902         x += mtransport_margin;                                       // the control buttons
903
904         gui->draw_vframe(get_image("panel_divider"),
905                 x - toggle_margin / 2 - pdw / 2 + 2,
906                 mbuttons_y - 1);
907         x += 2 * get_image("arrow")->get_w() + toggle_margin;           // the mode buttons
908
909         gui->draw_vframe(get_image("panel_divider"),
910                 x - toggle_margin / 2 - pdw / 2 + 2,
911                 mbuttons_y - 1);
912
913         x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;    // the state toggle buttons
914         gui->draw_vframe(get_image("panel_divider"),
915                 x - toggle_margin / 2 - pdw / 2 + 2,
916                 mbuttons_y - 1);
917
918 // Clock
919         gui->draw_3segmenth(0,
920                 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
921                 get_image("patchbay_bg")->get_w(),
922                 get_image("clock_bg"));
923
924 // Patchbay
925         gui->draw_3segmentv(patchbay_x,
926                 patchbay_y,
927                 patchbay_h,
928                 get_image("patchbay_bg"));
929
930 // Track canvas
931         gui->set_color(BLACK);
932         gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
933                 mcanvas_y + mtimebar_h,
934                 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
935                 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
936
937 // Timebar
938         gui->draw_3segmenth(mtimebar_x,
939                 mtimebar_y,
940                 mtimebar_w,
941                 get_image("timebar_bg"));
942
943 // Zoombar
944         gui->set_color(0x141414);
945         gui->draw_box(mzoom_x,
946                 mzoom_y,
947                 mwindow->session->mwindow_w,
948                 25);
949
950 // Scrollbar filler
951 //      gui->draw_vframe(get_image("mscroll_filler"),
952 //              mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
953 //              mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
954
955 // Status
956         gui->draw_3segmenth(mzoom_x,
957                 mzoom_y,
958                 mzoom_w,
959                 get_image("statusbar"));
960
961 }
962
963 void NEOPHYTETHEME::draw_cwindow_bg(CWindowGUI *gui)
964 {
965         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
966
967         gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
968
969         if(mwindow->edl->session->cwindow_meter)
970         {
971                 gui->draw_3segmenth(cstatus_x,
972                         ccomposite_h,
973                         cmeter_x - widget_border - cstatus_x,
974                         get_image("cbuttons_right"));
975                 gui->draw_9segment(cmeter_x - widget_border,
976                         0,
977                         mwindow->session->cwindow_w - cmeter_x + widget_border,
978                         mwindow->session->cwindow_h,
979                         get_image("cmeter_bg"));
980         }
981         else
982         {
983                 gui->draw_3segmenth(cstatus_x,
984                         ccomposite_h,
985                         cmeter_x - widget_border - cstatus_x + 100,
986                         get_image("cbuttons_right"));
987         }
988 }
989
990 void NEOPHYTETHEME::draw_vwindow_bg(VWindowGUI *gui)
991 {
992         gui->draw_3segmenth(0,
993                 vcanvas_h,
994                 vdivision_x,
995                 get_image("vbuttons_left"));
996         if(mwindow->edl->session->vwindow_meter)
997         {
998                 gui->draw_3segmenth(vdivision_x,
999                         vcanvas_h,
1000                         vmeter_x - widget_border - vdivision_x,
1001                         get_image("cbuttons_right"));
1002                 gui->draw_9segment(vmeter_x - widget_border,
1003                         0,
1004                         mwindow->session->vwindow_w - vmeter_x + widget_border,
1005                         mwindow->session->vwindow_h,
1006                         get_image("cmeter_bg"));
1007         }
1008         else
1009         {
1010                 gui->draw_3segmenth(vdivision_x,
1011                         vcanvas_h,
1012                         vmeter_x - widget_border - vdivision_x + 100,
1013                         get_image("cbuttons_right"));
1014         }
1015
1016 // Clock border
1017         gui->draw_3segmenth(vtime_x - 20,
1018                 vtime_y - 1,
1019                 vtime_w + 40,
1020                 get_image("vclock"));
1021 }
1022
1023
1024 void NEOPHYTETHEME::draw_preferences_bg(PreferencesWindow *gui)
1025 {
1026         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1027 }
1028
1029 void NEOPHYTETHEME::draw_new_bg(NewWindow *gui)
1030 {
1031         gui->draw_vframe(get_image("new_bg"), 0, 0);
1032 }
1033
1034 void NEOPHYTETHEME::draw_setformat_bg(SetFormatWindow *gui)
1035 {
1036         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1037 }
1038
1039