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