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