cfb1a541671e9c4c00986e618055b400819a25bb
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / theme_neophyte / neophyte.C
1 /*
2  *
3  * CINELERRA
4  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5  * by Paolo Rampino <info at tuttoainternet dot it>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  *
21  */
22
23 #include "bcsignals.h"
24 #include "clip.h"
25 #include "cwindowgui.h"
26 #include "neophyte.h"
27 #include "edl.h"
28 #include "edlsession.h"
29 #include "mainmenu.h"
30 #include "mainsession.h"
31 #include "mbuttons.h"
32 #include "meterpanel.h"
33 #include "mwindow.h"
34 #include "mwindowgui.h"
35 #include "new.h"
36 #include "patchbay.h"
37 #include "preferencesthread.h"
38 #include "recordgui.h"
39 #include "recordmonitor.h"
40 #include "setformat.h"
41 #include "statusbar.h"
42 #include "timebar.h"
43 #include "trackcanvas.h"
44 #include "vframe.h"
45 #include "vwindowgui.h"
46
47 #define ALARM 0xff00ff             // not yet defined, to search for the element
48 #define CreamyWhite 0xe6e4dd       // creamy white 10% black
49 #define CreamyWhiteBright 0xfffdee // creamy white without black
50 #define BlackNineTwo 0x141414      // 92% black
51 #define BlackSevenTwo 0x474747     // 72% black
52 #define BlackEightFive 0x262626    // 85% black
53 #define BlackFive 0xf2f2f2         //  5% black
54 #define BabyBlue 0x5f8dd3
55 #define BabyBlueDark 0x162d50      // baby-blue -3 (inkscape), e.g. dialog Subtitle
56 // traffic lights, light green: 0x27ae60/0x37c871 - just on the buttons.
57 #define ComicYellow 0xffcc00       // heads up!
58 #define DarkRed 0xaa0000           // locked or not switched on. 
59 #define LockedRed 0x400000
60
61 PluginClient* new_plugin(PluginServer *server)
62 {
63         return new NEOPHYTETHEMEMain(server);
64 }
65
66 NEOPHYTETHEMEMain::NEOPHYTETHEMEMain(PluginServer *server)
67         : PluginTClient(server)
68 {
69 }
70
71 NEOPHYTETHEMEMain::~NEOPHYTETHEMEMain()
72 {
73 }
74
75 const char* NEOPHYTETHEMEMain::plugin_title() { return N_("Neophyte"); }
76
77 Theme* NEOPHYTETHEMEMain::new_theme()
78 {
79         theme = new NEOPHYTETHEME;
80         extern unsigned char _binary_theme_neophyte_data_start[];
81         theme->set_data(_binary_theme_neophyte_data_start);
82         return theme;
83 }
84
85 NEOPHYTETHEME::NEOPHYTETHEME()
86         : Theme()
87 {
88 }
89
90 NEOPHYTETHEME::~NEOPHYTETHEME()
91 {
92         delete camerakeyframe_data;
93         delete channel_position_data;
94         delete keyframe_data;
95         delete maskkeyframe_data;
96         delete modekeyframe_data;
97         delete pankeyframe_data;
98         delete projectorkeyframe_data;
99 }
100
101 void NEOPHYTETHEME::initialize()
102 {
103         //printf("Neophyte::initialize 1\n");
104         BC_Resources *resources = BC_WindowBase::get_resources();
105
106         /* Something own, fitting to the theme and independent of
107            the integrated splash screen/about */
108         // Preferences: About (logo)
109         about_bg = new VFramePng(get_image_data("about_bg.png"));
110         
111         /* Replacement for the heroine icon. Everyone has his 
112            own ideas about this, especially in connection with the 
113            new desktops[tm]. It would be better to solve this globally,
114            irrespective of the theme currently in use. */
115         // /home/olaf/src/cinelerra-gg/cin5/cinelerra-5.1/cinelerra/theme.C-237
116         new_image_set_images("mwindow_icon", 1, new VFramePng(get_image_data("cin_icon_mwin.png")));
117         new_image_set_images("vwindow_icon", 1, new VFramePng(get_image_data("cin_icon_vwin.png")));
118         new_image_set_images("cwindow_icon", 1, new VFramePng(get_image_data("cin_icon_cwin.png")));
119         new_image_set_images("awindow_icon", 1, new VFramePng(get_image_data("cin_icon_awin.png")));
120         new_image_set_images("record_icon",  1, new VFramePng(get_image_data("cin_icon_rec.png")));
121         // Windows without an icon: Camera, Overlays, etc.
122         
123         resources->text_default = CreamyWhite;     // general text color
124         resources->text_background = BlackNineTwo;
125         resources->text_background_disarmed = LockedRed; // arm track locked (!)
126         resources->text_border2 = BlackNineTwo;    // l,t outside
127         resources->text_border1 = BLACK;           // l,t inside
128         resources->text_border3 = BlackSevenTwo;   // r,d inside
129         resources->text_border4 = BlackNineTwo;    // r,d outside
130         resources->text_border2_hi = ComicYellow;  // highlighting on mouseover
131         resources->text_border3_hi = ComicYellow;
132         resources->text_inactive_highlight = BabyBlueDark; /* e.g. Subtitle (double click
133                                                                                                                   on inactive text, choose next or 
134                                                                                                                   prev and be amazed). */
135         resources->text_highlight = BabyBlue;
136   
137         resources->bg_color = BlackEightFive;
138         resources->border_light2 = resources->bg_color;
139         resources->border_shadow2 = resources->bg_color;
140
141         resources->default_text_color = CreamyWhite; // Timeline, dialogs and much more. 
142         resources->menu_title_text = WHITE;          // high contrast
143         resources->popup_title_text = WHITE;
144         resources->menu_item_text = WHITE; 
145
146         resources->menu_highlighted_fontcolor = CreamyWhiteBright;
147         /* This indent is too global and the fullness ultimately depends
148          * on the text. (Pref. top right, engl.: ~17) */
149         resources->generic_button_margin = 20;     // [15]
150         resources->pot_needle_color = CreamyWhite; // [resources->text_default] – marginal
151         resources->pot_offset = 1;                 // only the needle
152         resources->progress_text = resources->text_default;
153         resources->meter_font_color = resources->default_text_color;
154
155         // the following four are overwritten by graphics
156         resources->menu_light = BlackEightFive;  
157         resources->menu_down = ALARM;
158         resources->menu_up = ALARM;
159         resources->menu_shadow = ALARM;
160
161         resources->menu_highlighted = BabyBlue;
162         resources->popupmenu_margin = 15;       // indent, moves the button text to the right
163         resources->popupmenu_triangle_margin = 15;
164
165         resources->listbox_title_color = CreamyWhiteBright; // columns header
166         resources->listbox_title_margin = 15;               // [20] indent
167         resources->listbox_title_hotspot = 15;              // [20]
168
169         resources->listbox_border2 = BlackNineTwo; // as text_border
170         resources->listbox_border1 = BLACK;
171         resources->listbox_border3 = BlackSevenTwo;
172         resources->listbox_border4 = BlackNineTwo;
173         // ../../guicast/bcresources.C:684, highlighting on mouseover
174         resources->listbox_border2_hi = BabyBlue;
175         resources->listbox_border3_hi = BabyBlue;
176
177         resources->listbox_highlighted = BabyBlue;  // recources, loadfiles
178         resources->listbox_inactive = BlackNineTwo; //       background
179         resources->listbox_bg = 0;                  // s.a. ../theme_blond_cv/blondcvtheme.C:249
180         resources->listbox_text = CreamyWhite;
181         resources->listbox_selected = 0x3d5477;     // approximately matches column_hi
182   
183         resources->filebox_margin = 130; // [130]
184         resources->file_color = WHITE;
185         resources->directory_color = BabyBlue;
186
187         // Footage in the timeline
188         title_font = MEDIUMFONT;
189         title_color = WHITE;
190
191         /* Because the colors of the text in the list are fixed.
192            So it is at least uniform. */
193         recordgui_fixed_color = YELLOW;
194         recordgui_variable_color = RED;
195               
196         channel_position_color = ComicYellow; // Set Format, speaker numbers 
197         resources->meter_title_w = 25;
198
199         // (asset) edit info text color
200         edit_font_color = ComicYellow; // ? ../../cinelerra/theme.h:282
201         assetedit_color = CreamyWhiteBright; // variable attributes
202
203         // flash_color = ALARM;          // ../../cinelerra/recordgui.C:135
204         timebar_cursor_color = WHITE; // ../../cinelerra/theme.C:73
205     
206         // tooltip ../../guicast/bcresources.C:786
207         resources->tooltip_bg_color = CreamyWhiteBright;
208         // resources->tooltip_fg_color = ALARM; // undefined.
209         resources->tooltip_delay = 1500; // [1000]
210   
211         /* Waveform of audio tracks.
212            Instead of squeaky [GREEN]. This three are soft, warm and matte:
213            848661 beige, 6d876f green, 665f8a purple */
214         audio_color = 0x6d876f;
215
216         /* Resources: the text overlay location display. Affects 
217            a) Preferences, Performace: BR "Video" (text).
218            b) Render. */
219         resources->audiovideo_color = CreamyWhite; // BlackNineTwo;
220
221         /* ../../guicast/bcresources.C:781 ff.
222            Delays must all be different for repeaters */
223         resources->blink_rate = 750; // [250] - we're not on the run.
224
225         // ../../cinelerra/theme.C:87
226         clock_fg_color = ComicYellow;
227         // clock_bg_color = ALARM; // see vclock
228
229         // The line between the in and out markings
230         inout_highlight_color=BabyBlue;
231
232         new_toggle(
233                 "loadmode_new.png",
234                 "loadmode_up.png",
235                 "loadmode_hi.png",
236                 "loadmode_checked.png",
237                 "loadmode_dn.png",
238                 "loadmode_checkedhi.png",
239                 "loadmode_new");
240         new_toggle(
241                 "loadmode_none.png",
242                 "loadmode_up.png",
243                 "loadmode_hi.png",
244                 "loadmode_checked.png",
245                 "loadmode_dn.png",
246                 "loadmode_checkedhi.png",
247                 "loadmode_none");
248         new_toggle(
249                 "loadmode_newcat.png",
250                 "loadmode_up.png",
251                 "loadmode_hi.png",
252                 "loadmode_checked.png",
253                 "loadmode_dn.png",
254                 "loadmode_checkedhi.png",
255                 "loadmode_newcat");
256         new_toggle(
257                 "loadmode_cat.png",
258                 "loadmode_up.png",
259                 "loadmode_hi.png",
260                 "loadmode_checked.png",
261                 "loadmode_dn.png",
262                 "loadmode_checkedhi.png",
263                 "loadmode_cat");
264         new_toggle(
265                 "loadmode_newtracks.png",
266                 "loadmode_up.png",
267                 "loadmode_hi.png",
268                 "loadmode_checked.png",
269                 "loadmode_dn.png",
270                 "loadmode_checkedhi.png",
271                 "loadmode_newtracks");
272         new_toggle(
273                 "loadmode_paste.png",
274                 "loadmode_up.png",
275                 "loadmode_hi.png",
276                 "loadmode_checked.png",
277                 "loadmode_dn.png",
278                 "loadmode_checkedhi.png",
279                 "loadmode_paste");
280         new_toggle(
281                 "loadmode_resource.png",
282                 "loadmode_up.png",
283                 "loadmode_hi.png",
284                 "loadmode_checked.png",
285                 "loadmode_dn.png",
286                 "loadmode_checkedhi.png",
287                 "loadmode_resource");
288         new_toggle(
289                 "loadmode_nested.png",
290                 "loadmode_up.png",
291                 "loadmode_hi.png",
292                 "loadmode_checked.png",
293                 "loadmode_dn.png",
294                 "loadmode_checkedhi.png",
295                 "loadmode_nested");
296         resources->filebox_icons_images = new_button(
297                 "icons.png",
298                 "fileboxbutton_up.png",
299                 "fileboxbutton_hi.png",
300                 "fileboxbutton_dn.png",
301                 "filebox_icons");
302         resources->filebox_text_images = new_button(
303                 "text.png",
304                 "fileboxbutton_up.png",
305                 "fileboxbutton_hi.png",
306                 "fileboxbutton_dn.png",
307                 "filebox_text");
308         resources->filebox_newfolder_images = new_button(
309                 "folder.png",
310                 "fileboxbutton_up.png",
311                 "fileboxbutton_hi.png",
312                 "fileboxbutton_dn.png",
313                 "filebox_newfolder");
314         resources->filebox_rename_images = new_button(
315                 "rename.png",
316                 "fileboxbutton_up.png",
317                 "fileboxbutton_hi.png",
318                 "fileboxbutton_dn.png",
319                 "filebox_rename");
320         resources->filebox_updir_images = new_button(
321                 "updir.png",
322                 "fileboxbutton_up.png",
323                 "fileboxbutton_hi.png",
324                 "fileboxbutton_dn.png",
325                 "filebox_updir");
326         resources->filebox_delete_images = new_button(
327                 "delete.png",
328                 "fileboxbutton_up.png",
329                 "fileboxbutton_hi.png",
330                 "fileboxbutton_dn.png",
331                 "filebox_delete");
332         resources->filebox_reload_images = new_button(
333                 "reload.png",
334                 "fileboxbutton_up.png",
335                 "fileboxbutton_hi.png",
336                 "fileboxbutton_dn.png",
337                 "filebox_reload");
338         resources->filebox_descend_images = new_button(
339                 "openfolder.png",
340                 "filebox_bigbutton_up.png",
341                 "filebox_bigbutton_hi.png",
342                 "filebox_bigbutton_dn.png",
343                 "filebox_descend");
344         resources->usethis_button_images = resources->ok_images = new_button(
345                 "ok.png",
346                 "filebox_bigbutton_up.png",
347                 "filebox_bigbutton_hi.png",
348                 "filebox_bigbutton_dn.png",
349                 "ok_button");
350         new_button(
351                 "ok.png",
352                 "new_bigbutton_up.png",
353                 "new_bigbutton_hi.png",
354                 "new_bigbutton_dn.png",
355                 "new_ok_images");
356         resources->cancel_images = new_button(
357                 "cancel.png",
358                 "filebox_bigbutton_up.png",
359                 "filebox_bigbutton_hi.png",
360                 "filebox_bigbutton_dn.png",
361                 "cancel_button");
362         new_button(
363                 "cancel.png",
364                 "new_bigbutton_up.png",
365                 "new_bigbutton_hi.png",
366                 "new_bigbutton_dn.png",
367                 "new_cancel_images");
368         // Clock - is not used (AFAIK). See also clock color.
369         // resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
370         //      "0.png",
371         //      "1.png",
372         //      "2.png",
373         //      "3.png",
374         //      "4.png",
375         //      "5.png",
376         //      "6.png",
377         //      "7.png",
378         //      "8.png",
379         //      "9.png",
380         //      "colon.png",
381         //      "period.png",
382         //      "a.png",
383         //      "b.png",
384         //      "c.png",
385         //      "d.png",
386         //      "e.png",
387         //      "f.png",
388         //      "space.png",
389         //      "dash.png");
390
391         resources->bar_data = new_image("bar", "bar.png");
392         resources->check = new_image("check", "check.png");
393
394         resources->min_menu_w = 96;
395         resources->menu_popup_bg = new_image("menu_popup_bg.png");
396         resources->menu_item_bg = new_image_set(
397                 3,
398                 "menuitem_up.png",
399                 "menuitem_hi.png",
400                 "menuitem_dn.png");
401         resources->menu_bar_bg = new_image("menubar_bg.png");
402         resources->menu_title_bg = new_image_set
403                 (3,
404                  "menubar_up.png",
405                  "menubar_hi.png",
406                  "menubar_dn.png");
407         resources->popupmenu_images = 0;
408         // new_image_set(3,
409         // "menupopup_up.png",
410         // "menupopup_hi.png",
411         // "menupopup_dn.png");
412         resources->toggle_highlight_bg = new_image(
413                 "toggle_highlight_bg",
414                 "text_highlight.png");
415         resources->generic_button_images = new_image_set(
416                 3,
417                 "generic_up.png",
418                 "generic_hi.png",
419                 "generic_dn.png");
420         resources->horizontal_slider_data = new_image_set(
421                 6,
422                 "hslider_fg_up.png",
423                 "hslider_fg_hi.png",
424                 "hslider_fg_dn.png",
425                 "hslider_bg_up.png",
426                 "hslider_bg_hi.png",
427                 "hslider_bg_dn.png");
428         resources->vertical_slider_data = new_image_set(
429                 6,
430                 "hslider_fg_up.png",
431                 "hslider_fg_hi.png",
432                 "hslider_fg_dn.png",
433                 "hslider_bg_up.png",
434                 "hslider_bg_hi.png",
435                 "hslider_bg_dn.png");
436   
437         for( int i=0; i<6; ++i )
438                 resources->vertical_slider_data[i]->rotate90();
439
440         resources->progress_images = new_image_set(
441                 2,
442                 "progress_bg.png",
443                 "progress_hi.png");
444         resources->tumble_data = new_image_set(
445                 4,
446                 "tumble_up.png",
447                 "tumble_hi.png",
448                 "tumble_bottom.png",
449                 "tumble_top.png");
450         resources->listbox_button = new_button4(
451                 "listbox_button.png",
452                 "editpanel_up.png",
453                 "editpanel_hi.png",
454                 "editpanel_dn.png",
455                 "editpanel_hi.png",
456                 "listbox_button");
457         // Dialog "Load files…" switch SI/IEC
458         resources->filebox_szfmt_images = new_image_set(
459                 12,
460                 "file_size_zero_up.png",
461                 "file_size_zero_hi.png",
462                 "file_size_zero_dn.png",
463                 "file_size_lwrb_up.png",
464                 "file_size_lwrb_hi.png",
465                 "file_size_lwrb_dn.png",
466                 "file_size_capb_up.png",
467                 "file_size_capb_hi.png",
468                 "file_size_capb_dn.png",
469                 "file_size_semi_up.png",
470                 "file_size_semi_hi.png",
471                 "file_size_semi_dn.png");
472         resources->listbox_column = new_image_set(
473                 3,
474                 "column_up.png",
475                 "column_hi.png",
476                 "column_dn.png");
477         resources->listbox_up = new_image("listbox_up.png");
478         resources->listbox_dn = new_image("listbox_dn.png");
479         resources->pan_data = new_image_set(
480                 7,
481                 "pan_up.png",
482                 "pan_hi.png",
483                 "pan_popup.png",
484                 "pan_channel.png",
485                 "pan_stick.png",
486                 "pan_channel_small.png",
487                 "pan_stick_small.png");
488         resources->pan_text_color = CreamyWhiteBright;
489         resources->pot_images = new_image_set(
490                 3,
491                 "pot_up.png",
492                 "pot_hi.png",
493                 "pot_dn.png");
494         resources->checkbox_images = new_image_set(
495                 5,
496                 "checkbox_up.png",
497                 "checkbox_hi.png",
498                 "checkbox_checked.png",
499                 "checkbox_dn.png",
500                 "checkbox_checkedhi.png");
501         resources->radial_images = new_image_set(
502                 5,
503                 "radial_up.png",
504                 "radial_hi.png",
505                 "radial_checked.png",
506                 "radial_dn.png",
507                 "radial_checkedhi.png");
508         resources->xmeter_images = new_image_set(
509                 7,
510                 "xmeter_normal.png",
511                 "xmeter_green.png",
512                 "xmeter_red.png",
513                 "xmeter_yellow.png",
514                 "xmeter_white.png",
515                 "xmeter_over.png",
516                 "downmix51_2.png");
517         resources->ymeter_images = new_image_set(
518                 7,
519                 "ymeter_normal.png",
520                 "ymeter_green.png",
521                 "ymeter_red.png",
522                 "ymeter_yellow.png",
523                 "ymeter_white.png",
524                 "ymeter_over.png",
525                 "downmix51_2.png");
526         resources->hscroll_data = new_image_set(
527                 10,
528                 "hscroll_handle_up.png",
529                 "hscroll_handle_hi.png",
530                 "hscroll_handle_dn.png",
531                 "hscroll_handle_bg.png",
532                 "hscroll_left_up.png",
533                 "hscroll_left_hi.png",
534                 "hscroll_left_dn.png",
535                 "hscroll_right_up.png",
536                 "hscroll_right_hi.png",
537                 "hscroll_right_dn.png");
538         resources->vscroll_data = new_image_set(
539                 10,
540                 "vscroll_handle_up.png",
541                 "vscroll_handle_hi.png",
542                 "vscroll_handle_dn.png",
543                 "vscroll_handle_bg.png",
544                 "vscroll_left_up.png",
545                 "vscroll_left_hi.png",
546                 "vscroll_left_dn.png",
547                 "vscroll_right_up.png",
548                 "vscroll_right_hi.png",
549                 "vscroll_right_dn.png");
550         resources->scroll_minhandle = 20;
551     
552         new_button(
553                 "prevtip.png", "tipbutton_up.png",
554                 "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
555         new_button(
556                 "nexttip.png", "tipbutton_up.png",
557                 "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
558         new_button(
559                 "closetip.png", "tipbutton_up.png",
560                 "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
561         new_button(
562                 "swap_extents.png", "editpanel_up.png",
563                 "editpanel_hi.png", "editpanel_dn.png", "swap_extents");
564
565         // Record windows
566         preferences_category_overlap = 0;
567         preferencescategory_x = 0;
568         preferencescategory_y = 5;
569         preferencestitle_x = 5;
570         preferencestitle_y = 10;
571         preferencesoptions_x = 5;
572         preferencesoptions_y = 0;
573
574         // MWindow
575         message_normal = resources->text_default;
576
577         mtransport_margin = 10;
578         toggle_margin = 10;
579
580         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png",
581                            "pane");
582         new_image_set("xpane", 3,
583                                   "xpane_up.png",
584                                   "xpane_hi.png",
585                                   "xpane_dn.png");
586         new_image_set("ypane", 3,
587                                   "ypane_up.png",
588                                   "ypane_hi.png",
589                                   "ypane_dn.png");
590
591         new_image("mbutton_bg", "mbutton_bg.png");
592         new_image("timebar_bg", "timebar_bg_flat.png");
593         new_image("timebar_brender", "timebar_brender.png");
594         new_image("clock_bg", "mclock_flat.png");
595         new_image("patchbay_bg", "patchbay_bg.png");
596         new_image("statusbar", "statusbar.png");
597         // new_image("mscroll_filler", "mscroll_filler.png");
598
599         new_image_set("zoombar_menu", 3,
600                                   "zoompopup_up.png",
601                                   "zoompopup_hi.png",
602                                   "zoompopup_dn.png");
603         new_image_set("zoombar_tumbler", 4,
604                                   "zoomtumble_up.png",
605                                   "zoomtumble_hi.png",
606                                   "zoomtumble_bottom.png",
607                                   "zoomtumble_top.png");
608
609         new_image_set("mode_popup", 3,
610                                   "mode_up.png", "mode_hi.png", "mode_dn.png");
611         new_image("mode_add", "mode_add.png");
612         new_image("mode_divide", "mode_divide.png");
613         new_image("mode_multiply", "mode_multiply.png");
614         new_image("mode_normal", "mode_normal.png");
615         new_image("mode_replace", "mode_replace.png");
616         new_image("mode_subtract", "mode_subtract.png");
617         new_image("mode_max", "mode_max.png");
618
619         new_image_set("plugin_on", 5,
620                                   "plugin_on.png",
621                                   "plugin_onhi.png",
622                                   "plugin_onselect.png",
623                                   "plugin_ondn.png",
624                                   "plugin_onselecthi.png");
625         new_image_set("plugin_show", 5,
626                                   "plugin_show.png",
627                                   "plugin_showhi.png",
628                                   "plugin_showselect.png",
629                                   "plugin_showdn.png",
630                                   "plugin_showselecthi.png");
631         
632         // Mixer
633         new_image_set("mixpatch_data", 5,
634                                   "mixpatch_up.png",
635                                   "mixpatch_hi.png",
636                                   "mixpatch_checked.png",
637                                   "mixpatch_dn.png",
638                                   "mixpatch_checkedhi.png");
639         
640         // CWindow
641         new_image("cpanel_bg", "cpanel_bg.png");
642         new_image("cbuttons_left", "cbuttons_left.png");
643         new_image("cbuttons_right", "cbuttons_right.png");
644         new_image("cmeter_bg", "cmeter_bg.png");
645         
646         // VWindow
647         /* The red position indicator is currently only 5 px high.
648            The backgrounds were made according to this. */
649         new_image("vbuttons_left", "vbuttons_left.png");
650         new_image("vbuttons_right", "vbuttons_right.png"); // unset = cbuttons_right
651         new_image("vclock", "vclock.png");
652         //new_image("vmeter_bg", ".png"); // ! 
653   
654         new_image("preferences_bg", "preferences_bg.png");
655
656         new_image("new_bg", "new_bg.png");
657         new_image("setformat_bg", "setformat_bg.png");
658
659         timebar_view_data = new_image("timebar_view.png");
660
661         setformat_w = get_image("setformat_bg")->get_w();
662         setformat_h = get_image("setformat_bg")->get_h();
663         setformat_x1 = 15;
664         setformat_x2 = 110;
665         setformat_x3 = 315;
666         setformat_x4 = 425;
667         setformat_y1 = 20;
668         setformat_y2 = 85;
669         setformat_y3 = 125;
670         setformat_margin = 30;
671         setformat_channels_x = 25;
672         setformat_channels_y = 242;
673         setformat_channels_w = 250;
674         setformat_channels_h = 250;
675
676         loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10;
677         browse_pad = 20;
678
679         new_toggle("playpatch.png",
680                            "playpatch_up.png",
681                            "playpatch_hi.png",
682                            "playpatch_checked.png",
683                            "playpatch_dn.png",
684                            "playpatch_checkedhi.png",
685                            "playpatch_data");
686         new_toggle("recordpatch.png",
687                            "recordpatch_up.png",
688                            "recordpatch_hi.png",
689                            "recordpatch_checked.png",
690                            "recordpatch_dn.png",
691                            "recordpatch_checkedhi.png",
692                            "recordpatch_data");
693         new_toggle("gangpatch.png",
694                            "patch_up.png",
695                            "patch_hi.png",
696                            "patch_checked.png",
697                            "patch_dn.png",
698                            "patch_checkedhi.png",
699                            "gangpatch_data");
700         new_toggle("drawpatch.png",
701                            "patch_up.png",
702                            "patch_hi.png",
703                            "patch_checked.png",
704                            "patch_dn.png",
705                            "patch_checkedhi.png",
706                            "drawpatch_data");
707
708         new_image_set("mutepatch_data",
709                                   5,
710                                   "mutepatch_up.png",
711                                   "mutepatch_hi.png",
712                                   "mutepatch_checked.png",
713                                   "mutepatch_dn.png",
714                                   "mutepatch_checkedhi.png");
715         new_image_set("expandpatch_data",
716                                   5,
717                                   "expandpatch_up.png",
718                                   "expandpatch_hi.png",
719                                   "expandpatch_checked.png",
720                                   "expandpatch_dn.png",
721                                   "expandpatch_checkedhi.png");
722
723         build_bg_data();
724         build_overlays();
725
726         out_point = new_image_set(
727                 5,
728                 "out_up.png",
729                 "out_hi.png",
730                 "out_checked.png",
731                 "out_dn.png",
732                 "out_checkedhi.png");
733         in_point = new_image_set(
734                 5,
735                 "in_up.png",
736                 "in_hi.png",
737                 "in_checked.png",
738                 "in_dn.png",
739                 "in_checkedhi.png");
740         label_toggle = new_image_set(
741                 5,
742                 "labeltoggle_up.png",
743                 "labeltoggle_uphi.png",
744                 "label_checked.png",
745                 "labeltoggle_dn.png",
746                 "label_checkedhi.png");
747         ffmpeg_toggle = new_image_set(
748                 5,
749                 "ff_up.png",
750                 "ff_hi.png",
751                 "ff_checked.png",
752                 "ff_down.png",
753                 "ff_checkedhi.png");
754         proxy_p_toggle = new_image_set(
755                 5,
756                 "proxy_p_up.png",
757                 "proxy_p_hi.png",
758                 "proxy_p_chkd.png",
759                 "proxy_p_down.png",
760                 "proxy_p_chkdhi.png");
761         proxy_s_toggle = new_image_set( // proxy use ffmpeg scaler
762                 5,
763                 "proxy_s_up.png",
764                 "proxy_s_hi.png",
765                 "proxy_s_chkd.png",
766                 "proxy_s_down.png",
767                 "proxy_s_chkdhi.png");
768         shbtn_data = new_image_set(
769                 3,
770                 "shbtn_up.png",
771                 "shbtn_hi.png",
772                 "shbtn_dn.png");
773         new_image_set(
774                 "preset_edit",
775                 3,
776                 "preset_edit0.png",
777                 "preset_edit1.png",
778                 "preset_edit2.png");
779         new_image_set(
780                 "histogram_carrot",
781                 5,
782                 "histogram_carrot_up.png",
783                 "histogram_carrot_hi.png",
784                 "histogram_carrot_checked.png",
785                 "histogram_carrot_dn.png",
786                 "histogram_carrot_checkedhi.png");
787         statusbar_cancel_data = new_image_set(
788                 3,
789                 "statusbar_cancel_up.png",
790                 "statusbar_cancel_hi.png",
791                 "statusbar_cancel_dn.png");
792
793         VFrame *editpanel_up = new_image("editpanel_up.png");
794         VFrame *editpanel_hi = new_image("editpanel_hi.png");
795         VFrame *editpanel_dn = new_image("editpanel_dn.png");
796         VFrame *editpanel_checked = new_image("editpanel_checked.png");
797         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
798
799         new_image("panel_divider", "panel_divider.png");
800         new_button("bottom_justify.png",
801                            editpanel_up, editpanel_hi, editpanel_dn,
802                            "bottom_justify");
803         new_button("center_justify.png",
804                            editpanel_up, editpanel_hi, editpanel_dn,
805                            "center_justify");
806         new_button("channel.png",
807                            editpanel_up, editpanel_hi, editpanel_dn,
808                            "channel");
809         new_button("lok.png", // popup slider
810                            editpanel_up, editpanel_hi, editpanel_dn,
811                            "lok");
812         new_toggle("histogram_toggle.png",
813                            editpanel_up,
814                            editpanel_hi,
815                            editpanel_checked,
816                            editpanel_dn,
817                            editpanel_checkedhi,
818                            "histogram_toggle");
819         new_toggle("histogram_rgb.png",
820                            editpanel_up,
821                            editpanel_hi,
822                            editpanel_checked,
823                            editpanel_dn,
824                            editpanel_checkedhi,
825                            "histogram_rgb_toggle");
826         new_toggle("waveform.png",
827                            editpanel_up,
828                            editpanel_hi,
829                            editpanel_checked,
830                            editpanel_dn,
831                            editpanel_checkedhi,
832                            "waveform_toggle");
833         new_toggle("waveform_rgb.png",
834                            editpanel_up,
835                            editpanel_hi,
836                            editpanel_checked,
837                            editpanel_dn,
838                            editpanel_checkedhi,
839                            "waveform_rgb_toggle");
840         new_toggle("scope.png",
841                            editpanel_up,
842                            editpanel_hi,
843                            editpanel_checked,
844                            editpanel_dn,
845                            editpanel_checkedhi,
846                            "scope_toggle");
847
848         new_button("picture.png",
849                            editpanel_up, editpanel_hi, editpanel_dn,
850                            "picture");
851         new_button("histogram_img.png",
852                            editpanel_up, editpanel_hi, editpanel_dn,
853                            "histogram_img");
854         new_button("copy.png",
855                            editpanel_up, editpanel_hi, editpanel_dn,
856                            "copy");
857         new_button("commercial.png",
858                            editpanel_up, editpanel_hi, editpanel_dn,
859                            "commercial"); // cdb
860         new_button("cut.png",
861                            editpanel_up, editpanel_hi, editpanel_dn,
862                            "cut");
863         new_button("fit.png",
864                            editpanel_up, editpanel_hi, editpanel_dn,
865                            "fit");
866         new_button("fitautos.png",
867                            editpanel_up, editpanel_hi, editpanel_dn,
868                            "fitautos");
869         new_button("inpoint.png",
870                            editpanel_up, editpanel_hi, editpanel_dn,
871                            "inbutton");
872         new_button("label.png",
873                            editpanel_up, editpanel_hi, editpanel_dn,
874                            "labelbutton");
875         new_button("left_justify.png",
876                            editpanel_up, editpanel_hi, editpanel_dn,
877                            "left_justify");
878         new_button("magnify.png",
879                            editpanel_up, editpanel_hi, editpanel_dn,
880                            "magnify_button");
881         new_button("middle_justify.png",
882                            editpanel_up, editpanel_hi, editpanel_dn,
883                            "middle_justify");
884         new_button("nextlabel.png",
885                            editpanel_up, editpanel_hi, editpanel_dn,
886                            "nextlabel");
887         new_button("prevlabel.png",
888                            editpanel_up, editpanel_hi, editpanel_dn,
889                            "prevlabel");
890         new_button("nextedit.png",
891                            editpanel_up, editpanel_hi, editpanel_dn,
892                            "nextedit");
893         new_button("prevedit.png",
894                            editpanel_up, editpanel_hi, editpanel_dn,
895                            "prevedit");
896         new_button("outpoint.png",
897                            editpanel_up, editpanel_hi, editpanel_dn,
898                            "outbutton");
899         over_button = new_button("over.png",
900                                                          editpanel_up, editpanel_hi, editpanel_dn,
901                                                          "overbutton");
902         overwrite_data = new_button("overwrite.png",
903                                                                 editpanel_up, editpanel_hi, editpanel_dn,
904                                                                 "overwritebutton");
905         new_button("paste.png",
906                            editpanel_up, editpanel_hi, editpanel_dn,
907                            "paste");
908         new_button("redo.png",
909                            editpanel_up, editpanel_hi, editpanel_dn,
910                            "redo");
911         new_button("right_justify.png",
912                            editpanel_up, editpanel_hi, editpanel_dn,
913                            "right_justify");
914         splice_data = new_button("splice.png",
915                                                          editpanel_up, editpanel_hi, editpanel_dn,
916                                                          "splicebutton");
917         new_button("toclip.png",
918                            editpanel_up, editpanel_hi, editpanel_dn,
919                            "toclip");
920         new_button("goto.png",
921                            editpanel_up, editpanel_hi, editpanel_dn,
922                            "goto");
923         new_button("top_justify.png",
924                            editpanel_up, editpanel_hi, editpanel_dn,
925                            "top_justify");
926         new_button("undo.png",
927                            editpanel_up, editpanel_hi, editpanel_dn,
928                            "undo");
929         new_button("wrench.png",
930                            editpanel_up, editpanel_hi, editpanel_dn,
931                            "wrench");
932
933         VFrame *transport_up = new_image("transportup.png");
934         VFrame *transport_hi = new_image("transporthi.png");
935         VFrame *transport_dn = new_image("transportdn.png");
936
937         new_button("end.png",
938                            transport_up, transport_hi, transport_dn,
939                            "end");
940         new_button("fastfwd.png",
941                            transport_up, transport_hi, transport_dn,
942                            "fastfwd");
943         new_button("fastrev.png",
944                            transport_up, transport_hi, transport_dn,
945                            "fastrev");
946         new_button("play.png",
947                            transport_up, transport_hi, transport_dn,
948                            "play");
949         new_button("framefwd.png",
950                            transport_up, transport_hi, transport_dn,
951                            "framefwd");
952         new_button("framerev.png",
953                            transport_up, transport_hi, transport_dn,
954                            "framerev");
955         new_button("pause.png",
956                            transport_up, transport_hi, transport_dn,
957                            "pause");
958         new_button("record.png",
959                            transport_up, transport_hi, transport_dn,
960                            "record");
961         new_button("singleframe.png",
962                            transport_up, transport_hi, transport_dn,
963                            "recframe");
964         new_button("reverse.png",
965                            transport_up, transport_hi, transport_dn,
966                            "reverse");
967         new_button("rewind.png",
968                            transport_up, transport_hi, transport_dn,
969                            "rewind");
970         new_button("stop.png",
971                            transport_up, transport_hi, transport_dn,
972                            "stop");
973         new_button("stop.png",
974                            transport_up, transport_hi, transport_dn,
975                            "stoprec");
976
977         // CWindow icons (led)
978         new_image("cwindow_inactive", "cwindow_inactive.png");
979         new_image("cwindow_active", "cwindow_active.png");
980
981         new_image_set("category_button",
982                                   3,
983                                   "preferencesbutton_dn.png",
984                                   "preferencesbutton_dnhi.png",
985                                   "preferencesbutton_dnlo.png");
986         new_image_set("category_button_checked",
987                                   3,
988                                   "preferencesbutton_up.png",
989                                   "preferencesbutton_uphi.png",
990                                   "preferencesbutton_dnlo.png");
991         new_image_set("color3way_point",
992                                   3,
993                                   "color3way_up.png",
994                                   "color3way_hi.png",
995                                   "color3way_dn.png");
996
997         new_toggle("arrow.png",
998                            editpanel_up, editpanel_hi, editpanel_checked,
999                            editpanel_dn, editpanel_checkedhi,
1000                            "arrow");
1001         new_toggle("autokeyframe.png",
1002                            transport_up, editpanel_hi, editpanel_checked,
1003                            editpanel_dn, editpanel_checkedhi,
1004                            "autokeyframe");
1005         new_toggle("ibeam.png",
1006                            editpanel_up, editpanel_hi, editpanel_checked,
1007                            editpanel_dn, editpanel_checkedhi,
1008                            "ibeam");
1009         new_toggle("show_meters.png",
1010                            editpanel_up, editpanel_hi, editpanel_checked,
1011                            editpanel_dn, editpanel_checkedhi,
1012                            "meters");
1013         new_toggle("blank30x30.png",
1014                            new_image("locklabels_locked.png"),
1015                            new_image("locklabels_lockedhi.png"),
1016                            new_image("locklabels_unlocked.png"),
1017                            new_image("locklabels_dn.png"), // can't have seperate down for each!!??
1018                            new_image("locklabels_unlockedhi.png"),
1019                            "locklabels");
1020
1021         VFrame *cpanel_up = new_image("cpanel_up.png");
1022         VFrame *cpanel_hi = new_image("cpanel_hi.png");
1023         VFrame *cpanel_dn = new_image("cpanel_dn.png");
1024         VFrame *cpanel_checked = new_image("cpanel_checked.png");
1025         VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
1026
1027         new_toggle("camera.png",
1028                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1029                            "camera");
1030         new_toggle("crop.png",
1031                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1032                            "crop");
1033         new_toggle("eyedrop.png",
1034                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1035                            "eyedrop");
1036         new_toggle("magnify.png",
1037                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1038                            "magnify");
1039         new_toggle("mask.png",
1040                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1041                            "mask");
1042         new_toggle("ruler.png",
1043                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1044                            "ruler");
1045         new_toggle("projector.png",
1046                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1047                            "projector");
1048         new_toggle("protect.png",
1049                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1050                            "protect");
1051         new_toggle("titlesafe.png",
1052                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1053                            "titlesafe");
1054         new_toggle("toolwindow.png",
1055                            cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1056                            "tool");
1057         // toggle for tangent mode (compositor/tool window)
1058         new_toggle("tan_smooth.png",
1059                            editpanel_up, editpanel_hi, editpanel_checked,
1060                            editpanel_dn, editpanel_checkedhi,
1061                            "tan_smooth");
1062         new_toggle("tan_linear.png",
1063                            editpanel_up, editpanel_hi, editpanel_checked,
1064                            editpanel_dn, editpanel_checkedhi,
1065                            "tan_linear");
1066
1067         flush_images();
1068 }
1069
1070 // Re-align the Clock. theme.c:931 
1071 void NEOPHYTETHEME::get_vwindow_sizes(VWindowGUI *gui)
1072 {
1073         int edit_w = EditPanel::calculate_w(mwindow, 0, 10);
1074         int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin;
1075         vtimebar_h = 16;       // The height of the position indicator
1076         int division_w = 30;
1077         
1078         /* For the deco, [150]-10. The remaining space should theoretically
1079            suffice for 999,999:59:59.960 hours. Total size: 140 x 26, where
1080            a height of 24 or 22 px would be nicer. */
1081         vtime_w = 140;
1082         
1083         /* Indent, flat. Larger indentation also puts
1084            the 35% view into the compact view. */
1085         int vtime_border = 15; 
1086   
1087         vmeter_y = widget_border;
1088         vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border;
1089
1090         int buttons_h;
1091         if (mwindow->edl->session->vwindow_meter) {
1092                 vmeter_x = mwindow->session->vwindow_w -
1093                         MeterPanel::get_meters_width(this,
1094                                                                                  mwindow->edl->session->audio_channels,
1095                                                                                  mwindow->edl->session->vwindow_meter);
1096         } else {
1097                 vmeter_x = mwindow->session->vwindow_w + widget_border;
1098         }
1099
1100         vcanvas_x = 0;
1101         vcanvas_y = 0;
1102         vcanvas_w = vmeter_x - vcanvas_x - widget_border;
1103
1104         if (edit_w +
1105                 widget_border * 2 +
1106                 transport_w + widget_border +
1107                 vtime_w + division_w +
1108                 vtime_border > vmeter_x) {
1109                 buttons_h = get_image("vbuttons_left")->get_h();
1110                 vedit_x = widget_border;
1111                 vedit_y = mwindow->session->vwindow_h -
1112                         buttons_h +
1113                         vtimebar_h +
1114                         widget_border;
1115
1116                 vtransport_x = widget_border;
1117                 vtransport_y = mwindow->session->vwindow_h -
1118                         get_image_set("autokeyframe")[0]->get_h() -
1119                         widget_border;
1120
1121                 vdivision_x = 280;      // field width, compact
1122                 vtime_x = vedit_x + 38; // concentric
1123                 vtime_y = vedit_y + 24; // vertical alignment
1124         } else {
1125                 buttons_h = vtimebar_h +
1126                         widget_border +
1127                         EditPanel::calculate_h(mwindow) +
1128                         widget_border;
1129                 vtransport_x = widget_border;
1130                 vtransport_y = mwindow->session->vwindow_h -
1131                         buttons_h +
1132                         vtimebar_h +
1133                         widget_border;
1134
1135                 vedit_x = vtransport_x + transport_w + widget_border;
1136                 vedit_y = vtransport_y;
1137
1138                 vdivision_x = vedit_x + edit_w + division_w;
1139                 vtime_x = vdivision_x + vtime_border;
1140                 vtime_y = vedit_y + widget_border - 7; // vertical height concentric at button height
1141         }
1142
1143         // vtimebar_x = vcanvas_x;
1144         // vtimebar_y = vcanvas_y + vcanvas_h;
1145         // vtimebar_w = vcanvas_w;
1146
1147         vcanvas_h = mwindow->session->vwindow_h - buttons_h;
1148         vtimebar_x = 0;
1149         vtimebar_y = vcanvas_y + vcanvas_h;
1150         vtimebar_w = vmeter_x - widget_border;
1151 }
1152
1153 void NEOPHYTETHEME::build_bg_data()
1154 {
1155         // Audio settings
1156         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1157         // Track bitmaps
1158         new_image("resource1024", "resource1024.png");
1159         new_image("resource512", "resource512.png");
1160         new_image("resource256", "resource256.png");
1161         new_image("resource128", "resource128.png");
1162         new_image("resource64", "resource64.png");
1163         new_image("resource32", "resource32.png");
1164         new_image("plugin_bg_data", "plugin_bg.png");
1165         new_image("title_bg_data", "title_bg.png");
1166         new_image("vtimebar_bg_data", "vwindow_timebar.png");
1167 }
1168
1169 void NEOPHYTETHEME::build_overlays()
1170 {
1171         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1172         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1173         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1174         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1175         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1176         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1177 }
1178
1179 void NEOPHYTETHEME::draw_rwindow_bg(RecordGUI *gui)
1180 {
1181         // int y;
1182         // int margin = 50;
1183         // int margin2 = 80;
1184         // gui->draw_9segment(recordgui_batch_x - margin,
1185         //      0,
1186         //      mwindow->session->rwindow_w - recordgui_status_x + margin,
1187         //      recordgui_buttons_y,
1188         //      rgui_batch);
1189         // gui->draw_3segmenth(recordgui_options_x - margin2,
1190         //      recordgui_buttons_y - 5,
1191         //      mwindow->session->rwindow_w - recordgui_options_x + margin2,
1192         //      rgui_controls);
1193         // y = recordgui_buttons_y - 5 + rgui_controls->get_h();
1194         // gui->draw_9segment(0,
1195         //      y,
1196         //      mwindow->session->rwindow_w,
1197         //      mwindow->session->rwindow_h - y,
1198         //      rgui_list);
1199 }
1200
1201 void NEOPHYTETHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
1202 {
1203         // int margin = 45;
1204         // int panel_w = 300;
1205         // int x = rmonitor_meter_x - margin;
1206         // int w = mwindow->session->rmonitor_w - x;
1207         // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1208         // gui->clear_box(0,
1209         //      0,
1210         //      mwindow->session->rmonitor_w,
1211         //      mwindow->session->rmonitor_h);
1212         // gui->draw_9segment(x,
1213         //      0,
1214         //      w,
1215         //      mwindow->session->rmonitor_h,
1216         //      rmonitor_meters);
1217 }
1218
1219 void NEOPHYTETHEME::draw_mwindow_bg(MWindowGUI *gui)
1220 {
1221         // Button bar
1222         gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
1223                                                 gui->menu_w(), get_image("mbutton_bg"));
1224
1225         int pdw = get_image("panel_divider")->get_w();
1226         int x = mbuttons_x;
1227         x += 9 * get_image("play")->get_w();
1228         x += mtransport_margin;                                     // the control buttons
1229
1230         gui->draw_vframe(get_image("panel_divider"),
1231                                          x - toggle_margin / 2 - pdw / 2 + 2,
1232                                          mbuttons_y - 1);
1233         x += 2 * get_image("arrow")->get_w() + toggle_margin;       // the mode buttons
1234
1235         gui->draw_vframe(get_image("panel_divider"),
1236                                          x - toggle_margin / 2 - pdw / 2 + 2,
1237                                          mbuttons_y - 1);
1238
1239         x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
1240         gui->draw_vframe(get_image("panel_divider"),
1241                                          x - toggle_margin / 2 - pdw / 2 + 2,
1242                                          mbuttons_y - 1);
1243         // Clock
1244         gui->draw_3segmenth(0,
1245                                                 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1246                                                 get_image("patchbay_bg")->get_w(),
1247                                                 get_image("clock_bg"));
1248         // Patchbay
1249         gui->draw_3segmentv(patchbay_x,
1250                                                 patchbay_y,
1251                                                 patchbay_h,
1252                                                 get_image("patchbay_bg"));
1253         // Track canvas
1254         gui->set_color(BLACK);
1255         gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1256                                   mcanvas_y + mtimebar_h,
1257                                   mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1258                                   mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1259         // Timebar
1260         gui->draw_3segmenth(mtimebar_x,
1261                                                 mtimebar_y,
1262                                                 mtimebar_w,
1263                                                 get_image("timebar_bg"));
1264         // Zoombar
1265         gui->set_color(BlackNineTwo);
1266         gui->draw_box(mzoom_x,
1267                                   mzoom_y,
1268                                   mwindow->session->mwindow_w,
1269                                   25);
1270         // Scrollbar filler
1271         // gui->draw_vframe(get_image("mscroll_filler"),
1272         //                  mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1273         //                  mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
1274
1275         // Status
1276         gui->draw_3segmenth(mzoom_x,
1277                                                 mzoom_y,
1278                                                 mzoom_w,
1279                                                 get_image("statusbar"));
1280 }
1281
1282 void NEOPHYTETHEME::draw_cwindow_bg(CWindowGUI *gui)
1283 {
1284         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1285
1286         gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1287
1288         if(mwindow->edl->session->cwindow_meter)
1289         {
1290                 gui->draw_3segmenth(cstatus_x,
1291                                                         ccomposite_h,
1292                                                         cmeter_x - widget_border - cstatus_x,
1293                                                         get_image("cbuttons_right"));
1294                 gui->draw_9segment(cmeter_x - widget_border,
1295                                                    0,
1296                                                    mwindow->session->cwindow_w - cmeter_x + widget_border,
1297                                                    mwindow->session->cwindow_h,
1298                                                    get_image("cmeter_bg"));
1299         } else {
1300                 gui->draw_3segmenth(cstatus_x,
1301                                                         ccomposite_h,
1302                                                         cmeter_x - widget_border - cstatus_x + 100,
1303                                                         get_image("cbuttons_right"));
1304         }
1305 }
1306
1307 void NEOPHYTETHEME::draw_vwindow_bg(VWindowGUI *gui)
1308 {
1309         gui->draw_3segmenth(0,
1310                                                 vcanvas_h,
1311                                                 vdivision_x,
1312                                                 get_image("vbuttons_left"));
1313         if(mwindow->edl->session->vwindow_meter)
1314         {
1315                 gui->draw_3segmenth(vdivision_x,
1316                                                         vcanvas_h,
1317                                                         vmeter_x - widget_border - vdivision_x,
1318                                                         get_image("vbuttons_right"));
1319                 gui->draw_9segment(vmeter_x - widget_border,
1320                                                    0,
1321                                                    mwindow->session->vwindow_w - vmeter_x + widget_border,
1322                                                    mwindow->session->vwindow_h,
1323                                                    get_image("cmeter_bg"));
1324         } else {
1325                 gui->draw_3segmenth(vdivision_x,
1326                                                         vcanvas_h,
1327                                                         vmeter_x - widget_border - vdivision_x + 100,
1328                                                         get_image("vbuttons_right"));
1329         }
1330
1331         // Clock deco
1332         gui->draw_3segmenth(
1333                 vtime_x - 5,  // -left, +right 
1334                 vtime_y + 0,  // -up, +down. Careful, move some of the buttons as well.
1335                 vtime_w + 10, // protruded l/r x*2
1336                 get_image("vclock"));
1337
1338 }
1339
1340 void NEOPHYTETHEME::draw_preferences_bg(PreferencesWindow *gui)
1341 {
1342         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1343 }
1344
1345 void NEOPHYTETHEME::draw_new_bg(NewWindow *gui)
1346 {
1347         gui->draw_vframe(get_image("new_bg"), 0, 0);
1348 }
1349
1350 void NEOPHYTETHEME::draw_setformat_bg(SetFormatWindow *gui)
1351 {
1352         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1353 }