3 #include "cwindowgui.h"
6 #include "edlsession.h"
8 #include "mainsession.h"
10 #include "meterpanel.h"
12 #include "mwindowgui.h"
15 #include "preferencesthread.h"
16 #include "recordgui.h"
17 #include "recordmonitor.h"
18 #include "setformat.h"
19 #include "statusbar.h"
21 #include "trackcanvas.h"
23 #include "vwindowgui.h"
28 PluginClient* new_plugin(PluginServer *server)
30 return new SUVMain(server);
39 SUVMain::SUVMain(PluginServer *server)
40 : PluginTClient(server)
48 char* SUVMain::plugin_title()
53 Theme* SUVMain::new_theme()
56 extern unsigned char _binary_suv_data_start[];
57 theme->set_data(_binary_suv_data_start);
77 void SUV::initialize()
79 BC_Resources *resources = BC_WindowBase::get_resources();
82 resources->text_default = 0xbfbfbf;
83 resources->text_background = 0x373737;
84 resources->text_border1 = 0x202020;
85 resources->text_border2 = 0x373737;
86 resources->text_border3 = 0x373737;
87 resources->text_border4 = 0x969696;
88 resources->text_inactive_highlight = 0x707070;
90 resources->bg_color = 0x484848;
91 resources->default_text_color = 0xbfbfbf;
92 resources->menu_title_text = 0xbfbfbf;
93 resources->popup_title_text = 0xbfbfbf;
94 resources->menu_item_text = 0xbfbfbf;
95 resources->menu_highlighted_fontcolor = WHITE;
96 resources->generic_button_margin = 30;
97 resources->pot_needle_color = resources->text_default;
98 resources->pot_offset = 1;
99 resources->progress_text = resources->text_default;
100 resources->meter_font_color = resources->default_text_color;
102 resources->menu_light = 0xababab;
103 resources->menu_highlighted = 0x6f6f6f;
104 resources->menu_down = 0x4b4b4b;
105 resources->menu_up = 0x4b4b4b;
106 resources->menu_shadow = 0x202020;
107 resources->popupmenu_margin = 10;
108 resources->popupmenu_triangle_margin = 15;
110 resources->listbox_title_color = 0xbfbfbf;
112 resources->listbox_title_margin = 20;
113 resources->listbox_title_hotspot = 20;
114 resources->listbox_border1 = 0x1a1a1a;
115 resources->listbox_border2 = 0x373737;
116 resources->listbox_border3 = 0x373737;
117 resources->listbox_border4 = 0x646464;
118 resources->listbox_highlighted = 0x505050;
119 resources->listbox_inactive = 0x373737;
120 resources->listbox_bg = 0;
121 resources->listbox_text = 0xbfbfbf;
123 resources->filebox_margin = 130;
124 resources->file_color = 0xbfbfbf;
125 resources->directory_color = 0xa0a0ff;
130 resources->filebox_icons_images = new_button("icons.png",
131 "fileboxbutton_up.png",
132 "fileboxbutton_hi.png",
133 "fileboxbutton_dn.png");
135 resources->filebox_text_images = new_button("text.png",
136 "fileboxbutton_up.png",
137 "fileboxbutton_hi.png",
138 "fileboxbutton_dn.png");
140 resources->filebox_newfolder_images = new_button("folder.png",
141 "fileboxbutton_up.png",
142 "fileboxbutton_hi.png",
143 "fileboxbutton_dn.png");
145 resources->filebox_updir_images = new_button("updir.png",
146 "fileboxbutton_up.png",
147 "fileboxbutton_hi.png",
148 "fileboxbutton_dn.png");
150 resources->filebox_delete_images = new_button("delete.png",
151 "fileboxbutton_up.png",
152 "fileboxbutton_hi.png",
153 "fileboxbutton_dn.png");
155 resources->filebox_reload_images = new_button("reload.png",
156 "fileboxbutton_up.png",
157 "fileboxbutton_hi.png",
158 "fileboxbutton_dn.png");
161 resources->filebox_descend_images = new_button("openfolder.png",
162 "filebox_bigbutton_up.png",
163 "filebox_bigbutton_hi.png",
164 "filebox_bigbutton_dn.png");
166 resources->usethis_button_images =
167 resources->ok_images = new_button("ok.png",
168 "filebox_bigbutton_up.png",
169 "filebox_bigbutton_hi.png",
170 "filebox_bigbutton_dn.png");
173 "new_bigbutton_up.png",
174 "new_bigbutton_hi.png",
175 "new_bigbutton_dn.png",
178 resources->cancel_images = new_button("cancel.png",
179 "filebox_bigbutton_up.png",
180 "filebox_bigbutton_hi.png",
181 "filebox_bigbutton_dn.png");
183 new_button("cancel.png",
184 "new_bigbutton_up.png",
185 "new_bigbutton_hi.png",
186 "new_bigbutton_dn.png",
187 "new_cancel_images");
189 resources->bar_data = new_image("bar", "bar.png");
192 resources->min_menu_w = 96;
193 resources->menu_popup_bg = new_image("menu_popup_bg.png");
194 resources->menu_item_bg = new_image_set(3,
198 resources->menu_bar_bg = new_image("menubar_bg.png");
199 resources->menu_title_bg = new_image_set(3,
205 resources->popupmenu_images = 0;
207 // "menupopup_up.png",
208 // "menupopup_hi.png",
209 // "menupopup_dn.png");
211 resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
212 "text_highlight.png");
214 resources->generic_button_images = new_image_set(3,
218 resources->horizontal_slider_data = new_image_set(6,
224 "hslider_bg_dn.png");
225 resources->progress_images = new_image_set(2,
228 resources->tumble_data = new_image_set(4,
233 resources->listbox_button = new_button4("listbox_button.png",
238 resources->listbox_column = new_image_set(3,
242 resources->listbox_up = new_image("listbox_up.png");
243 resources->listbox_dn = new_image("listbox_dn.png");
244 resources->pan_data = new_image_set(7,
250 "pan_channel_small.png",
251 "pan_stick_small.png");
252 resources->pan_text_color = WHITE;
254 resources->pot_images = new_image_set(3,
259 resources->checkbox_images = new_image_set(5,
262 "checkbox_checked.png",
264 "checkbox_checkedhi.png");
266 resources->radial_images = new_image_set(5,
269 "radial_checked.png",
271 "radial_checkedhi.png");
273 resources->xmeter_images = new_image_set(6,
280 resources->ymeter_images = new_image_set(6,
288 resources->hscroll_data = new_image_set(10,
289 "hscroll_handle_up.png",
290 "hscroll_handle_hi.png",
291 "hscroll_handle_dn.png",
292 "hscroll_handle_bg.png",
293 "hscroll_left_up.png",
294 "hscroll_left_hi.png",
295 "hscroll_left_dn.png",
296 "hscroll_right_up.png",
297 "hscroll_right_hi.png",
298 "hscroll_right_dn.png");
300 resources->vscroll_data = new_image_set(10,
301 "vscroll_handle_up.png",
302 "vscroll_handle_hi.png",
303 "vscroll_handle_dn.png",
304 "vscroll_handle_bg.png",
305 "vscroll_left_up.png",
306 "vscroll_left_hi.png",
307 "vscroll_left_dn.png",
308 "vscroll_right_up.png",
309 "vscroll_right_hi.png",
310 "vscroll_right_dn.png");
313 new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
314 new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
315 new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
316 new_button("swap_extents.png",
324 rgui_batch = new_image("recordgui_batch.png");
325 rgui_controls = new_image("recordgui_controls.png");
326 rgui_list = new_image("recordgui_list.png");
327 rmonitor_panel = new_image("recordmonitor_panel.png");
328 rmonitor_meters = new_image("recordmonitor_meters.png");
331 preferences_category_overlap = 0;
332 preferencescategory_x = 0;
333 preferencescategory_y = 5;
334 preferencestitle_x = 5;
335 preferencestitle_y = 10;
336 preferencesoptions_x = 5;
337 preferencesoptions_y = 0;
340 message_normal = resources->text_default;
342 mtransport_margin = 10;
345 new_image("mbutton_bg", "mbutton_bg.png");
346 new_image("timebar_bg", "timebar_bg_flat.png");
347 new_image("timebar_brender", "timebar_brender.png");
348 new_image("clock_bg", "mclock_flat.png");
349 new_image("patchbay_bg", "patchbay_bg.png");
350 new_image("statusbar", "statusbar.png");
351 new_image("mscroll_filler", "mscroll_filler.png");
353 new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
354 new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
356 new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
357 new_image("mode_add", "mode_add.png");
358 new_image("mode_divide", "mode_divide.png");
359 new_image("mode_multiply", "mode_multiply.png");
360 new_image("mode_normal", "mode_normal.png");
361 new_image("mode_replace", "mode_replace.png");
362 new_image("mode_subtract", "mode_subtract.png");
363 new_image("mode_max", "mode_max.png");
365 new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
366 new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
369 new_image("cpanel_bg", "cpanel_bg.png");
370 new_image("cbuttons_left", "cbuttons_left.png");
371 new_image("cbuttons_right", "cbuttons_right.png");
372 new_image("cmeter_bg", "cmeter_bg.png");
375 new_image("vbuttons_left", "vbuttons_left.png");
376 new_image("vclock", "vclock.png");
378 new_image("preferences_bg", "preferences_bg.png");
381 new_image("new_bg", "new_bg.png");
382 new_image("setformat_bg", "setformat_bg.png");
385 timebar_view_data = new_image("timebar_view.png");
387 setformat_w = get_image("setformat_bg")->get_w();
388 setformat_h = get_image("setformat_bg")->get_h();
397 setformat_margin = 30;
398 setformat_channels_x = 25;
399 setformat_channels_y = 242;
400 setformat_channels_w = 250;
401 setformat_channels_h = 250;
407 new_toggle("playpatch.png",
412 "patch_checkedhi.png",
415 new_toggle("recordpatch.png",
420 "patch_checkedhi.png",
423 new_toggle("gangpatch.png",
428 "patch_checkedhi.png",
431 new_toggle("drawpatch.png",
436 "patch_checkedhi.png",
440 new_image_set("mutepatch_data",
444 "mutepatch_checked.png",
446 "mutepatch_checkedhi.png");
448 new_image_set("expandpatch_data",
450 "expandpatch_up.png",
451 "expandpatch_hi.png",
452 "expandpatch_checked.png",
453 "expandpatch_dn.png",
454 "expandpatch_checkedhi.png");
463 out_point = new_image_set(5,
468 "out_checkedhi.png");
469 in_point = new_image_set(5,
476 label_toggle = new_image_set(5,
477 "labeltoggle_up.png",
478 "labeltoggle_uphi.png",
480 "labeltoggle_dn.png",
481 "label_checkedhi.png");
484 statusbar_cancel_data = new_image_set(3,
485 "statusbar_cancel_up.png",
486 "statusbar_cancel_hi.png",
487 "statusbar_cancel_dn.png");
490 VFrame *editpanel_up = new_image("editpanel_up.png");
491 VFrame *editpanel_hi = new_image("editpanel_hi.png");
492 VFrame *editpanel_dn = new_image("editpanel_dn.png");
493 VFrame *editpanel_checked = new_image("editpanel_checked.png");
494 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
496 new_image("panel_divider", "panel_divider.png");
497 new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
498 new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
499 new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
502 new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
503 new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
504 new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
505 new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
506 new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
507 new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
508 new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
509 new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
510 new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
511 new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
512 new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
513 over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
514 overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
515 new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
516 new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
517 new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
518 new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
519 splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
520 new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
521 new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
522 new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
523 new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
524 new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
527 VFrame *transport_up = new_image("transportup.png");
528 VFrame *transport_hi = new_image("transporthi.png");
529 VFrame *transport_dn = new_image("transportdn.png");
531 new_button("end.png", transport_up, transport_hi, transport_dn, "end");
532 new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd");
533 new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev");
534 new_button("play.png", transport_up, transport_hi, transport_dn, "play");
535 new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd");
536 new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev");
537 new_button("pause.png", transport_up, transport_hi, transport_dn, "pause");
538 new_button("record.png", transport_up, transport_hi, transport_dn, "record");
539 new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe");
540 new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse");
541 new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind");
542 new_button("stop.png", transport_up, transport_hi, transport_dn, "stop");
543 new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec");
548 new_image("cwindow_inactive", "cwindow_inactive.png");
549 new_image("cwindow_active", "cwindow_active.png");
552 new_image_set("batch_render_start",
556 "batchstart_dn.png");
557 new_image_set("batch_render_stop",
562 new_image_set("batch_render_cancel",
564 "batchcancel_up.png",
565 "batchcancel_hi.png",
566 "batchcancel_dn.png");
568 new_image_set("category_button",
570 "preferencesbutton_dn.png",
571 "preferencesbutton_dnhi.png",
572 "preferencesbutton_dnlo.png");
574 new_image_set("category_button_checked",
576 "preferencesbutton_up.png",
577 "preferencesbutton_uphi.png",
578 "preferencesbutton_dnlo.png");
585 new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
586 new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
587 new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
588 new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
589 new_toggle("blank30x30.png",
590 new_image("locklabels_locked.png"),
591 new_image("locklabels_lockedhi.png"),
592 new_image("locklabels_unlocked.png"),
593 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
594 new_image("locklabels_unlockedhi.png"),
597 VFrame *cpanel_up = new_image("cpanel_up.png");
598 VFrame *cpanel_hi = new_image("cpanel_hi.png");
599 VFrame *cpanel_dn = new_image("cpanel_dn.png");
600 VFrame *cpanel_checked = new_image("cpanel_checked.png");
601 VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
604 new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
605 new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
606 new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
607 new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
608 new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
609 new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
610 new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
611 new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
612 new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
618 title_font = MEDIUMFONT_3D;
619 title_color = 0xbfbfbf;
620 recordgui_fixed_color = YELLOW;
621 recordgui_variable_color = RED;
623 channel_position_color = MEYELLOW;
624 resources->meter_title_w = 25;
627 #define CWINDOW_METER_MARGIN 5
628 #define VWINDOW_METER_MARGIN 5
630 void SUV::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
633 mbuttons_y = gui->mainmenu->get_h() + 1;
635 mbuttons_h = get_image("mbutton_bg")->get_h();
637 mclock_y = mbuttons_y - 1 + mbuttons_h + CWINDOW_METER_MARGIN;
638 mclock_w = get_image("clock_bg")->get_w() - 40;
639 mclock_h = get_image("clock_bg")->get_h();
640 mtimebar_x = get_image("patchbay_bg")->get_w();
641 mtimebar_y = mbuttons_y - 1 + mbuttons_h;
642 mtimebar_w = w - mtimebar_x;
643 mtimebar_h = get_image("timebar_bg")->get_h();
646 mzoom_y = h - get_image("statusbar")->get_h();
649 mstatus_y = mzoom_y + mzoom_h;
651 mstatus_h = h - mstatus_y;
652 mstatus_message_x = 10;
653 mstatus_message_y = 5;
654 mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 240;
655 mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h() - 3;
656 mstatus_progress_w = 230;
657 mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
658 mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
660 patchbay_y = mtimebar_y + mtimebar_h;
661 patchbay_w = get_image("patchbay_bg")->get_w();
662 patchbay_h = mzoom_y - patchbay_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
663 mcanvas_x = patchbay_x + patchbay_w;
664 mcanvas_y = mtimebar_y + mtimebar_h;
665 mcanvas_w = w - patchbay_w - BC_ScrollBar::get_span(SCROLL_VERT);
666 mcanvas_h = patchbay_h;
668 mhscroll_y = mcanvas_y + mcanvas_h;
669 mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT);
670 mvscroll_x = mcanvas_x + mcanvas_w;
671 mvscroll_y = mcanvas_y;
672 mvscroll_h = mcanvas_h;
675 void SUV::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
682 ccomposite_w = get_image("cpanel_bg")->get_w();
683 ccomposite_h = mwindow->session->cwindow_h -
684 get_image("cbuttons_left")->get_h();
686 cslider_y = ccomposite_h + 20;
688 cedit_y = cslider_y + BC_Slider::get_span(0);
690 ctransport_y = mwindow->session->cwindow_h -
691 get_image_set("autokeyframe")[0]->get_h() - 5;
692 ccanvas_x = ccomposite_x + ccomposite_w;
694 ccanvas_h = ccomposite_h;
696 cstatus_y = mwindow->session->cwindow_h -
697 get_image("cwindow_active")->get_h() - 30;
698 if(mwindow->edl->session->cwindow_meter)
700 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
701 mwindow->edl->session->cwindow_meter);
702 ccanvas_w = cmeter_x - ccanvas_x - 5;
706 cmeter_x = mwindow->session->cwindow_w;
707 ccanvas_w = cmeter_x - ccanvas_x;
714 ccomposite_x = -get_image("cpanel_bg")->get_w();
716 ccomposite_w = get_image("cpanel_bg")->get_w();
717 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
720 cslider_y = mwindow->session->cwindow_h;
722 cedit_y = cslider_y + 17;
724 ctransport_y = cedit_y + 40;
727 ccanvas_w = mwindow->session->cwindow_w;
728 ccanvas_h = mwindow->session->cwindow_h;
729 cmeter_x = mwindow->session->cwindow_w;
730 cstatus_x = mwindow->session->cwindow_w;
731 cstatus_y = mwindow->session->cwindow_h;
737 czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
738 czoom_y = ctransport_y + 5;
742 cmeter_h = mwindow->session->cwindow_h - cmeter_y;
744 cslider_w = ccanvas_x + ccanvas_w - cslider_x - 5;
745 ctimebar_x = ccanvas_x;
746 ctimebar_y = ccanvas_y + ccanvas_h;
747 ctimebar_w = ccanvas_w;
752 ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
753 ctime_y = ctransport_y;
755 cdest_y = czoom_y + 30;
761 void SUV::get_recordgui_sizes(RecordGUI *gui, int w, int h)
766 void SUV::get_rmonitor_sizes(int do_audio,
773 Theme::get_rmonitor_sizes(do_audio,
779 if(!do_video && do_audio)
781 rmonitor_meter_y -= 30;
782 rmonitor_meter_h += 30;
787 void SUV::get_vwindow_sizes(VWindowGUI *gui)
790 vmeter_h = mwindow->session->vwindow_h - cmeter_y;
793 vcanvas_h = mwindow->session->vwindow_h - get_image("vbuttons_left")->get_h();
795 if(mwindow->edl->session->vwindow_meter)
797 vmeter_x = mwindow->session->vwindow_w -
798 VWINDOW_METER_MARGIN -
799 MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
800 mwindow->edl->session->vwindow_meter);
801 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
805 vmeter_x = mwindow->session->vwindow_w;
806 vcanvas_w = mwindow->session->vwindow_w;
809 vtimebar_x = vcanvas_x;
810 vtimebar_y = vcanvas_y + vcanvas_h;
811 vtimebar_w = vcanvas_w;
815 vslider_y = vtimebar_y + 20;
816 vslider_w = vtimebar_w - vslider_x;
818 vedit_y = vslider_y + BC_Slider::get_span(0);
820 vtransport_y = mwindow->session->vwindow_h -
821 get_image_set("autokeyframe")[0]->get_h() - 5;
823 vtime_y = vedit_y + 20;
829 vzoom_x = vtime_x + 150;
831 vsource_x = vtime_x + 50;
832 vsource_y = vtransport_y + 5;
839 void SUV::build_icons()
841 new_image("mwindow_icon", "heroine_icon.png");
842 new_image("vwindow_icon", "heroine_icon.png");
843 new_image("cwindow_icon", "heroine_icon.png");
844 new_image("awindow_icon", "heroine_icon.png");
845 new_image("record_icon", "heroine_icon.png");
846 new_image("clip_icon", "clip_icon.png");
851 void SUV::build_bg_data()
854 channel_bg_data = new VFrame(get_image_data("channel_bg.png"));
855 channel_position_data = new VFrame(get_image_data("channel_position.png"));
858 new_image("resource1024", "resource1024.png");
859 new_image("resource512", "resource512.png");
860 new_image("resource256", "resource256.png");
861 new_image("resource128", "resource128.png");
862 new_image("resource64", "resource64.png");
863 new_image("resource32", "resource32.png");
864 new_image("plugin_bg_data", "plugin_bg.png");
865 new_image("title_bg_data", "title_bg.png");
866 new_image("vtimebar_bg_data", "vwindow_timebar.png");
871 void SUV::build_overlays()
873 keyframe_data = new VFrame(get_image_data("keyframe3.png"));
874 camerakeyframe_data = new VFrame(get_image_data("camerakeyframe.png"));
875 maskkeyframe_data = new VFrame(get_image_data("maskkeyframe.png"));
876 modekeyframe_data = new VFrame(get_image_data("modekeyframe.png"));
877 pankeyframe_data = new VFrame(get_image_data("pankeyframe.png"));
878 projectorkeyframe_data = new VFrame(get_image_data("projectorkeyframe.png"));
889 void SUV::draw_rwindow_bg(RecordGUI *gui)
894 // gui->draw_9segment(recordgui_batch_x - margin,
896 // mwindow->session->rwindow_w - recordgui_status_x + margin,
897 // recordgui_buttons_y,
899 // gui->draw_3segmenth(recordgui_options_x - margin2,
900 // recordgui_buttons_y - 5,
901 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
903 // y = recordgui_buttons_y - 5 + rgui_controls->get_h();
904 // gui->draw_9segment(0,
906 // mwindow->session->rwindow_w,
907 // mwindow->session->rwindow_h - y,
911 void SUV::draw_rmonitor_bg(RecordMonitorGUI *gui)
914 // int panel_w = 300;
915 // int x = rmonitor_meter_x - margin;
916 // int w = mwindow->session->rmonitor_w - x;
917 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
920 // mwindow->session->rmonitor_w,
921 // mwindow->session->rmonitor_h);
922 // gui->draw_9segment(x,
925 // mwindow->session->rmonitor_h,
934 void SUV::draw_mwindow_bg(MWindowGUI *gui)
937 gui->draw_3segmenth(mbuttons_x,
939 mwindow->session->mwindow_w,
940 get_image("mbutton_bg"));
942 int pdw = get_image("panel_divider")->get_w();
944 x += 9 * get_image("play")->get_w();
945 x += mtransport_margin; // the control buttons
947 gui->draw_vframe(get_image("panel_divider"),
948 x - toggle_margin / 2 - pdw / 2 + 2,
950 x += 2 * get_image("arrow")->get_w() + toggle_margin; // the mode buttons
952 gui->draw_vframe(get_image("panel_divider"),
953 x - toggle_margin / 2 - pdw / 2 + 2,
956 x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
957 gui->draw_vframe(get_image("panel_divider"),
958 x - toggle_margin / 2 - pdw / 2 + 2,
962 gui->draw_3segmenth(0,
963 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
964 get_image("patchbay_bg")->get_w(),
965 get_image("clock_bg"));
968 gui->draw_3segmentv(patchbay_x,
971 get_image("patchbay_bg"));
974 gui->set_color(BLACK);
975 gui->draw_box(mcanvas_x,
981 gui->draw_3segmenth(mtimebar_x,
984 get_image("timebar_bg"));
987 gui->set_color(0x373737);
988 gui->draw_box(mzoom_x,
990 mwindow->session->mwindow_w,
994 gui->draw_vframe(get_image("mscroll_filler"),
995 mhscroll_x + mhscroll_w,
996 mvscroll_y + mvscroll_h);
999 gui->draw_3segmenth(mzoom_x,
1002 get_image("statusbar"));
1007 void SUV::draw_cwindow_bg(CWindowGUI *gui)
1009 const int button_division = 450;
1010 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1011 gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1012 if(mwindow->edl->session->cwindow_meter)
1014 gui->draw_3segmenth(button_division,
1016 cmeter_x - CWINDOW_METER_MARGIN - button_division,
1017 get_image("cbuttons_right"));
1018 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1020 mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1021 mwindow->session->cwindow_h,
1022 get_image("cmeter_bg"));
1026 gui->draw_3segmenth(button_division,
1028 cmeter_x - CWINDOW_METER_MARGIN - button_division + 100,
1029 get_image("cbuttons_right"));
1033 void SUV::draw_vwindow_bg(VWindowGUI *gui)
1035 const int button_division = 325;
1036 gui->draw_3segmenth(0,
1039 get_image("vbuttons_left"));
1040 if(mwindow->edl->session->vwindow_meter)
1042 gui->draw_3segmenth(button_division,
1044 vmeter_x - VWINDOW_METER_MARGIN - button_division,
1045 get_image("cbuttons_right"));
1046 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
1048 mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1049 mwindow->session->vwindow_h,
1050 get_image("cmeter_bg"));
1054 gui->draw_3segmenth(button_division,
1056 vmeter_x - VWINDOW_METER_MARGIN - button_division + 100,
1057 get_image("cbuttons_right"));
1061 gui->draw_3segmenth(vtime_x - 20,
1064 get_image("vclock"));
1067 void SUV::get_preferences_sizes()
1072 void SUV::draw_preferences_bg(PreferencesWindow *gui)
1074 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1077 void SUV::get_new_sizes(NewWindow *gui)
1081 void SUV::draw_new_bg(NewWindow *gui)
1083 gui->draw_vframe(get_image("new_bg"), 0, 0);
1086 void SUV::draw_setformat_bg(SetFormatWindow *gui)
1088 gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1092 void SUV::get_plugindialog_sizes()
1095 plugindialog_new_x = x;
1096 plugindialog_new_y = y;
1097 plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
1098 plugindialog_shared_y = y;
1099 plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
1100 plugindialog_module_y = y;
1102 plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - 10;
1103 plugindialog_new_h = mwindow->session->plugindialog_h - 100;
1104 plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - 10;
1105 plugindialog_shared_h = mwindow->session->plugindialog_h - 100;
1106 plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - 10;
1107 plugindialog_module_h = mwindow->session->plugindialog_h - 100;
1109 plugindialog_newattach_x = plugindialog_new_x + 20;
1110 plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + 10;
1111 plugindialog_sharedattach_x = plugindialog_shared_x + 20;
1112 plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + 10;
1113 plugindialog_moduleattach_x = plugindialog_module_x + 20;
1114 plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + 10;