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;
97 delete pankeyframe_data;
98 delete projectorkeyframe_data;
101 void NEOPHYTETHEME::initialize()
103 //printf("Neophyte::initialize 1\n");
104 BC_Resources *resources = BC_WindowBase::get_resources();
106 /* Something own, fitting to the theme and independent of
107 the integrated splash screen/about */
108 // Preferences: About (logo)
110 about_bg = new VFramePng(get_image_data("about_bg.png"));
112 /* Replacement for the heroine icon. Everyone has his
113 own ideas about this, especially in connection with the
114 new desktops[tm]. It would be better to solve this globally,
115 irrespective of the theme currently in use. */
116 // /home/olaf/src/cinelerra-gg/cin5/cinelerra-5.1/cinelerra/theme.C-237
117 new_image_set_images("mwindow_icon", 1, new VFramePng(get_image_data("cin_icon_mwin.png")));
118 new_image_set_images("vwindow_icon", 1, new VFramePng(get_image_data("cin_icon_vwin.png")));
119 new_image_set_images("cwindow_icon", 1, new VFramePng(get_image_data("cin_icon_cwin.png")));
120 new_image_set_images("awindow_icon", 1, new VFramePng(get_image_data("cin_icon_awin.png")));
121 new_image_set_images("record_icon", 1, new VFramePng(get_image_data("cin_icon_rec.png")));
122 // Windows without an icon: Camera, Overlays, etc.
124 resources->text_default = CreamyWhite; // general text color
125 resources->text_background = BlackNineTwo;
126 resources->text_background_disarmed = LockedRed; // arm track locked (!)
127 resources->text_border2 = BlackNineTwo; // l,t outside
128 resources->text_border1 = BLACK; // l,t inside
129 resources->text_border3 = BlackSevenTwo; // r,d inside
130 resources->text_border4 = BlackNineTwo; // r,d outside
131 resources->text_border2_hi = ComicYellow; // highlighting on mouseover
132 resources->text_border3_hi = ComicYellow;
133 resources->text_inactive_highlight = BabyBlueDark; /* e.g. Subtitle (double click
134 on inactive text, choose next or
135 prev and be amazed). */
136 resources->text_highlight = BabyBlue;
138 resources->bg_color = BlackEightFive;
139 resources->border_light2 = resources->bg_color;
140 resources->border_shadow2 = resources->bg_color;
142 resources->default_text_color = CreamyWhite; // Timeline, dialogs and much more.
143 resources->menu_title_text = WHITE; // high contrast
144 resources->popup_title_text = WHITE;
145 resources->menu_item_text = WHITE;
147 resources->menu_highlighted_fontcolor = CreamyWhiteBright;
148 /* This indent is too global and the fullness ultimately depends
149 * on the text. (Pref. top right, engl.: ~17) */
150 resources->generic_button_margin = 20; // [15]
151 resources->pot_needle_color = CreamyWhite; // [resources->text_default] – marginal
152 resources->pot_offset = 1; // only the needle
153 resources->progress_text = resources->text_default;
154 resources->meter_font_color = resources->default_text_color;
156 // the following four are overwritten by graphics
157 resources->menu_light = BlackEightFive;
158 resources->menu_down = ALARM;
159 resources->menu_up = ALARM;
160 resources->menu_shadow = ALARM;
162 resources->menu_highlighted = BabyBlue;
163 resources->popupmenu_margin = 15; // indent, moves the button text to the right
164 resources->popupmenu_triangle_margin = 15;
166 resources->listbox_title_color = CreamyWhiteBright; // columns header
167 resources->listbox_title_margin = 15; // [20] indent
168 resources->listbox_title_hotspot = 15; // [20]
170 resources->listbox_border2 = BlackNineTwo; // as text_border
171 resources->listbox_border1 = BLACK;
172 resources->listbox_border3 = BlackSevenTwo;
173 resources->listbox_border4 = BlackNineTwo;
174 // ../../guicast/bcresources.C:684, highlighting on mouseover
175 resources->listbox_border2_hi = BabyBlue;
176 resources->listbox_border3_hi = BabyBlue;
178 resources->listbox_highlighted = BabyBlue; // recources, loadfiles
179 resources->listbox_inactive = BlackNineTwo; // background
180 resources->listbox_bg = 0; // s.a. ../theme_blond_cv/blondcvtheme.C:249
181 resources->listbox_text = CreamyWhite;
182 resources->listbox_selected = 0x3d5477; // approximately matches column_hi
184 resources->filebox_margin = 130; // [130]
185 resources->file_color = WHITE;
186 resources->directory_color = BabyBlue;
188 // Footage in the timeline
189 title_font = MEDIUMFONT;
192 /* Because the colors of the text in the list are fixed.
193 So it is at least uniform. */
194 recordgui_fixed_color = YELLOW;
195 recordgui_variable_color = RED;
197 channel_position_color = ComicYellow; // Set Format, speaker numbers
198 resources->meter_title_w = 25;
200 // (asset) edit info text color
201 edit_font_color = ComicYellow; // ? ../../cinelerra/theme.h:282
202 assetedit_color = CreamyWhiteBright; // variable attributes
204 // flash_color = ALARM; // ../../cinelerra/recordgui.C:135
205 timebar_cursor_color = WHITE; // ../../cinelerra/theme.C:73
207 // tooltip ../../guicast/bcresources.C:786
208 resources->tooltip_bg_color = CreamyWhiteBright;
209 // resources->tooltip_fg_color = ALARM; // undefined.
210 resources->tooltip_delay = 1500; // [1000]
212 /* Waveform of audio tracks.
213 Instead of squeaky [GREEN]. This three are soft, warm and matte:
214 848661 beige, 6d876f green, 665f8a purple */
215 audio_color = 0x6d876f;
217 /* Resources: the text overlay location display. Affects
218 a) Preferences, Performace: BR "Video" (text).
220 resources->audiovideo_color = CreamyWhite; // BlackNineTwo;
222 /* ../../guicast/bcresources.C:781 ff.
223 Delays must all be different for repeaters */
224 resources->blink_rate = 750; // [250] - we're not on the run.
226 // ../../cinelerra/theme.C:87
227 clock_fg_color = ComicYellow;
228 // clock_bg_color = ALARM; // see vclock
230 // The line between the in and out markings
231 inout_highlight_color=BabyBlue;
237 "loadmode_checked.png",
239 "loadmode_checkedhi.png",
245 "loadmode_checked.png",
247 "loadmode_checkedhi.png",
250 "loadmode_newcat.png",
253 "loadmode_checked.png",
255 "loadmode_checkedhi.png",
261 "loadmode_checked.png",
263 "loadmode_checkedhi.png",
266 "loadmode_newtracks.png",
269 "loadmode_checked.png",
271 "loadmode_checkedhi.png",
272 "loadmode_newtracks");
274 "loadmode_paste.png",
277 "loadmode_checked.png",
279 "loadmode_checkedhi.png",
282 "loadmode_resource.png",
285 "loadmode_checked.png",
287 "loadmode_checkedhi.png",
288 "loadmode_resource");
290 "loadmode_nested.png",
293 "loadmode_checked.png",
295 "loadmode_checkedhi.png",
297 resources->filebox_icons_images = new_button(
299 "fileboxbutton_up.png",
300 "fileboxbutton_hi.png",
301 "fileboxbutton_dn.png",
303 resources->filebox_text_images = new_button(
305 "fileboxbutton_up.png",
306 "fileboxbutton_hi.png",
307 "fileboxbutton_dn.png",
309 resources->filebox_newfolder_images = new_button(
311 "fileboxbutton_up.png",
312 "fileboxbutton_hi.png",
313 "fileboxbutton_dn.png",
314 "filebox_newfolder");
315 resources->filebox_rename_images = new_button(
317 "fileboxbutton_up.png",
318 "fileboxbutton_hi.png",
319 "fileboxbutton_dn.png",
321 resources->filebox_updir_images = new_button(
323 "fileboxbutton_up.png",
324 "fileboxbutton_hi.png",
325 "fileboxbutton_dn.png",
327 resources->filebox_delete_images = new_button(
329 "fileboxbutton_up.png",
330 "fileboxbutton_hi.png",
331 "fileboxbutton_dn.png",
333 resources->filebox_reload_images = new_button(
335 "fileboxbutton_up.png",
336 "fileboxbutton_hi.png",
337 "fileboxbutton_dn.png",
339 resources->filebox_descend_images = new_button(
341 "filebox_bigbutton_up.png",
342 "filebox_bigbutton_hi.png",
343 "filebox_bigbutton_dn.png",
345 resources->usethis_button_images = resources->ok_images = new_button(
347 "filebox_bigbutton_up.png",
348 "filebox_bigbutton_hi.png",
349 "filebox_bigbutton_dn.png",
353 "new_bigbutton_up.png",
354 "new_bigbutton_hi.png",
355 "new_bigbutton_dn.png",
357 new_button("reset.png",
362 resources->cancel_images = new_button(
364 "filebox_bigbutton_up.png",
365 "filebox_bigbutton_hi.png",
366 "filebox_bigbutton_dn.png",
370 "new_bigbutton_up.png",
371 "new_bigbutton_hi.png",
372 "new_bigbutton_dn.png",
373 "new_cancel_images");
374 // Clock - is not used (AFAIK). See also clock color.
375 // resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
397 resources->bar_data = new_image("bar", "bar.png");
398 resources->check = new_image("check", "check.png");
400 resources->min_menu_w = 96;
401 resources->menu_popup_bg = new_image("menu_popup_bg.png");
402 resources->menu_item_bg = new_image_set(
407 resources->menu_bar_bg = new_image("menubar_bg.png");
408 resources->menu_title_bg = new_image_set
413 resources->popupmenu_images = 0;
415 // "menupopup_up.png",
416 // "menupopup_hi.png",
417 // "menupopup_dn.png");
418 resources->toggle_highlight_bg = new_image(
419 "toggle_highlight_bg",
420 "text_highlight.png");
421 resources->generic_button_images = new_image_set(
426 resources->horizontal_slider_data = new_image_set(
433 "hslider_bg_dn.png");
434 resources->vertical_slider_data = new_image_set(
441 "hslider_bg_dn.png");
443 for( int i=0; i<6; ++i )
444 resources->vertical_slider_data[i]->rotate90();
446 resources->progress_images = new_image_set(
450 resources->tumble_data = new_image_set(
456 resources->listbox_button = new_button4(
457 "listbox_button.png",
463 // Dialog "Load files…" switch SI/IEC
464 resources->filebox_szfmt_images = new_image_set(
466 "file_size_zero_up.png",
467 "file_size_zero_hi.png",
468 "file_size_zero_dn.png",
469 "file_size_lwrb_up.png",
470 "file_size_lwrb_hi.png",
471 "file_size_lwrb_dn.png",
472 "file_size_capb_up.png",
473 "file_size_capb_hi.png",
474 "file_size_capb_dn.png",
475 "file_size_semi_up.png",
476 "file_size_semi_hi.png",
477 "file_size_semi_dn.png");
478 resources->listbox_column = new_image_set(
483 resources->listbox_up = new_image("listbox_up.png");
484 resources->listbox_dn = new_image("listbox_dn.png");
485 resources->pan_data = new_image_set(
492 "pan_channel_small.png",
493 "pan_stick_small.png");
494 resources->pan_text_color = CreamyWhiteBright;
495 resources->pot_images = new_image_set(
500 resources->checkbox_images = new_image_set(
504 "checkbox_checked.png",
506 "checkbox_checkedhi.png");
507 resources->radial_images = new_image_set(
511 "radial_checked.png",
513 "radial_checkedhi.png");
514 resources->xmeter_images = new_image_set(
523 resources->ymeter_images = new_image_set(
532 resources->hscroll_data = new_image_set(
534 "hscroll_handle_up.png",
535 "hscroll_handle_hi.png",
536 "hscroll_handle_dn.png",
537 "hscroll_handle_bg.png",
538 "hscroll_left_up.png",
539 "hscroll_left_hi.png",
540 "hscroll_left_dn.png",
541 "hscroll_right_up.png",
542 "hscroll_right_hi.png",
543 "hscroll_right_dn.png");
544 resources->vscroll_data = new_image_set(
546 "vscroll_handle_up.png",
547 "vscroll_handle_hi.png",
548 "vscroll_handle_dn.png",
549 "vscroll_handle_bg.png",
550 "vscroll_left_up.png",
551 "vscroll_left_hi.png",
552 "vscroll_left_dn.png",
553 "vscroll_right_up.png",
554 "vscroll_right_hi.png",
555 "vscroll_right_dn.png");
556 resources->scroll_minhandle = 20;
559 "prevtip.png", "tipbutton_up.png",
560 "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
562 "nexttip.png", "tipbutton_up.png",
563 "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
565 "closetip.png", "tipbutton_up.png",
566 "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
568 "swap_extents.png", "editpanel_up.png",
569 "editpanel_hi.png", "editpanel_dn.png", "swap_extents");
572 preferences_category_overlap = 0;
573 preferencescategory_x = 0;
574 preferencescategory_y = 5;
575 preferencestitle_x = 5;
576 preferencestitle_y = 10;
577 preferencesoptions_x = 5;
578 preferencesoptions_y = 0;
581 message_normal = resources->text_default;
583 mtransport_margin = 10;
586 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png",
588 new_image_set("xpane", 3,
592 new_image_set("ypane", 3,
597 new_image("mbutton_bg", "mbutton_bg.png");
598 new_image("timebar_bg", "timebar_bg_flat.png");
599 new_image("timebar_brender", "timebar_brender.png");
600 new_image("clock_bg", "mclock_flat.png");
601 new_image("patchbay_bg", "patchbay_bg.png");
602 new_image("statusbar", "statusbar.png");
603 // new_image("mscroll_filler", "mscroll_filler.png");
605 new_image_set("zoombar_menu", 3,
609 new_image_set("zoombar_tumbler", 4,
612 "zoomtumble_bottom.png",
613 "zoomtumble_top.png");
615 new_image_set("mode_popup", 3,
616 "mode_up.png", "mode_hi.png", "mode_dn.png");
617 new_image("mode_add", "mode_add.png");
618 new_image("mode_divide", "mode_divide.png");
619 new_image("mode_multiply", "mode_multiply.png");
620 new_image("mode_normal", "mode_normal.png");
621 new_image("mode_replace", "mode_replace.png");
622 new_image("mode_subtract", "mode_subtract.png");
623 new_image("mode_max", "mode_max.png");
625 new_image_set("plugin_on", 5,
628 "plugin_onselect.png",
630 "plugin_onselecthi.png");
631 new_image_set("plugin_show", 5,
634 "plugin_showselect.png",
636 "plugin_showselecthi.png");
639 new_image_set("mixpatch_data", 5,
642 "mixpatch_checked.png",
644 "mixpatch_checkedhi.png");
647 new_image("cpanel_bg", "cpanel_bg.png");
648 new_image("cbuttons_left", "cbuttons_left.png");
649 new_image("cbuttons_right", "cbuttons_right.png");
650 new_image("cmeter_bg", "cmeter_bg.png");
653 /* The red position indicator is currently only 5 px high.
654 The backgrounds were made according to this. */
655 new_image("vbuttons_left", "vbuttons_left.png");
656 new_image("vbuttons_right", "vbuttons_right.png"); // unset = cbuttons_right
657 new_image("vclock", "vclock.png");
658 //new_image("vmeter_bg", ".png"); // !
660 new_image("preferences_bg", "preferences_bg.png");
662 new_image("new_bg", "new_bg.png");
663 new_image("setformat_bg", "setformat_bg.png");
665 timebar_view_data = new_image("timebar_view.png");
667 setformat_w = get_image("setformat_bg")->get_w();
668 setformat_h = get_image("setformat_bg")->get_h();
676 setformat_margin = 30;
677 setformat_channels_x = 25;
678 setformat_channels_y = 242;
679 setformat_channels_w = 250;
680 setformat_channels_h = 250;
682 loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10;
685 new_toggle("playpatch.png",
688 "playpatch_checked.png",
690 "playpatch_checkedhi.png",
692 new_toggle("recordpatch.png",
693 "recordpatch_up.png",
694 "recordpatch_hi.png",
695 "recordpatch_checked.png",
696 "recordpatch_dn.png",
697 "recordpatch_checkedhi.png",
699 new_toggle("gangpatch.png",
704 "patch_checkedhi.png",
706 new_toggle("drawpatch.png",
711 "patch_checkedhi.png",
714 new_image_set("mutepatch_data",
718 "mutepatch_checked.png",
720 "mutepatch_checkedhi.png");
721 new_image_set("expandpatch_data",
723 "expandpatch_up.png",
724 "expandpatch_hi.png",
725 "expandpatch_checked.png",
726 "expandpatch_dn.png",
727 "expandpatch_checkedhi.png");
732 out_point = new_image_set(
738 "out_checkedhi.png");
739 in_point = new_image_set(
746 label_toggle = new_image_set(
748 "labeltoggle_up.png",
749 "labeltoggle_uphi.png",
751 "labeltoggle_dn.png",
752 "label_checkedhi.png");
753 ffmpeg_toggle = new_image_set(
760 proxy_p_toggle = new_image_set(
766 "proxy_p_chkdhi.png");
767 proxy_s_toggle = new_image_set( // proxy use ffmpeg scaler
773 "proxy_s_chkdhi.png");
774 mask_mode_toggle = new_image_set(5,
777 "mask_mode_chkd.png",
778 "mask_mode_down.png",
779 "mask_mode_chkdhi.png");
780 shbtn_data = new_image_set(
794 "histogram_carrot_up.png",
795 "histogram_carrot_hi.png",
796 "histogram_carrot_checked.png",
797 "histogram_carrot_dn.png",
798 "histogram_carrot_checkedhi.png");
799 statusbar_cancel_data = new_image_set(
801 "statusbar_cancel_up.png",
802 "statusbar_cancel_hi.png",
803 "statusbar_cancel_dn.png");
805 VFrame *editpanel_up = new_image("editpanel_up.png");
806 VFrame *editpanel_hi = new_image("editpanel_hi.png");
807 VFrame *editpanel_dn = new_image("editpanel_dn.png");
808 VFrame *editpanel_checked = new_image("editpanel_checked.png");
809 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
811 new_image("panel_divider", "panel_divider.png");
812 new_button("bottom_justify.png",
813 editpanel_up, editpanel_hi, editpanel_dn,
815 new_button("center_justify.png",
816 editpanel_up, editpanel_hi, editpanel_dn,
818 new_button("channel.png",
819 editpanel_up, editpanel_hi, editpanel_dn,
821 new_button("lok.png", // popup slider
822 editpanel_up, editpanel_hi, editpanel_dn,
824 new_toggle("histogram_toggle.png",
831 new_toggle("histogram_rgb.png",
837 "histogram_rgb_toggle");
838 new_toggle("waveform.png",
845 new_toggle("waveform_rgb.png",
851 "waveform_rgb_toggle");
852 new_toggle("scope.png",
860 new_button("picture.png",
861 editpanel_up, editpanel_hi, editpanel_dn,
863 new_button("histogram_img.png",
864 editpanel_up, editpanel_hi, editpanel_dn,
866 new_button("copy.png",
867 editpanel_up, editpanel_hi, editpanel_dn,
869 new_button("commercial.png",
870 editpanel_up, editpanel_hi, editpanel_dn,
871 "commercial"); // cdb
872 new_button("cut.png",
873 editpanel_up, editpanel_hi, editpanel_dn,
875 new_button("fit.png",
876 editpanel_up, editpanel_hi, editpanel_dn,
878 new_button("fitautos.png",
879 editpanel_up, editpanel_hi, editpanel_dn,
881 new_button("inpoint.png",
882 editpanel_up, editpanel_hi, editpanel_dn,
884 new_button("label.png",
885 editpanel_up, editpanel_hi, editpanel_dn,
887 new_button("left_justify.png",
888 editpanel_up, editpanel_hi, editpanel_dn,
890 new_button("magnify.png",
891 editpanel_up, editpanel_hi, editpanel_dn,
893 new_button("middle_justify.png",
894 editpanel_up, editpanel_hi, editpanel_dn,
896 new_button("nextlabel.png",
897 editpanel_up, editpanel_hi, editpanel_dn,
899 new_button("prevlabel.png",
900 editpanel_up, editpanel_hi, editpanel_dn,
902 new_button("nextedit.png",
903 editpanel_up, editpanel_hi, editpanel_dn,
905 new_button("prevedit.png",
906 editpanel_up, editpanel_hi, editpanel_dn,
908 new_button("outpoint.png",
909 editpanel_up, editpanel_hi, editpanel_dn,
911 over_button = new_button("over.png",
912 editpanel_up, editpanel_hi, editpanel_dn,
914 overwrite_data = new_button("overwrite.png",
915 editpanel_up, editpanel_hi, editpanel_dn,
917 new_button("paste.png",
918 editpanel_up, editpanel_hi, editpanel_dn,
920 new_button("redo.png",
921 editpanel_up, editpanel_hi, editpanel_dn,
923 new_button("right_justify.png",
924 editpanel_up, editpanel_hi, editpanel_dn,
926 splice_data = new_button("splice.png",
927 editpanel_up, editpanel_hi, editpanel_dn,
929 new_button("toclip.png",
930 editpanel_up, editpanel_hi, editpanel_dn,
932 new_button("goto.png",
933 editpanel_up, editpanel_hi, editpanel_dn,
935 new_button("top_justify.png",
936 editpanel_up, editpanel_hi, editpanel_dn,
938 new_button("undo.png",
939 editpanel_up, editpanel_hi, editpanel_dn,
941 new_button("wrench.png",
942 editpanel_up, editpanel_hi, editpanel_dn,
945 VFrame *transport_up = new_image("transportup.png");
946 VFrame *transport_hi = new_image("transporthi.png");
947 VFrame *transport_dn = new_image("transportdn.png");
949 new_button("end.png",
950 transport_up, transport_hi, transport_dn,
952 new_button("fastfwd.png",
953 transport_up, transport_hi, transport_dn,
955 new_button("fastrev.png",
956 transport_up, transport_hi, transport_dn,
958 new_button("play.png",
959 transport_up, transport_hi, transport_dn,
961 new_button("framefwd.png",
962 transport_up, transport_hi, transport_dn,
964 new_button("framerev.png",
965 transport_up, transport_hi, transport_dn,
967 new_button("pause.png",
968 transport_up, transport_hi, transport_dn,
970 new_button("record.png",
971 transport_up, transport_hi, transport_dn,
973 new_button("singleframe.png",
974 transport_up, transport_hi, transport_dn,
976 new_button("reverse.png",
977 transport_up, transport_hi, transport_dn,
979 new_button("rewind.png",
980 transport_up, transport_hi, transport_dn,
982 new_button("stop.png",
983 transport_up, transport_hi, transport_dn,
985 new_button("stop.png",
986 transport_up, transport_hi, transport_dn,
989 // CWindow icons (led)
990 new_image("cwindow_inactive", "cwindow_inactive.png");
991 new_image("cwindow_active", "cwindow_active.png");
993 new_image_set("category_button",
995 "preferencesbutton_dn.png",
996 "preferencesbutton_dnhi.png",
997 "preferencesbutton_dnlo.png");
998 new_image_set("category_button_checked",
1000 "preferencesbutton_up.png",
1001 "preferencesbutton_uphi.png",
1002 "preferencesbutton_dnlo.png");
1003 new_image_set("color3way_point",
1007 "color3way_dn.png");
1009 new_toggle("arrow.png",
1010 editpanel_up, editpanel_hi, editpanel_checked,
1011 editpanel_dn, editpanel_checkedhi,
1013 new_toggle("autokeyframe.png",
1014 transport_up, editpanel_hi, editpanel_checked,
1015 editpanel_dn, editpanel_checkedhi,
1017 new_toggle("ibeam.png",
1018 editpanel_up, editpanel_hi, editpanel_checked,
1019 editpanel_dn, editpanel_checkedhi,
1021 new_toggle("show_meters.png",
1022 editpanel_up, editpanel_hi, editpanel_checked,
1023 editpanel_dn, editpanel_checkedhi,
1025 new_toggle("blank30x30.png",
1026 new_image("locklabels_locked.png"),
1027 new_image("locklabels_lockedhi.png"),
1028 new_image("locklabels_unlocked.png"),
1029 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
1030 new_image("locklabels_unlockedhi.png"),
1033 VFrame *cpanel_up = new_image("cpanel_up.png");
1034 VFrame *cpanel_hi = new_image("cpanel_hi.png");
1035 VFrame *cpanel_dn = new_image("cpanel_dn.png");
1036 VFrame *cpanel_checked = new_image("cpanel_checked.png");
1037 VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
1039 new_toggle("camera.png",
1040 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1042 new_toggle("crop.png",
1043 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1045 new_toggle("eyedrop.png",
1046 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1048 new_toggle("magnify.png",
1049 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1051 new_toggle("mask.png",
1052 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1054 new_toggle("ruler.png",
1055 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1057 new_toggle("projector.png",
1058 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1060 new_toggle("protect.png",
1061 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1063 new_toggle("titlesafe.png",
1064 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1066 new_toggle("toolwindow.png",
1067 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1069 // toggle for tangent mode (compositor/tool window)
1070 new_toggle("tan_smooth.png",
1071 editpanel_up, editpanel_hi, editpanel_checked,
1072 editpanel_dn, editpanel_checkedhi,
1074 new_toggle("tan_linear.png",
1075 editpanel_up, editpanel_hi, editpanel_checked,
1076 editpanel_dn, editpanel_checkedhi,
1082 // Re-align the Clock. theme.c:931
1083 void NEOPHYTETHEME::get_vwindow_sizes(VWindowGUI *gui)
1085 int edit_w = EditPanel::calculate_w(mwindow, 0, 10);
1086 int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin;
1087 vtimebar_h = 16; // The height of the position indicator
1088 int division_w = 30;
1090 /* For the deco, [150]-10. The remaining space should theoretically
1091 suffice for 999,999:59:59.960 hours. Total size: 140 x 26, where
1092 a height of 24 or 22 px would be nicer. */
1095 /* Indent, flat. Larger indentation also puts
1096 the 35% view into the compact view. */
1097 int vtime_border = 15;
1099 vmeter_y = widget_border;
1100 vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border;
1103 if (mwindow->edl->session->vwindow_meter) {
1104 vmeter_x = mwindow->session->vwindow_w -
1105 MeterPanel::get_meters_width(this,
1106 mwindow->edl->session->audio_channels,
1107 mwindow->edl->session->vwindow_meter);
1109 vmeter_x = mwindow->session->vwindow_w + widget_border;
1114 vcanvas_w = vmeter_x - vcanvas_x - widget_border;
1118 transport_w + widget_border +
1119 vtime_w + division_w +
1120 vtime_border > vmeter_x) {
1121 buttons_h = get_image("vbuttons_left")->get_h();
1122 vedit_x = widget_border;
1123 vedit_y = mwindow->session->vwindow_h -
1128 vtransport_x = widget_border;
1129 vtransport_y = mwindow->session->vwindow_h -
1130 get_image_set("autokeyframe")[0]->get_h() -
1133 vdivision_x = 280; // field width, compact
1134 vtime_x = vedit_x + 38; // concentric
1135 vtime_y = vedit_y + 24; // vertical alignment
1137 buttons_h = vtimebar_h +
1139 EditPanel::calculate_h(mwindow) +
1141 vtransport_x = widget_border;
1142 vtransport_y = mwindow->session->vwindow_h -
1147 vedit_x = vtransport_x + transport_w + widget_border;
1148 vedit_y = vtransport_y;
1150 vdivision_x = vedit_x + edit_w + division_w;
1151 vtime_x = vdivision_x + vtime_border;
1152 vtime_y = vedit_y + widget_border - 7; // vertical height concentric at button height
1155 // vtimebar_x = vcanvas_x;
1156 // vtimebar_y = vcanvas_y + vcanvas_h;
1157 // vtimebar_w = vcanvas_w;
1159 vcanvas_h = mwindow->session->vwindow_h - buttons_h;
1161 vtimebar_y = vcanvas_y + vcanvas_h;
1162 vtimebar_w = vmeter_x - widget_border;
1165 void NEOPHYTETHEME::build_bg_data()
1168 channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1170 new_image("resource1024", "resource1024.png");
1171 new_image("resource512", "resource512.png");
1172 new_image("resource256", "resource256.png");
1173 new_image("resource128", "resource128.png");
1174 new_image("resource64", "resource64.png");
1175 new_image("resource32", "resource32.png");
1176 new_image("plugin_bg_data", "plugin_bg.png");
1177 new_image("title_bg_data", "title_bg.png");
1178 new_image("vtimebar_bg_data", "vwindow_timebar.png");
1181 void NEOPHYTETHEME::build_overlays()
1183 keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1184 camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1185 maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1186 modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1187 pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1188 projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1191 void NEOPHYTETHEME::draw_rwindow_bg(RecordGUI *gui)
1195 // int margin2 = 80;
1196 // gui->draw_9segment(recordgui_batch_x - margin,
1198 // mwindow->session->rwindow_w - recordgui_status_x + margin,
1199 // recordgui_buttons_y,
1201 // gui->draw_3segmenth(recordgui_options_x - margin2,
1202 // recordgui_buttons_y - 5,
1203 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
1205 // y = recordgui_buttons_y - 5 + rgui_controls->get_h();
1206 // gui->draw_9segment(0,
1208 // mwindow->session->rwindow_w,
1209 // mwindow->session->rwindow_h - y,
1213 void NEOPHYTETHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
1216 // int panel_w = 300;
1217 // int x = rmonitor_meter_x - margin;
1218 // int w = mwindow->session->rmonitor_w - x;
1219 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1220 // gui->clear_box(0,
1222 // mwindow->session->rmonitor_w,
1223 // mwindow->session->rmonitor_h);
1224 // gui->draw_9segment(x,
1227 // mwindow->session->rmonitor_h,
1228 // rmonitor_meters);
1231 void NEOPHYTETHEME::draw_mwindow_bg(MWindowGUI *gui)
1234 gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
1235 gui->menu_w(), get_image("mbutton_bg"));
1237 int pdw = get_image("panel_divider")->get_w();
1239 x += 9 * get_image("play")->get_w();
1240 x += mtransport_margin; // the control buttons
1242 gui->draw_vframe(get_image("panel_divider"),
1243 x - toggle_margin / 2 - pdw / 2 + 2,
1245 x += 2 * get_image("arrow")->get_w() + toggle_margin; // the mode buttons
1247 gui->draw_vframe(get_image("panel_divider"),
1248 x - toggle_margin / 2 - pdw / 2 + 2,
1251 x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
1252 gui->draw_vframe(get_image("panel_divider"),
1253 x - toggle_margin / 2 - pdw / 2 + 2,
1256 gui->draw_3segmenth(0,
1257 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1258 get_image("patchbay_bg")->get_w(),
1259 get_image("clock_bg"));
1261 gui->draw_3segmentv(patchbay_x,
1264 get_image("patchbay_bg"));
1266 gui->set_color(BLACK);
1267 gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1268 mcanvas_y + mtimebar_h,
1269 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1270 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1272 gui->draw_3segmenth(mtimebar_x,
1275 get_image("timebar_bg"));
1277 gui->set_color(BlackNineTwo);
1278 gui->draw_box(mzoom_x,
1280 mwindow->session->mwindow_w,
1283 // gui->draw_vframe(get_image("mscroll_filler"),
1284 // mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1285 // mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
1288 gui->draw_3segmenth(mzoom_x,
1291 get_image("statusbar"));
1294 void NEOPHYTETHEME::draw_cwindow_bg(CWindowGUI *gui)
1296 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1298 gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1300 if(mwindow->edl->session->cwindow_meter)
1302 gui->draw_3segmenth(cstatus_x,
1304 cmeter_x - widget_border - cstatus_x,
1305 get_image("cbuttons_right"));
1306 gui->draw_9segment(cmeter_x - widget_border,
1308 mwindow->session->cwindow_w - cmeter_x + widget_border,
1309 mwindow->session->cwindow_h,
1310 get_image("cmeter_bg"));
1312 gui->draw_3segmenth(cstatus_x,
1314 cmeter_x - widget_border - cstatus_x + 100,
1315 get_image("cbuttons_right"));
1319 void NEOPHYTETHEME::draw_vwindow_bg(VWindowGUI *gui)
1321 gui->draw_3segmenth(0,
1324 get_image("vbuttons_left"));
1325 if(mwindow->edl->session->vwindow_meter)
1327 gui->draw_3segmenth(vdivision_x,
1329 vmeter_x - widget_border - vdivision_x,
1330 get_image("vbuttons_right"));
1331 gui->draw_9segment(vmeter_x - widget_border,
1333 mwindow->session->vwindow_w - vmeter_x + widget_border,
1334 mwindow->session->vwindow_h,
1335 get_image("cmeter_bg"));
1337 gui->draw_3segmenth(vdivision_x,
1339 vmeter_x - widget_border - vdivision_x + 100,
1340 get_image("vbuttons_right"));
1344 gui->draw_3segmenth(
1345 vtime_x - 5, // -left, +right
1346 vtime_y + 0, // -up, +down. Careful, move some of the buttons as well.
1347 vtime_w + 10, // protruded l/r x*2
1348 get_image("vclock"));
1352 void NEOPHYTETHEME::draw_preferences_bg(PreferencesWindow *gui)
1354 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1357 void NEOPHYTETHEME::draw_new_bg(NewWindow *gui)
1359 gui->draw_vframe(get_image("new_bg"), 0, 0);
1362 void NEOPHYTETHEME::draw_setformat_bg(SetFormatWindow *gui)
1364 gui->draw_vframe(get_image("setformat_bg"), 0, 0);