4 * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5 * by Paolo Rampino <info at tuttoainternet dot it>
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.
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.
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
23 #include "bcsignals.h"
25 #include "cwindowgui.h"
28 #include "edlsession.h"
30 #include "mainsession.h"
32 #include "meterpanel.h"
34 #include "mwindowgui.h"
37 #include "preferencesthread.h"
38 #include "recordgui.h"
39 #include "recordmonitor.h"
40 #include "setformat.h"
41 #include "statusbar.h"
43 #include "trackcanvas.h"
45 #include "vwindowgui.h"
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
61 PluginClient* new_plugin(PluginServer *server)
63 return new NEOPHYTETHEMEMain(server);
66 NEOPHYTETHEMEMain::NEOPHYTETHEMEMain(PluginServer *server)
67 : PluginTClient(server)
71 NEOPHYTETHEMEMain::~NEOPHYTETHEMEMain()
75 const char* NEOPHYTETHEMEMain::plugin_title() { return N_("Neophyte"); }
77 Theme* NEOPHYTETHEMEMain::new_theme()
79 theme = new NEOPHYTETHEME;
80 extern unsigned char _binary_theme_neophyte_data_start[];
81 theme->set_data(_binary_theme_neophyte_data_start);
85 NEOPHYTETHEME::NEOPHYTETHEME()
90 NEOPHYTETHEME::~NEOPHYTETHEME()
92 delete camerakeyframe_data;
93 delete channel_position_data;
95 delete maskkeyframe_data;
96 delete modekeyframe_data;
98 delete pankeyframe_data;
99 delete projectorkeyframe_data;
102 void NEOPHYTETHEME::initialize()
104 //printf("Neophyte::initialize 1\n");
105 BC_Resources *resources = BC_WindowBase::get_resources();
107 /* Something own, fitting to the theme and independent of
108 the integrated splash screen/about */
109 // Preferences: About (logo)
111 about_bg = new VFramePng(get_image_data("about_bg.png"));
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.
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;
139 resources->bg_color = BlackEightFive;
140 resources->border_light2 = resources->bg_color;
141 resources->border_shadow2 = resources->bg_color;
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;
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 = xS(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;
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;
163 resources->menu_highlighted = BabyBlue;
164 resources->popupmenu_margin = xS(15); // indent, moves the button text to the right
165 resources->popupmenu_triangle_margin = xS(15);
167 resources->listbox_title_color = CreamyWhiteBright; // columns header
168 resources->listbox_title_margin = xS(15); // [20] indent
169 resources->listbox_title_hotspot = xS(15); // [20]
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;
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
185 resources->filebox_margin = yS(130); // [130]
186 resources->file_color = WHITE;
187 resources->directory_color = BabyBlue;
189 // Footage in the timeline
190 title_font = MEDIUMFONT;
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;
198 channel_position_color = ComicYellow; // Set Format, speaker numbers
199 resources->meter_title_w = xS(28);
201 // (asset) edit info text color
202 edit_font_color = ComicYellow; // ? ../../cinelerra/theme.h:282
203 assetedit_color = CreamyWhiteBright; // variable attributes
205 // flash_color = ALARM; // ../../cinelerra/recordgui.C:135
206 timebar_cursor_color = WHITE; // ../../cinelerra/theme.C:73
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]
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;
218 /* Resources: the text overlay location display. Affects
219 a) Preferences, Performace: BR "Video" (text).
221 resources->audiovideo_color = CreamyWhite; // BlackNineTwo;
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.
227 // ../../cinelerra/theme.C:87
228 clock_fg_color = ComicYellow;
229 // clock_bg_color = ALARM; // see vclock
231 // The line between the in and out markings
232 inout_highlight_color=BabyBlue;
238 "loadmode_checked.png",
240 "loadmode_checkedhi.png",
246 "loadmode_checked.png",
248 "loadmode_checkedhi.png",
251 "loadmode_newcat.png",
254 "loadmode_checked.png",
256 "loadmode_checkedhi.png",
262 "loadmode_checked.png",
264 "loadmode_checkedhi.png",
267 "loadmode_newtracks.png",
270 "loadmode_checked.png",
272 "loadmode_checkedhi.png",
273 "loadmode_newtracks");
275 "loadmode_paste.png",
278 "loadmode_checked.png",
280 "loadmode_checkedhi.png",
283 "loadmode_resource.png",
286 "loadmode_checked.png",
288 "loadmode_checkedhi.png",
289 "loadmode_resource");
292 "loadmode_edl_clip.png",
295 "loadmode_checked.png",
297 "loadmode_checkedhi.png",
298 "loadmode_edl_clip");
300 "loadmode_edl_nested.png",
303 "loadmode_checked.png",
305 "loadmode_checkedhi.png",
306 "loadmode_edl_nested");
308 "loadmode_edl_fileref.png",
311 "loadmode_checked.png",
313 "loadmode_checkedhi.png",
314 "loadmode_edl_fileref");
316 resources->filebox_icons_images = new_button(
318 "fileboxbutton_up.png",
319 "fileboxbutton_hi.png",
320 "fileboxbutton_dn.png",
322 resources->filebox_text_images = new_button(
324 "fileboxbutton_up.png",
325 "fileboxbutton_hi.png",
326 "fileboxbutton_dn.png",
328 resources->filebox_newfolder_images = new_button(
330 "fileboxbutton_up.png",
331 "fileboxbutton_hi.png",
332 "fileboxbutton_dn.png",
333 "filebox_newfolder");
334 resources->filebox_rename_images = new_button(
336 "fileboxbutton_up.png",
337 "fileboxbutton_hi.png",
338 "fileboxbutton_dn.png",
340 resources->filebox_updir_images = new_button(
342 "fileboxbutton_up.png",
343 "fileboxbutton_hi.png",
344 "fileboxbutton_dn.png",
346 resources->filebox_delete_images = new_button(
348 "fileboxbutton_up.png",
349 "fileboxbutton_hi.png",
350 "fileboxbutton_dn.png",
352 resources->filebox_reload_images = new_button(
354 "fileboxbutton_up.png",
355 "fileboxbutton_hi.png",
356 "fileboxbutton_dn.png",
358 resources->filebox_descend_images = new_button(
360 "filebox_bigbutton_up.png",
361 "filebox_bigbutton_hi.png",
362 "filebox_bigbutton_dn.png",
364 resources->usethis_button_images = resources->ok_images = new_button(
366 "filebox_bigbutton_up.png",
367 "filebox_bigbutton_hi.png",
368 "filebox_bigbutton_dn.png",
372 "new_bigbutton_up.png",
373 "new_bigbutton_hi.png",
374 "new_bigbutton_dn.png",
388 new_button("keyframe.png",
394 resources->cancel_images = new_button(
396 "filebox_bigbutton_up.png",
397 "filebox_bigbutton_hi.png",
398 "filebox_bigbutton_dn.png",
402 "new_bigbutton_up.png",
403 "new_bigbutton_hi.png",
404 "new_bigbutton_dn.png",
405 "new_cancel_images");
407 new_button("mask_pnt_linear.png",
408 "mask_button_up.png",
409 "mask_button_hi.png",
410 "mask_button_dn.png",
411 "mask_pnt_linear_images");
412 new_button("mask_crv_linear.png",
413 "mask_button_up.png",
414 "mask_button_hi.png",
415 "mask_button_dn.png",
416 "mask_crv_linear_images");
417 new_button("mask_all_linear.png",
418 "mask_button_up.png",
419 "mask_button_hi.png",
420 "mask_button_dn.png",
421 "mask_all_linear_images");
423 new_button("mask_pnt_smooth.png",
424 "mask_button_up.png",
425 "mask_button_hi.png",
426 "mask_button_dn.png",
427 "mask_pnt_smooth_images");
428 new_button("mask_crv_smooth.png",
429 "mask_button_up.png",
430 "mask_button_hi.png",
431 "mask_button_dn.png",
432 "mask_crv_smooth_images");
433 new_button("mask_all_smooth.png",
434 "mask_button_up.png",
435 "mask_button_hi.png",
436 "mask_button_dn.png",
437 "mask_all_smooth_images");
439 new_button("mask_prst_sqr.png",
440 "mask_button_up.png",
441 "mask_button_hi.png",
442 "mask_button_dn.png",
443 "mask_prst_sqr_images");
444 new_button("mask_prst_crc.png",
445 "mask_button_up.png",
446 "mask_button_hi.png",
447 "mask_button_dn.png",
448 "mask_prst_crc_images");
449 new_button("mask_prst_tri.png",
450 "mask_button_up.png",
451 "mask_button_hi.png",
452 "mask_button_dn.png",
453 "mask_prst_tri_images");
454 new_button("mask_prst_ovl.png",
455 "mask_button_up.png",
456 "mask_button_hi.png",
457 "mask_button_dn.png",
458 "mask_prst_ovl_images");
460 new_button("mask_prst_load.png",
461 "mask_button_up.png",
462 "mask_button_hi.png",
463 "mask_button_dn.png",
464 "mask_prst_load_images");
465 new_button("mask_prst_save.png",
466 "mask_button_up.png",
467 "mask_button_hi.png",
468 "mask_button_dn.png",
469 "mask_prst_save_images");
470 new_button("mask_prst_trsh.png",
471 "mask_button_up.png",
472 "mask_button_hi.png",
473 "mask_button_dn.png",
474 "mask_prst_trsh_images");
476 new_button("mask_pstn_cen.png",
477 "mask_button_up.png",
478 "mask_button_hi.png",
479 "mask_button_dn.png",
480 "mask_pstn_cen_images");
481 new_button("mask_pstn_nrm.png",
482 "mask_button_up.png",
483 "mask_button_hi.png",
484 "mask_button_dn.png",
485 "mask_pstn_nrm_images");
487 // Clock - is not used (AFAIK). See also clock color.
488 // resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
489 // "0.png", "1.png", "2.png", "3.png", "4.png", "5.png", "6.png", "7.png",
490 // "8.png", "9.png", "colon.png", "period.png", "a.png", "b.png", "c.png",
491 // "d.png", "e.png", "f.png", "space.png", "dash.png");
493 resources->bar_data = new_image("bar", "bar.png");
494 resources->check = new_image("check", "check.png");
496 resources->min_menu_w = xS(96);
497 resources->menu_popup_bg = new_image("menu_popup_bg.png");
498 resources->menu_item_bg = new_image_set(
503 resources->menu_bar_bg = new_image("menubar_bg.png");
504 resources->menu_title_bg = new_image_set
509 resources->popupmenu_images = 0;
511 // "menupopup_up.png",
512 // "menupopup_hi.png",
513 // "menupopup_dn.png");
514 resources->toggle_highlight_bg = new_image(
515 "toggle_highlight_bg",
516 "text_highlight.png");
517 resources->generic_button_images = new_image_set(
522 resources->horizontal_slider_data = new_image_set(
529 "hslider_bg_dn.png");
530 resources->vertical_slider_data = new_image_set(
537 "hslider_bg_dn.png");
539 for( int i=0; i<6; ++i )
540 resources->vertical_slider_data[i]->rotate90();
542 resources->progress_images = new_image_set(
546 resources->tumble_data = new_image_set(
552 resources->listbox_button = new_button4(
553 "listbox_button.png",
559 // Dialog "Load files…" switch SI/IEC
560 resources->filebox_szfmt_images = new_image_set(
562 "file_size_zero_up.png",
563 "file_size_zero_hi.png",
564 "file_size_zero_dn.png",
565 "file_size_lwrb_up.png",
566 "file_size_lwrb_hi.png",
567 "file_size_lwrb_dn.png",
568 "file_size_capb_up.png",
569 "file_size_capb_hi.png",
570 "file_size_capb_dn.png",
571 "file_size_semi_up.png",
572 "file_size_semi_hi.png",
573 "file_size_semi_dn.png");
574 resources->listbox_column = new_image_set(
579 resources->listbox_up = new_image("listbox_up.png");
580 resources->listbox_dn = new_image("listbox_dn.png");
581 resources->pan_data = new_image_set(
588 "pan_channel_small.png",
589 "pan_stick_small.png");
590 resources->pan_text_color = CreamyWhiteBright;
591 resources->pot_images = new_image_set(
596 resources->checkbox_images = new_image_set(
600 "checkbox_checked.png",
602 "checkbox_checkedhi.png");
603 resources->radial_images = new_image_set(
607 "radial_checked.png",
609 "radial_checkedhi.png");
610 resources->xmeter_images = new_image_set(
619 resources->ymeter_images = new_image_set(
628 resources->hscroll_data = new_image_set(
630 "hscroll_handle_up.png",
631 "hscroll_handle_hi.png",
632 "hscroll_handle_dn.png",
633 "hscroll_handle_bg.png",
634 "hscroll_left_up.png",
635 "hscroll_left_hi.png",
636 "hscroll_left_dn.png",
637 "hscroll_right_up.png",
638 "hscroll_right_hi.png",
639 "hscroll_right_dn.png");
640 resources->vscroll_data = new_image_set(
642 "vscroll_handle_up.png",
643 "vscroll_handle_hi.png",
644 "vscroll_handle_dn.png",
645 "vscroll_handle_bg.png",
646 "vscroll_left_up.png",
647 "vscroll_left_hi.png",
648 "vscroll_left_dn.png",
649 "vscroll_right_up.png",
650 "vscroll_right_hi.png",
651 "vscroll_right_dn.png");
652 resources->scroll_minhandle = 20;
655 "prevtip.png", "tipbutton_up.png",
656 "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
658 "nexttip.png", "tipbutton_up.png",
659 "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
661 "closetip.png", "tipbutton_up.png",
662 "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
664 "swap_extents.png", "editpanel_up.png",
665 "editpanel_hi.png", "editpanel_dn.png", "swap_extents");
668 preferences_category_overlap = 0;
669 preferencescategory_x = 0;
670 preferencescategory_y = yS(5);
671 preferencestitle_x = xS(5);
672 preferencestitle_y = yS(10);
673 preferencesoptions_x = xS(5);
674 preferencesoptions_y = 0;
677 message_normal = resources->text_default;
679 mtransport_margin = xS(10);
680 toggle_margin = xS(10);
682 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png",
684 new_image_set("xpane", 3,
688 new_image_set("ypane", 3,
693 new_image("mbutton_bg", "mbutton_bg.png");
694 new_image("timebar_bg", "timebar_bg_flat.png");
695 new_image("timebar_brender", "timebar_brender.png");
696 new_image("clock_bg", "mclock_flat.png");
697 new_image("patchbay_bg", "patchbay_bg.png");
698 new_image("statusbar", "statusbar.png");
699 // new_image("mscroll_filler", "mscroll_filler.png");
701 new_image_set("zoombar_menu", 3,
705 new_image_set("zoombar_tumbler", 4,
708 "zoomtumble_bottom.png",
709 "zoomtumble_top.png");
711 new_image_set("mode_popup", 3,
712 "mode_up.png", "mode_hi.png", "mode_dn.png");
713 new_image("mode_add", "mode_add.png");
714 new_image("mode_divide", "mode_divide.png");
715 new_image("mode_multiply", "mode_multiply.png");
716 new_image("mode_normal", "mode_normal.png");
717 new_image("mode_replace", "mode_replace.png");
718 new_image("mode_subtract", "mode_subtract.png");
719 new_image("mode_max", "mode_max.png");
721 new_image_set("plugin_on", 5,
724 "plugin_onselect.png",
726 "plugin_onselecthi.png");
727 new_image_set("plugin_show", 5,
730 "plugin_showselect.png",
732 "plugin_showselecthi.png");
735 new_image_set("mixpatch_data", 5,
738 "mixpatch_checked.png",
740 "mixpatch_checkedhi.png");
743 new_image("cpanel_bg", "cpanel_bg.png");
744 new_image("cbuttons_left", "cbuttons_left.png");
745 new_image("cbuttons_right", "cbuttons_right.png");
746 new_image("cmeter_bg", "cmeter_bg.png");
747 new_image("cwindow_focus", "cwindow_focus.png");
750 /* The red position indicator is currently only 5 px high.
751 The backgrounds were made according to this. */
752 new_image("vbuttons_left", "vbuttons_left.png");
753 new_image("vbuttons_right", "vbuttons_right.png"); // unset = cbuttons_right
754 new_image("vclock", "vclock.png");
755 //new_image("vmeter_bg", ".png"); // !
757 new_image("preferences_bg", "preferences_bg.png");
759 new_image("new_bg", "new_bg.png");
760 new_image("setformat_bg", "setformat_bg.png");
762 timebar_view_data = new_image("timebar_view.png");
764 setformat_w = get_image("setformat_bg")->get_w();
765 setformat_h = get_image("setformat_bg")->get_h();
766 setformat_x1 = xS(15);
767 setformat_x2 = xS(110);
768 setformat_x3 = xS(315);
769 setformat_x4 = xS(425);
770 setformat_y1 = yS(20);
771 setformat_y2 = yS(85);
772 setformat_y3 = yS(125);
773 setformat_margin = xS(30);
774 setformat_channels_x = xS(25);
775 setformat_channels_y = yS(242);
776 setformat_channels_w = xS(250);
777 setformat_channels_h = yS(250);
779 loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + yS(10);
782 new_toggle("playpatch.png",
785 "playpatch_checked.png",
787 "playpatch_checkedhi.png",
789 new_toggle("recordpatch.png",
790 "recordpatch_up.png",
791 "recordpatch_hi.png",
792 "recordpatch_checked.png",
793 "recordpatch_dn.png",
794 "recordpatch_checkedhi.png",
796 new_toggle("gangpatch.png",
801 "patch_checkedhi.png",
803 new_toggle("drawpatch.png",
808 "patch_checkedhi.png",
811 new_image_set("mutepatch_data",
815 "mutepatch_checked.png",
817 "mutepatch_checkedhi.png");
818 new_image_set("expandpatch_data",
820 "expandpatch_up.png",
821 "expandpatch_hi.png",
822 "expandpatch_checked.png",
823 "expandpatch_dn.png",
824 "expandpatch_checkedhi.png");
829 out_point = new_image_set(
835 "out_checkedhi.png");
836 in_point = new_image_set(
843 label_toggle = new_image_set(
845 "labeltoggle_up.png",
846 "labeltoggle_uphi.png",
848 "labeltoggle_dn.png",
849 "label_checkedhi.png");
850 ffmpeg_toggle = new_image_set(
857 proxy_p_toggle = new_image_set(
863 "proxy_p_chkdhi.png");
864 proxy_s_toggle = new_image_set( // proxy use ffmpeg scaler
870 "proxy_s_chkdhi.png");
871 mask_mode_toggle = new_image_set(5,
874 "mask_mode_chkd.png",
875 "mask_mode_down.png",
876 "mask_mode_chkdhi.png");
877 shbtn_data = new_image_set(
891 "histogram_carrot_up.png",
892 "histogram_carrot_hi.png",
893 "histogram_carrot_checked.png",
894 "histogram_carrot_dn.png",
895 "histogram_carrot_checkedhi.png");
896 statusbar_cancel_data = new_image_set(
898 "statusbar_cancel_up.png",
899 "statusbar_cancel_hi.png",
900 "statusbar_cancel_dn.png");
902 VFrame *editpanel_up = new_image("editpanel_up.png");
903 VFrame *editpanel_hi = new_image("editpanel_hi.png");
904 VFrame *editpanel_dn = new_image("editpanel_dn.png");
905 VFrame *editpanel_checked = new_image("editpanel_checked.png");
906 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
908 new_image("panel_divider", "panel_divider.png");
909 new_button("bottom_justify.png",
910 editpanel_up, editpanel_hi, editpanel_dn,
912 new_button("center_justify.png",
913 editpanel_up, editpanel_hi, editpanel_dn,
915 new_button("channel.png",
916 editpanel_up, editpanel_hi, editpanel_dn,
918 new_button("lok.png", // popup slider
919 editpanel_up, editpanel_hi, editpanel_dn,
921 new_toggle("histogram_toggle.png",
928 new_toggle("histogram_rgb.png",
934 "histogram_rgb_toggle");
935 new_toggle("waveform.png",
942 new_toggle("waveform_rgb.png",
948 "waveform_rgb_toggle");
949 new_toggle("scope.png",
957 new_button("picture.png",
958 editpanel_up, editpanel_hi, editpanel_dn,
960 new_button("histogram_img.png",
961 editpanel_up, editpanel_hi, editpanel_dn,
963 new_button("copy.png",
964 editpanel_up, editpanel_hi, editpanel_dn,
966 new_button("commercial.png",
967 editpanel_up, editpanel_hi, editpanel_dn,
968 "commercial"); // cdb
969 new_button("cut.png",
970 editpanel_up, editpanel_hi, editpanel_dn,
972 new_button("fit.png",
973 editpanel_up, editpanel_hi, editpanel_dn,
975 new_button("fitautos.png",
976 editpanel_up, editpanel_hi, editpanel_dn,
978 new_button("inpoint.png",
979 editpanel_up, editpanel_hi, editpanel_dn,
981 new_button("label.png",
982 editpanel_up, editpanel_hi, editpanel_dn,
984 new_button("left_justify.png",
985 editpanel_up, editpanel_hi, editpanel_dn,
987 new_button("magnify.png",
988 editpanel_up, editpanel_hi, editpanel_dn,
990 new_button("middle_justify.png",
991 editpanel_up, editpanel_hi, editpanel_dn,
993 new_button("nextlabel.png",
994 editpanel_up, editpanel_hi, editpanel_dn,
996 new_button("prevlabel.png",
997 editpanel_up, editpanel_hi, editpanel_dn,
999 new_button("nextedit.png",
1000 editpanel_up, editpanel_hi, editpanel_dn,
1002 new_button("prevedit.png",
1003 editpanel_up, editpanel_hi, editpanel_dn,
1005 new_button("outpoint.png",
1006 editpanel_up, editpanel_hi, editpanel_dn,
1008 over_button = new_button("over.png",
1009 editpanel_up, editpanel_hi, editpanel_dn,
1011 overwrite_data = new_button("overwrite.png",
1012 editpanel_up, editpanel_hi, editpanel_dn,
1014 new_button("paste.png",
1015 editpanel_up, editpanel_hi, editpanel_dn,
1017 new_button("redo.png",
1018 editpanel_up, editpanel_hi, editpanel_dn,
1020 new_button("right_justify.png",
1021 editpanel_up, editpanel_hi, editpanel_dn,
1023 splice_data = new_button("splice.png",
1024 editpanel_up, editpanel_hi, editpanel_dn,
1026 new_button("toclip.png",
1027 editpanel_up, editpanel_hi, editpanel_dn,
1029 new_button("goto.png",
1030 editpanel_up, editpanel_hi, editpanel_dn,
1032 new_button("top_justify.png",
1033 editpanel_up, editpanel_hi, editpanel_dn,
1035 new_button("undo.png",
1036 editpanel_up, editpanel_hi, editpanel_dn,
1038 new_button("wrench.png",
1039 editpanel_up, editpanel_hi, editpanel_dn,
1042 VFrame *transport_up = new_image("transportup.png");
1043 VFrame *transport_hi = new_image("transporthi.png");
1044 VFrame *transport_dn = new_image("transportdn.png");
1046 new_button("end.png",
1047 transport_up, transport_hi, transport_dn,
1049 new_button("fastfwd.png",
1050 transport_up, transport_hi, transport_dn,
1052 new_button("fastrev.png",
1053 transport_up, transport_hi, transport_dn,
1055 new_button("play.png",
1056 transport_up, transport_hi, transport_dn,
1058 new_button("framefwd.png",
1059 transport_up, transport_hi, transport_dn,
1061 new_button("framerev.png",
1062 transport_up, transport_hi, transport_dn,
1064 new_button("pause.png",
1065 transport_up, transport_hi, transport_dn,
1067 new_button("record.png",
1068 transport_up, transport_hi, transport_dn,
1070 new_button("singleframe.png",
1071 transport_up, transport_hi, transport_dn,
1073 new_button("reverse.png",
1074 transport_up, transport_hi, transport_dn,
1076 new_button("rewind.png",
1077 transport_up, transport_hi, transport_dn,
1079 new_button("stop.png",
1080 transport_up, transport_hi, transport_dn,
1082 new_button("stop.png",
1083 transport_up, transport_hi, transport_dn,
1086 // CWindow icons (led)
1087 new_image("cwindow_inactive", "cwindow_inactive.png");
1088 new_image("cwindow_active", "cwindow_active.png");
1090 new_image_set("category_button",
1092 "preferencesbutton_dn.png",
1093 "preferencesbutton_dnhi.png",
1094 "preferencesbutton_dnlo.png");
1095 new_image_set("category_button_checked",
1097 "preferencesbutton_up.png",
1098 "preferencesbutton_uphi.png",
1099 "preferencesbutton_dnlo.png");
1100 new_image_set("color3way_point",
1104 "color3way_dn.png");
1106 new_toggle("arrow.png",
1107 editpanel_up, editpanel_hi, editpanel_checked,
1108 editpanel_dn, editpanel_checkedhi,
1110 new_toggle("autokeyframe.png",
1111 transport_up, editpanel_hi, editpanel_checked,
1112 editpanel_dn, editpanel_checkedhi,
1114 new_toggle("spankeyframe.png",
1115 transport_up, editpanel_hi, editpanel_checked,
1116 editpanel_dn, editpanel_checkedhi,
1118 new_toggle("ibeam.png",
1119 editpanel_up, editpanel_hi, editpanel_checked,
1120 editpanel_dn, editpanel_checkedhi,
1122 new_toggle("show_meters.png",
1123 editpanel_up, editpanel_hi, editpanel_checked,
1124 editpanel_dn, editpanel_checkedhi,
1126 new_toggle("blank30x30.png",
1127 new_image("locklabels_locked.png"),
1128 new_image("locklabels_lockedhi.png"),
1129 new_image("locklabels_unlocked.png"),
1130 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
1131 new_image("locklabels_unlockedhi.png"),
1134 VFrame *cpanel_up = new_image("cpanel_up.png");
1135 VFrame *cpanel_hi = new_image("cpanel_hi.png");
1136 VFrame *cpanel_dn = new_image("cpanel_dn.png");
1137 VFrame *cpanel_checked = new_image("cpanel_checked.png");
1138 VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
1140 new_toggle("camera.png",
1141 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1143 new_toggle("crop.png",
1144 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1146 new_toggle("eyedrop.png",
1147 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1149 new_toggle("magnify.png",
1150 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1152 new_toggle("mask.png",
1153 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1155 new_toggle("ruler.png",
1156 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1158 new_toggle("projector.png",
1159 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1161 new_toggle("protect.png",
1162 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1164 new_toggle("titlesafe.png",
1165 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1167 new_toggle("toolwindow.png",
1168 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1170 // toggle for tangent mode (compositor/tool window)
1171 new_toggle("tan_smooth.png",
1172 editpanel_up, editpanel_hi, editpanel_checked,
1173 editpanel_dn, editpanel_checkedhi,
1175 new_toggle("tan_linear.png",
1176 editpanel_up, editpanel_hi, editpanel_checked,
1177 editpanel_dn, editpanel_checkedhi,
1180 new_toggle("mask_scale_x.png", "mask_scale_up.png", "mask_scale_uphi.png",
1181 "mask_scale_chkd.png", "mask_scale_xdown.png", "mask_scale_chkdhi.png",
1183 new_toggle("mask_scale_y.png", "mask_scale_up.png", "mask_scale_uphi.png",
1184 "mask_scale_chkd.png", "mask_scale_ydown.png", "mask_scale_chkdhi.png",
1186 new_toggle("mask_scale_xy.png", "mask_scale_up.png", "mask_scale_uphi.png",
1187 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
1193 // Re-align the Clock. theme.c:931
1194 void NEOPHYTETHEME::get_vwindow_sizes(VWindowGUI *gui)
1196 int edit_w = EditPanel::calculate_w(mwindow, 0, 12);
1197 int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin;
1198 vtimebar_h = yS(16); // The height of the position indicator
1199 int division_w = xS(30);
1201 /* For the deco, [150]-10. The remaining space should theoretically
1202 suffice for 999,999:59:59.960 hours. Total size: 140 x 26, where
1203 a height of 24 or 22 px would be nicer. */
1206 /* Indent, flat. Larger indentation also puts
1207 the 35% view into the compact view. */
1208 int vtime_border = xS(15);
1210 vmeter_y = widget_border;
1211 vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border;
1214 if (mwindow->edl->session->vwindow_meter) {
1215 vmeter_x = mwindow->session->vwindow_w -
1216 MeterPanel::get_meters_width(this,
1217 mwindow->edl->session->audio_channels,
1218 mwindow->edl->session->vwindow_meter);
1220 vmeter_x = mwindow->session->vwindow_w + widget_border;
1225 vcanvas_w = vmeter_x - vcanvas_x - widget_border;
1229 transport_w + widget_border +
1230 vtime_w + division_w +
1231 vtime_border > vmeter_x) {
1232 buttons_h = get_image("vbuttons_left")->get_h();
1233 vedit_x = widget_border;
1234 vedit_y = mwindow->session->vwindow_h -
1239 vtransport_x = widget_border;
1240 vtransport_y = mwindow->session->vwindow_h -
1241 get_image_set("autokeyframe")[0]->get_h() -
1244 vdivision_x = xS(280); // field width, compact
1245 vtime_x = vedit_x + xS(38); // concentric
1246 vtime_y = vedit_y + yS(24); // vertical alignment
1248 buttons_h = vtimebar_h +
1250 EditPanel::calculate_h(mwindow) +
1252 vtransport_x = widget_border;
1253 vtransport_y = mwindow->session->vwindow_h -
1258 vedit_x = vtransport_x + transport_w + widget_border;
1259 vedit_y = vtransport_y;
1261 vdivision_x = vedit_x + edit_w + division_w;
1262 vtime_x = vdivision_x + vtime_border;
1263 // vertical height concentric at button height
1264 vtime_y = vedit_y + widget_border - yS(7);
1267 // vtimebar_x = vcanvas_x;
1268 // vtimebar_y = vcanvas_y + vcanvas_h;
1269 // vtimebar_w = vcanvas_w;
1271 vcanvas_h = mwindow->session->vwindow_h - buttons_h;
1273 vtimebar_y = vcanvas_y + vcanvas_h;
1274 vtimebar_w = vmeter_x - widget_border;
1277 void NEOPHYTETHEME::build_bg_data()
1280 channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1282 new_image1("resource1024", "resource1024.png");
1283 new_image1("resource512", "resource512.png");
1284 new_image1("resource256", "resource256.png");
1285 new_image1("resource128", "resource128.png");
1286 new_image1("resource64", "resource64.png");
1287 new_image1("resource32", "resource32.png");
1288 new_image("plugin_bg_data", "plugin_bg.png");
1289 new_image("title_bg_data", "title_bg.png");
1290 new_image("vtimebar_bg_data", "vwindow_timebar.png");
1293 void NEOPHYTETHEME::build_overlays()
1295 keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1296 camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1297 maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1298 modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1299 hardedge_data = new VFramePng(get_image_data("hardedge.png"));
1300 pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1301 projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1304 void NEOPHYTETHEME::draw_rwindow_bg(RecordGUI *gui)
1307 // int margin = xS(50);
1308 // int margin2 = xS(80);
1309 // gui->draw_9segment(recordgui_batch_x - margin, 0,
1310 // mwindow->session->rwindow_w - recordgui_status_x + margin,
1311 // recordgui_buttons_y,
1313 // gui->draw_3segmenth(recordgui_options_x - margin2,
1314 // recordgui_buttons_y - yS(5),
1315 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
1317 // y = recordgui_buttons_y - yS(5) + rgui_controls->get_h();
1318 // gui->draw_9segment(0, y,
1319 // mwindow->session->rwindow_w,
1320 // mwindow->session->rwindow_h - y,
1324 void NEOPHYTETHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
1326 // int margin = xS(45);
1327 // int panel_w = xS(300);
1328 // int x = rmonitor_meter_x - margin;
1329 // int w = mwindow->session->rmonitor_w - x;
1330 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1331 // gui->clear_box(0, 0,
1332 // mwindow->session->rmonitor_w,
1333 // mwindow->session->rmonitor_h);
1334 // gui->draw_9segment(x, 0,
1336 // mwindow->session->rmonitor_h,
1337 // rmonitor_meters);
1340 void NEOPHYTETHEME::draw_mwindow_bg(MWindowGUI *gui)
1343 gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
1344 gui->menu_w(), get_image("mbutton_bg"));
1346 int pdw = get_image("panel_divider")->get_w();
1348 x += 9 * get_image("play")->get_w();
1349 x += mtransport_margin; // the control buttons
1351 gui->draw_vframe(get_image("panel_divider"),
1352 x - toggle_margin / 2 - pdw / 2 + 2,
1354 x += 2 * get_image("arrow")->get_w() + toggle_margin; // the mode buttons
1356 gui->draw_vframe(get_image("panel_divider"),
1357 x - toggle_margin / 2 - pdw / 2 + 2,
1360 x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
1361 gui->draw_vframe(get_image("panel_divider"),
1362 x - toggle_margin / 2 - pdw / 2 + 2,
1365 gui->draw_3segmenth(0,
1366 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1367 get_image("patchbay_bg")->get_w(),
1368 get_image("clock_bg"));
1370 gui->draw_3segmentv(patchbay_x,
1373 get_image("patchbay_bg"));
1375 gui->set_color(BLACK);
1376 gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1377 mcanvas_y + mtimebar_h,
1378 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1379 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1381 gui->draw_3segmenth(mtimebar_x, mtimebar_y,
1382 mtimebar_w, get_image("timebar_bg"));
1384 gui->set_color(BlackNineTwo);
1385 gui->draw_box(mzoom_x, mzoom_y,
1386 mwindow->session->mwindow_w, yS(25));
1388 // gui->draw_vframe(get_image("mscroll_filler"),
1389 // mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1390 // mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
1393 gui->draw_3segmenth(mzoom_x, mzoom_y,
1394 mzoom_w, get_image("statusbar"));
1397 void NEOPHYTETHEME::draw_cwindow_bg(CWindowGUI *gui)
1399 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1401 gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1403 if(mwindow->edl->session->cwindow_meter)
1405 gui->draw_3segmenth(cstatus_x,
1407 cmeter_x - widget_border - cstatus_x,
1408 get_image("cbuttons_right"));
1409 gui->draw_9segment(cmeter_x - widget_border,
1411 mwindow->session->cwindow_w - cmeter_x + widget_border,
1412 mwindow->session->cwindow_h,
1413 get_image("cmeter_bg"));
1415 gui->draw_3segmenth(cstatus_x, ccomposite_h,
1416 cmeter_x - widget_border - cstatus_x + xS(100),
1417 get_image("cbuttons_right"));
1421 void NEOPHYTETHEME::draw_vwindow_bg(VWindowGUI *gui)
1423 gui->draw_3segmenth(0, vcanvas_h,
1424 vdivision_x, get_image("vbuttons_left"));
1425 if(mwindow->edl->session->vwindow_meter)
1427 gui->draw_3segmenth(vdivision_x, vcanvas_h,
1428 vmeter_x - widget_border - vdivision_x, get_image("vbuttons_right"));
1429 gui->draw_9segment(vmeter_x - widget_border, 0,
1430 mwindow->session->vwindow_w - vmeter_x + widget_border,
1431 mwindow->session->vwindow_h, get_image("cmeter_bg"));
1433 gui->draw_3segmenth(vdivision_x, vcanvas_h,
1434 vmeter_x - widget_border - vdivision_x + xS(100),
1435 get_image("vbuttons_right"));
1439 gui->draw_3segmenth(
1440 vtime_x - xS(5), // -left, +right
1441 vtime_y + 0, // -up, +down. Careful, move some of the buttons as well.
1442 vtime_w + xS(10), // protruded l/r x*2
1443 get_image("vclock"));
1447 void NEOPHYTETHEME::draw_preferences_bg(PreferencesWindow *gui)
1449 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1452 void NEOPHYTETHEME::draw_new_bg(NewWindow *gui)
1454 gui->draw_vframe(get_image("new_bg"), 0, 0);
1457 void NEOPHYTETHEME::draw_setformat_bg(SetFormatWindow *gui)
1459 gui->draw_vframe(get_image("setformat_bg"), 0, 0);