4 * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "bcsignals.h"
24 #include "cwindowgui.h"
27 #include "edlsession.h"
29 #include "mainsession.h"
31 #include "meterpanel.h"
33 #include "mwindowgui.h"
36 #include "preferencesthread.h"
37 #include "recordgui.h"
38 #include "recordmonitor.h"
39 #include "setformat.h"
40 #include "statusbar.h"
42 #include "trackcanvas.h"
44 #include "vwindowgui.h"
47 PluginClient* new_plugin(PluginServer *server)
49 return new SUVMain(server);
52 SUVMain::SUVMain(PluginServer *server)
53 : PluginTClient(server)
60 const char* SUVMain::plugin_title() { return N_("S.U.V."); }
62 Theme* SUVMain::new_theme()
65 extern unsigned char _binary_theme_suv_data_start[];
66 theme->set_data(_binary_theme_suv_data_start);
77 delete camerakeyframe_data;
78 delete channel_position_data;
80 delete maskkeyframe_data;
81 delete modekeyframe_data;
83 delete pankeyframe_data;
84 delete projectorkeyframe_data;
87 void SUV::initialize()
89 BC_Resources *resources = BC_WindowBase::get_resources();
92 resources->text_default = 0xbfbfbf;
93 resources->text_background = 0x373737;
94 resources->text_background_disarmed = 0xaf0000;
95 resources->text_border1 = 0x202020;
96 resources->text_border2 = 0x373737;
97 resources->text_border3 = 0x373737;
98 resources->text_border4 = 0x969696;
99 resources->text_inactive_highlight = 0x707070;
101 resources->bg_color = 0x484848;
102 resources->border_light2 = resources->bg_color;
103 resources->border_shadow2 = resources->bg_color;
104 resources->default_text_color = 0xbfbfbf;
105 resources->menu_title_text = 0xbfbfbf;
106 resources->popup_title_text = 0xbfbfbf;
107 resources->menu_item_text = 0xbfbfbf;
108 resources->menu_highlighted_fontcolor = WHITE;
109 resources->generic_button_margin = xS(30);
110 resources->pot_needle_color = resources->text_default;
111 resources->pot_offset = 1;
112 resources->progress_text = resources->text_default;
113 resources->meter_font_color = resources->default_text_color;
115 resources->menu_light = 0xababab;
116 resources->menu_highlighted = 0x6f6f6f;
117 resources->menu_down = 0x4b4b4b;
118 resources->menu_up = 0x4b4b4b;
119 resources->menu_shadow = 0x202020;
120 resources->popupmenu_margin = xS(15);
121 resources->popupmenu_triangle_margin = xS(20);
123 resources->listbox_title_color = 0xbfbfbf;
125 resources->listbox_title_margin = xS(20);
126 resources->listbox_title_hotspot = xS(20);
127 resources->listbox_border1 = 0x1a1a1a;
128 resources->listbox_border2 = 0x373737;
129 resources->listbox_border3 = 0x373737;
130 resources->listbox_border4 = 0x646464;
131 resources->listbox_highlighted = 0x505050;
132 resources->listbox_inactive = 0x373737;
133 resources->listbox_bg = 0;
134 resources->listbox_text = 0xbfbfbf;
136 resources->filebox_margin = yS(130);
137 resources->file_color = 0xbfbfbf;
138 resources->directory_color = 0xa0a0ff;
141 new_toggle("loadmode_new.png",
144 "loadmode_checked.png",
146 "loadmode_checkedhi.png",
148 new_toggle("loadmode_none.png",
151 "loadmode_checked.png",
153 "loadmode_checkedhi.png",
155 new_toggle("loadmode_newcat.png",
158 "loadmode_checked.png",
160 "loadmode_checkedhi.png",
162 new_toggle("loadmode_cat.png",
165 "loadmode_checked.png",
167 "loadmode_checkedhi.png",
169 new_toggle("loadmode_newtracks.png",
172 "loadmode_checked.png",
174 "loadmode_checkedhi.png",
175 "loadmode_newtracks");
176 new_toggle("loadmode_paste.png",
179 "loadmode_checked.png",
181 "loadmode_checkedhi.png",
183 new_toggle("loadmode_resource.png",
186 "loadmode_checked.png",
188 "loadmode_checkedhi.png",
189 "loadmode_resource");
190 new_toggle("loadmode_nested.png",
193 "loadmode_checked.png",
195 "loadmode_checkedhi.png",
199 resources->filebox_icons_images = new_button("icons.png",
200 "fileboxbutton_up.png",
201 "fileboxbutton_hi.png",
202 "fileboxbutton_dn.png",
205 resources->filebox_text_images = new_button("text.png",
206 "fileboxbutton_up.png",
207 "fileboxbutton_hi.png",
208 "fileboxbutton_dn.png",
211 resources->filebox_newfolder_images = new_button("folder.png",
212 "fileboxbutton_up.png",
213 "fileboxbutton_hi.png",
214 "fileboxbutton_dn.png",
215 "filebox_newfolder");
217 resources->filebox_rename_images = new_button("rename.png",
218 "fileboxbutton_up.png",
219 "fileboxbutton_hi.png",
220 "fileboxbutton_dn.png",
223 resources->filebox_updir_images = new_button("updir.png",
224 "fileboxbutton_up.png",
225 "fileboxbutton_hi.png",
226 "fileboxbutton_dn.png",
229 resources->filebox_delete_images = new_button("delete.png",
230 "fileboxbutton_up.png",
231 "fileboxbutton_hi.png",
232 "fileboxbutton_dn.png",
235 resources->filebox_reload_images = new_button("reload.png",
236 "fileboxbutton_up.png",
237 "fileboxbutton_hi.png",
238 "fileboxbutton_dn.png",
242 resources->filebox_descend_images = new_button("openfolder.png",
243 "filebox_bigbutton_up.png",
244 "filebox_bigbutton_hi.png",
245 "filebox_bigbutton_dn.png",
248 resources->usethis_button_images =
249 resources->ok_images = new_button("ok.png",
250 "filebox_bigbutton_up.png",
251 "filebox_bigbutton_hi.png",
252 "filebox_bigbutton_dn.png",
256 "new_bigbutton_up.png",
257 "new_bigbutton_hi.png",
258 "new_bigbutton_dn.png",
261 new_button("reset.png",
267 new_button("unclear.png",
273 new_button("keyframe.png",
279 resources->cancel_images = new_button("cancel.png",
280 "filebox_bigbutton_up.png",
281 "filebox_bigbutton_hi.png",
282 "filebox_bigbutton_dn.png",
285 new_button("cancel.png",
286 "new_bigbutton_up.png",
287 "new_bigbutton_hi.png",
288 "new_bigbutton_dn.png",
289 "new_cancel_images");
291 new_button("mask_pnt_linear.png",
292 "mask_button_up.png",
293 "mask_button_hi.png",
294 "mask_button_dn.png",
295 "mask_pnt_linear_images");
296 new_button("mask_crv_linear.png",
297 "mask_button_up.png",
298 "mask_button_hi.png",
299 "mask_button_dn.png",
300 "mask_crv_linear_images");
301 new_button("mask_all_linear.png",
302 "mask_button_up.png",
303 "mask_button_hi.png",
304 "mask_button_dn.png",
305 "mask_all_linear_images");
307 new_button("mask_pnt_smooth.png",
308 "mask_button_up.png",
309 "mask_button_hi.png",
310 "mask_button_dn.png",
311 "mask_pnt_smooth_images");
312 new_button("mask_crv_smooth.png",
313 "mask_button_up.png",
314 "mask_button_hi.png",
315 "mask_button_dn.png",
316 "mask_crv_smooth_images");
317 new_button("mask_all_smooth.png",
318 "mask_button_up.png",
319 "mask_button_hi.png",
320 "mask_button_dn.png",
321 "mask_all_smooth_images");
323 new_button("mask_prst_sqr.png",
324 "mask_button_up.png",
325 "mask_button_hi.png",
326 "mask_button_dn.png",
327 "mask_prst_sqr_images");
328 new_button("mask_prst_crc.png",
329 "mask_button_up.png",
330 "mask_button_hi.png",
331 "mask_button_dn.png",
332 "mask_prst_crc_images");
333 new_button("mask_prst_tri.png",
334 "mask_button_up.png",
335 "mask_button_hi.png",
336 "mask_button_dn.png",
337 "mask_prst_tri_images");
338 new_button("mask_prst_ovl.png",
339 "mask_button_up.png",
340 "mask_button_hi.png",
341 "mask_button_dn.png",
342 "mask_prst_ovl_images");
344 new_button("mask_prst_load.png",
345 "mask_button_up.png",
346 "mask_button_hi.png",
347 "mask_button_dn.png",
348 "mask_prst_load_images");
349 new_button("mask_prst_save.png",
350 "mask_button_up.png",
351 "mask_button_hi.png",
352 "mask_button_dn.png",
353 "mask_prst_save_images");
354 new_button("mask_prst_trsh.png",
355 "mask_button_up.png",
356 "mask_button_hi.png",
357 "mask_button_dn.png",
358 "mask_prst_trsh_images");
360 new_button("mask_pstn_cen.png",
361 "mask_button_up.png",
362 "mask_button_hi.png",
363 "mask_button_dn.png",
364 "mask_pstn_cen_images");
365 new_button("mask_pstn_nrm.png",
366 "mask_button_up.png",
367 "mask_button_hi.png",
368 "mask_button_dn.png",
369 "mask_pstn_nrm_images");
371 resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
372 "0.png", "1.png", "2.png", "3.png", "4.png", "5.png", "6.png", "7.png",
373 "8.png", "9.png", "colon.png", "period.png", "a.png", "b.png", "c.png",
374 "d.png", "e.png", "f.png", "space.png", "dash.png");
376 resources->bar_data = new_image("bar", "bar.png");
377 resources->check = new_image("check", "check.png");
379 resources->min_menu_w = xS(96);
380 resources->menu_popup_bg = new_image("menu_popup_bg.png");
381 resources->menu_item_bg = new_image_set(3,
385 resources->menu_bar_bg = new_image("menubar_bg.png");
386 resources->menu_title_bg = new_image_set(3,
392 resources->popupmenu_images = 0;
394 // "menupopup_up.png",
395 // "menupopup_hi.png",
396 // "menupopup_dn.png");
398 resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
399 "text_highlight.png");
401 resources->generic_button_images = new_image_set(3,
405 resources->horizontal_slider_data = new_image_set(6,
411 "hslider_bg_dn.png");
412 resources->vertical_slider_data = new_image_set(6,
418 "hslider_bg_dn.png");
419 for( int i=0; i<6; ++i )
420 resources->vertical_slider_data[i]->rotate90();
422 resources->progress_images = new_image_set(2,
425 resources->tumble_data = new_image_set(4,
430 resources->listbox_button = new_button4("listbox_button.png",
436 resources->listbox_column = new_image_set(3,
440 resources->listbox_up = new_image("listbox_up.png");
441 resources->listbox_dn = new_image("listbox_dn.png");
442 resources->pan_data = new_image_set(7,
448 "pan_channel_small.png",
449 "pan_stick_small.png");
450 resources->pan_text_color = WHITE;
452 resources->pot_images = new_image_set(3,
457 resources->checkbox_images = new_image_set(5,
460 "checkbox_checked.png",
462 "checkbox_checkedhi.png");
464 resources->radial_images = new_image_set(5,
467 "radial_checked.png",
469 "radial_checkedhi.png");
471 resources->xmeter_images = new_image_set(7,
479 resources->ymeter_images = new_image_set(7,
488 resources->hscroll_data = new_image_set(10,
489 "hscroll_handle_up.png",
490 "hscroll_handle_hi.png",
491 "hscroll_handle_dn.png",
492 "hscroll_handle_bg.png",
493 "hscroll_left_up.png",
494 "hscroll_left_hi.png",
495 "hscroll_left_dn.png",
496 "hscroll_right_up.png",
497 "hscroll_right_hi.png",
498 "hscroll_right_dn.png");
500 resources->vscroll_data = new_image_set(10,
501 "vscroll_handle_up.png",
502 "vscroll_handle_hi.png",
503 "vscroll_handle_dn.png",
504 "vscroll_handle_bg.png",
505 "vscroll_left_up.png",
506 "vscroll_left_hi.png",
507 "vscroll_left_dn.png",
508 "vscroll_right_up.png",
509 "vscroll_right_hi.png",
510 "vscroll_right_dn.png");
511 resources->scroll_minhandle = xS(20);
514 new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
515 new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
516 new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
517 new_button("swap_extents.png",
527 preferences_category_overlap = 0;
528 preferencescategory_x = 0;
529 preferencescategory_y = yS(5);
530 preferencestitle_x = xS(5);
531 preferencestitle_y = yS(10);
532 preferencesoptions_x = xS(5);
533 preferencesoptions_y = 0;
536 message_normal = resources->text_default;
538 mtransport_margin = xS(16);
539 toggle_margin = xS(16);
541 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
542 new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
543 new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
545 new_image("mbutton_bg", "mbutton_bg.png");
546 new_image("timebar_bg", "timebar_bg_flat.png");
547 new_image("timebar_brender", "timebar_brender.png");
548 new_image("clock_bg", "mclock_flat.png");
549 new_image("patchbay_bg", "patchbay_bg.png");
550 new_image("statusbar", "statusbar.png");
551 // new_image("mscroll_filler", "mscroll_filler.png");
553 new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
554 new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
555 new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
556 new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
559 new_image("cpanel_bg", "cpanel_bg.png");
560 new_image("cbuttons_left", "cbuttons_left.png");
561 new_image("cbuttons_right", "cbuttons_right.png");
562 new_image("cmeter_bg", "cmeter_bg.png");
563 new_image("cwindow_focus", "cwindow_focus.png");
566 new_image("vbuttons_left", "vbuttons_left.png");
567 new_image("vclock", "vclock.png");
569 new_image("preferences_bg", "preferences_bg.png");
572 new_image("new_bg", "new_bg.png");
573 new_image("setformat_bg", "setformat_bg.png");
576 timebar_view_data = new_image("timebar_view.png");
578 setformat_w = get_image("setformat_bg")->get_w();
579 setformat_h = get_image("setformat_bg")->get_h();
580 setformat_x1 = xS(15);
581 setformat_x2 = xS(100);
583 setformat_x3 = xS(315);
584 setformat_x4 = xS(415);
585 setformat_y1 = yS(20);
586 setformat_y2 = yS(85);
587 setformat_y3 = yS(125);
588 setformat_margin = xS(30);
589 setformat_channels_x = xS(25);
590 setformat_channels_y = yS(242);
591 setformat_channels_w = xS(250);
592 setformat_channels_h = yS(250);
594 loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + yS(10);
598 new_toggle("playpatch.png",
603 "patch_checkedhi.png",
606 new_toggle("recordpatch.png",
611 "patch_checkedhi.png",
614 new_toggle("gangpatch.png",
619 "patch_checkedhi.png",
622 new_toggle("drawpatch.png",
627 "patch_checkedhi.png",
631 new_image_set("mutepatch_data",
635 "mutepatch_checked.png",
637 "mutepatch_checkedhi.png");
639 new_image_set("expandpatch_data",
641 "expandpatch_up.png",
642 "expandpatch_hi.png",
643 "expandpatch_checked.png",
644 "expandpatch_dn.png",
645 "expandpatch_checkedhi.png");
653 out_point = new_image_set(5,
658 "out_checkedhi.png");
659 in_point = new_image_set(5,
666 label_toggle = new_image_set(5,
667 "labeltoggle_up.png",
668 "labeltoggle_uphi.png",
670 "labeltoggle_dn.png",
671 "label_checkedhi.png");
673 ffmpeg_toggle = new_image_set(5,
680 proxy_p_toggle = new_image_set(5,
685 "proxy_p_chkdhi.png");
687 proxy_s_toggle = new_image_set(5,
692 "proxy_s_chkdhi.png");
694 mask_mode_toggle = new_image_set(5,
697 "mask_mode_chkd.png",
698 "mask_mode_down.png",
699 "mask_mode_chkdhi.png");
701 shbtn_data = new_image_set(3,
706 new_image_set("preset_edit",
712 new_image_set("histogram_carrot",
714 "histogram_carrot_up.png",
715 "histogram_carrot_hi.png",
716 "histogram_carrot_checked.png",
717 "histogram_carrot_dn.png",
718 "histogram_carrot_checkedhi.png");
721 statusbar_cancel_data = new_image_set(3,
722 "statusbar_cancel_up.png",
723 "statusbar_cancel_hi.png",
724 "statusbar_cancel_dn.png");
727 VFrame *editpanel_up = new_image("editpanel_up.png");
728 VFrame *editpanel_hi = new_image("editpanel_hi.png");
729 VFrame *editpanel_dn = new_image("editpanel_dn.png");
730 VFrame *editpanel_checked = new_image("editpanel_checked.png");
731 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
733 new_image("panel_divider", "panel_divider.png");
734 new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
735 new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
736 new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
737 new_button("lok.png", editpanel_up, editpanel_hi, editpanel_dn, "lok");
739 new_toggle("histogram_toggle.png",
746 new_toggle("histogram_rgb.png",
752 "histogram_rgb_toggle");
753 new_toggle("waveform.png",
760 new_toggle("waveform_rgb.png",
766 "waveform_rgb_toggle");
767 new_toggle("scope.png",
775 new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
776 new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
779 new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
780 new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
781 new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
782 new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
783 new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
784 new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
785 new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
786 new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
787 new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
788 new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
789 new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
790 new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
791 new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
792 new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
793 new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
794 over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
795 overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
796 new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
797 new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
798 new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
799 splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
800 new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
801 new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
802 new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
803 new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
804 new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
807 VFrame *transport_up = new_image("transportup.png");
808 VFrame *transport_hi = new_image("transporthi.png");
809 VFrame *transport_dn = new_image("transportdn.png");
811 new_button("end.png", transport_up, transport_hi, transport_dn, "end");
812 new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd");
813 new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev");
814 new_button("play.png", transport_up, transport_hi, transport_dn, "play");
815 new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd");
816 new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev");
817 new_button("pause.png", transport_up, transport_hi, transport_dn, "pause");
818 new_button("record.png", transport_up, transport_hi, transport_dn, "record");
819 new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe");
820 new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse");
821 new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind");
822 new_button("stop.png", transport_up, transport_hi, transport_dn, "stop");
823 new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec");
828 new_image("cwindow_inactive", "cwindow_inactive.png");
829 new_image("cwindow_active", "cwindow_active.png");
833 new_image_set("category_button",
835 "preferencesbutton_dn.png",
836 "preferencesbutton_dnhi.png",
837 "preferencesbutton_dnlo.png");
839 new_image_set("category_button_checked",
841 "preferencesbutton_up.png",
842 "preferencesbutton_uphi.png",
843 "preferencesbutton_dnlo.png");
849 new_image_set("color3way_point",
855 new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
856 new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
857 new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
858 new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
859 new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
860 new_toggle("blank30x30.png",
861 new_image("locklabels_locked.png"),
862 new_image("locklabels_lockedhi.png"),
863 new_image("locklabels_unlocked.png"),
864 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
865 new_image("locklabels_unlockedhi.png"),
868 VFrame *cpanel_up = new_image("cpanel_up.png");
869 VFrame *cpanel_hi = new_image("cpanel_hi.png");
870 VFrame *cpanel_dn = new_image("cpanel_dn.png");
871 VFrame *cpanel_checked = new_image("cpanel_checked.png");
872 VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
875 new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
876 new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
877 new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
878 new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
879 new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
880 new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
881 new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
882 new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
883 new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
884 new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
886 // toggle for tangent mode (compositor/tool window)
887 new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
888 new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
890 new_toggle("mask_scale_x.png", "mask_scale_up.png", "mask_scale_uphi.png",
891 "mask_scale_chkd.png", "mask_scale_xdown.png", "mask_scale_chkdhi.png",
893 new_toggle("mask_scale_y.png", "mask_scale_up.png", "mask_scale_uphi.png",
894 "mask_scale_chkd.png", "mask_scale_ydown.png", "mask_scale_chkdhi.png",
896 new_toggle("mask_scale_xy.png", "mask_scale_up.png", "mask_scale_uphi.png",
897 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
902 title_font = MEDIUMFONT_3D;
903 title_color = 0xbfbfbf;
904 recordgui_fixed_color = YELLOW;
905 recordgui_variable_color = RED;
907 channel_position_color = MEYELLOW;
908 resources->meter_title_w = xS(25);
910 // (asset) edit info text color
911 edit_font_color = YELLOW;
914 #define VWINDOW_METER_MARGIN xS(5)
917 void SUV::build_bg_data()
920 channel_position_data = new VFramePng(get_image_data("channel_position.png"));
923 new_image1("resource1024", "resource1024.png");
924 new_image1("resource512", "resource512.png");
925 new_image1("resource256", "resource256.png");
926 new_image1("resource128", "resource128.png");
927 new_image1("resource64", "resource64.png");
928 new_image1("resource32", "resource32.png");
929 new_image("plugin_bg_data", "plugin_bg.png");
930 new_image("title_bg_data", "title_bg.png");
931 new_image("vtimebar_bg_data", "vwindow_timebar.png");
936 void SUV::build_overlays()
938 keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
939 camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
940 maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
941 modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
942 hardedge_data = new VFramePng(get_image_data("hardedge.png"));
943 pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
944 projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
948 void SUV::draw_rwindow_bg(RecordGUI *gui)
951 // int margin = xS(50);
952 // int margin2 = xS(80);
953 // gui->draw_9segment(recordgui_batch_x - margin,
955 // mwindow->session->rwindow_w - recordgui_status_x + margin,
956 // recordgui_buttons_y,
958 // gui->draw_3segmenth(recordgui_options_x - margin2,
959 // recordgui_buttons_y - yS(5),
960 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
962 // y = recordgui_buttons_y - yS(5) + rgui_controls->get_h();
963 // gui->draw_9segment(0,
965 // mwindow->session->rwindow_w,
966 // mwindow->session->rwindow_h - y,
970 void SUV::draw_rmonitor_bg(RecordMonitorGUI *gui)
972 // int margin = xS(45);
973 // int panel_w = xS(300);
974 // int x = rmonitor_meter_x - margin;
975 // int w = mwindow->session->rmonitor_w - x;
976 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
977 // gui->clear_box(0, 0,
978 // mwindow->session->rmonitor_w,
979 // mwindow->session->rmonitor_h);
980 // gui->draw_9segment(x,
982 // mwindow->session->rmonitor_h,
987 void SUV::draw_mwindow_bg(MWindowGUI *gui)
990 gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
991 gui->menu_w(), get_image("mbutton_bg"));
993 int pdw = get_image("panel_divider")->get_w();
996 x += 9 * get_image("play")->get_w();
997 x += mtransport_margin; // the control buttons
999 gui->draw_vframe(get_image("panel_divider"),
1000 x - toggle_margin / 2 - pdw / 2 + xs2,
1002 x += 2 * get_image("arrow")->get_w() + toggle_margin; // the mode buttons
1004 gui->draw_vframe(get_image("panel_divider"),
1005 x - toggle_margin / 2 - pdw / 2 + xs2,
1007 x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
1009 gui->draw_vframe(get_image("panel_divider"),
1010 x - toggle_margin / 2 - pdw / 2 + xs2,
1014 gui->draw_3segmenth(0,
1015 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1016 get_image("patchbay_bg")->get_w(),
1017 get_image("clock_bg"));
1020 //printf("SUV::draw_mwindow_bg %d %d %d\n", __LINE__,
1023 gui->draw_3segmentv(patchbay_x,
1026 get_image("patchbay_bg"));
1029 gui->set_color(BLACK);
1030 gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1031 mcanvas_y + mtimebar_h,
1032 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1033 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1036 gui->draw_3segmenth(mtimebar_x, mtimebar_y,
1037 mtimebar_w, get_image("timebar_bg"));
1040 gui->set_color(0x373737);
1041 gui->draw_box(mzoom_x, mzoom_y,
1042 mwindow->session->mwindow_w, yS(25));
1045 // gui->draw_vframe(get_image("mscroll_filler"),
1046 // mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1047 // mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
1050 gui->draw_3segmenth(mzoom_x, mzoom_y,
1051 mzoom_w, get_image("statusbar"));
1054 void SUV::draw_cwindow_bg(CWindowGUI *gui)
1056 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1058 gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1060 if(mwindow->edl->session->cwindow_meter)
1062 gui->draw_3segmenth(cstatus_x,
1064 cmeter_x - widget_border - cstatus_x,
1065 get_image("cbuttons_right"));
1066 gui->draw_9segment(cmeter_x - widget_border,
1068 mwindow->session->cwindow_w - cmeter_x + widget_border,
1069 mwindow->session->cwindow_h,
1070 get_image("cmeter_bg"));
1074 gui->draw_3segmenth(cstatus_x,
1076 cmeter_x - widget_border - cstatus_x + xS(100),
1077 get_image("cbuttons_right"));
1081 void SUV::draw_vwindow_bg(VWindowGUI *gui)
1083 gui->draw_3segmenth(0,
1086 get_image("vbuttons_left"));
1087 if(mwindow->edl->session->vwindow_meter)
1089 gui->draw_3segmenth(vdivision_x,
1091 vmeter_x - widget_border - vdivision_x,
1092 get_image("cbuttons_right"));
1093 gui->draw_9segment(vmeter_x - widget_border,
1095 mwindow->session->vwindow_w - vmeter_x + widget_border,
1096 mwindow->session->vwindow_h,
1097 get_image("cmeter_bg"));
1101 gui->draw_3segmenth(vdivision_x,
1103 vmeter_x - widget_border - vdivision_x + xS(100),
1104 get_image("cbuttons_right"));
1108 gui->draw_3segmenth(vtime_x - xS(20),
1111 get_image("vclock"));
1115 void SUV::draw_preferences_bg(PreferencesWindow *gui)
1117 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1120 void SUV::draw_new_bg(NewWindow *gui)
1122 gui->draw_vframe(get_image("new_bg"), 0, 0);
1125 void SUV::draw_setformat_bg(SetFormatWindow *gui)
1127 gui->draw_vframe(get_image("setformat_bg"), 0, 0);