4 * Copyright (C) 2008 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"
25 #include "cwindowgui.h"
26 #include "blondcvtheme.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"
50 PluginClient* new_plugin(PluginServer *server)
52 return new BlondCVThemeMain(server);
61 BlondCVThemeMain::BlondCVThemeMain(PluginServer *server)
62 : PluginTClient(server)
66 BlondCVThemeMain::~BlondCVThemeMain()
70 const char* BlondCVThemeMain::plugin_title() { return N_("Blond-cv"); }
72 Theme* BlondCVThemeMain::new_theme()
74 theme = new BlondCVTheme;
75 extern unsigned char _binary_theme_blond_cv_data_start[];
76 theme->set_data(_binary_theme_blond_cv_data_start);
87 BlondCVTheme::BlondCVTheme()
92 BlondCVTheme::~BlondCVTheme()
94 delete camerakeyframe_data;
95 delete channel_bg_data;
96 delete channel_position_data;
98 delete maskkeyframe_data;
99 delete modekeyframe_data;
100 delete pankeyframe_data;
101 delete projectorkeyframe_data;
104 void BlondCVTheme::initialize()
106 BC_Resources *resources = BC_WindowBase::get_resources();
107 resources->generic_button_images = new_image_set(3,
111 resources->horizontal_slider_data = new_image_set(6,
117 "hslider_bg_dn.png");
118 resources->vertical_slider_data = new_image_set(6,
124 "hslider_bg_dn.png");
125 for( int i=0; i<6; ++i )
126 resources->vertical_slider_data[i]->rotate90();
128 resources->progress_images = new_image_set(2,
131 resources->tumble_data = new_image_set(4,
136 resources->listbox_button = new_image_set(4,
137 "listbox_button_up.png",
138 "listbox_button_hi.png",
139 "listbox_button_dn.png",
140 "listbox_button_hi.png");
141 resources->listbox_column = new_image_set(3,
142 "listbox_column_up.png",
143 "listbox_column_hi.png",
144 "listbox_column_dn.png");
145 resources->pan_data = new_image_set(7,
151 "pan_channel_small.png",
152 "pan_stick_small.png");
153 resources->pan_text_color = WHITE;
155 resources->pot_images = new_image_set(3,
160 resources->text_default = 0x000000;
161 resources->text_background = 0xffffff;
162 resources->text_background_disarmed = 0xff0000;
163 resources->text_border1 = 0x4a484a; // (top outer)
164 resources->text_border2 = 0x000000; // (top inner)
165 resources->text_border3 = 0xacaeac; // (bottom inner)
166 resources->text_border4 = 0xffffff; // (bottom outer)
167 resources->text_inactive_highlight = 0xacacac;
168 resources->checkbox_images = new_image_set(5,
171 "checkbox_checked.png",
173 "checkbox_checkedhi.png");
175 resources->bg_color = BLOND;
176 resources->default_text_color = 0x000000;
177 resources->menu_title_text = 0x000000;
178 resources->popup_title_text = 0x000000;
179 resources->menu_item_text = 0x000000;
180 resources->radial_images = new_image_set(5,
183 "radial_checked.png",
185 "radial_checkedhi.png");
187 resources->generic_button_margin = 15;
188 resources->pot_needle_color = resources->text_default;
189 resources->pot_offset = 1;
190 resources->progress_text = resources->text_default;
191 resources->meter_font_color = RED;
192 resources->xmeter_images = new_image_set(7,
200 resources->ymeter_images = new_image_set(7,
209 resources->menu_light = 0x00cacd;
210 resources->menu_highlighted = 0x9c95ff;
211 resources->menu_down = 0x007d7b;
212 resources->menu_up = 0x009594;
213 resources->menu_shadow = 0x004a4a;
214 resources->popupmenu_margin = 10; // ugly
215 resources->popupmenu_triangle_margin = 15; // ugly
216 resources->hscroll_data = new_image_set(10,
217 "hscroll_center_up.png",
218 "hscroll_center_hi.png",
219 "hscroll_center_dn.png",
221 "hscroll_back_up.png",
222 "hscroll_back_hi.png",
223 "hscroll_back_dn.png",
224 "hscroll_fwd_up.png",
225 "hscroll_fwd_hi.png",
226 "hscroll_fwd_dn.png");
228 resources->listbox_title_color = 0x000000;
229 resources->vscroll_data = new_image_set(10,
230 "vscroll_center_up.png",
231 "vscroll_center_hi.png",
232 "vscroll_center_dn.png",
234 "vscroll_back_up.png",
235 "vscroll_back_hi.png",
236 "vscroll_back_dn.png",
237 "vscroll_fwd_up.png",
238 "vscroll_fwd_hi.png",
239 "vscroll_fwd_dn.png");
241 resources->listbox_title_margin = 0;
242 resources->listbox_title_hotspot = 5; // No. of pixels around the borders to allow dragging
243 resources->listbox_border1 = 0x4a484a; // (top outer)
244 resources->listbox_border2 = 0x000000; // (top inner)
245 resources->listbox_border3 = 0xffe200; // (bottom inner)
246 resources->listbox_border4 = 0xffffff; // (bottom outer)
247 resources->listbox_highlighted = 0xeee6ee;
248 resources->listbox_inactive = 0xffffffff; // (background)
249 resources->listbox_bg = new_image("list_bg.png");
250 resources->listbox_text = 0x000000;
251 resources->ok_images = new_button("ok.png",
257 resources->dirbox_margin = 50;
258 resources->filebox_margin = 101;
259 resources->file_color = 0x000000;
260 resources->directory_color = 0x0000ff;
263 rgui_batch = new_image("recordgui_batch.png");
264 rgui_controls = new_image("recordgui_controls.png");
265 rgui_list = new_image("recordgui_list.png");
266 rmonitor_panel = new_image("recordmonitor_panel.png");
267 rmonitor_meters = new_image("recordmonitor_meters.png");
269 resources->filebox_icons_images = new_button("icons.png",
270 "fileboxbutton_up.png",
271 "fileboxbutton_hi.png",
272 "fileboxbutton_dn.png",
275 resources->filebox_text_images = new_button("text.png",
276 "fileboxbutton_up.png",
277 "fileboxbutton_hi.png",
278 "fileboxbutton_dn.png",
281 resources->filebox_newfolder_images = new_button("folder.png",
282 "fileboxbutton_up.png",
283 "fileboxbutton_hi.png",
284 "fileboxbutton_dn.png",
285 "filebox_newfolder");
287 resources->filebox_rename_images = new_button("rename.png",
288 "fileboxbutton_up.png",
289 "fileboxbutton_hi.png",
290 "fileboxbutton_dn.png",
293 resources->filebox_updir_images = new_button("updir.png",
294 "fileboxbutton_up.png",
295 "fileboxbutton_hi.png",
296 "fileboxbutton_dn.png",
299 resources->filebox_delete_images = new_button("delete.png",
300 "fileboxbutton_up.png",
301 "fileboxbutton_hi.png",
302 "fileboxbutton_dn.png",
305 resources->filebox_reload_images = new_button("reload.png",
306 "fileboxbutton_up.png",
307 "fileboxbutton_hi.png",
308 "fileboxbutton_dn.png",
312 resources->filebox_descend_images = new_button("openfolder.png",
318 resources->usethis_button_images =
319 resources->ok_images = new_button("ok.png",
331 resources->cancel_images = new_button("cancel.png",
337 new_button("cancel.png",
341 "new_cancel_images");
343 new_toggle("loadmode_new.png",
346 "loadmode_checked.png",
348 "loadmode_checkedhi.png",
350 new_toggle("loadmode_none.png",
353 "loadmode_checked.png",
355 "loadmode_checkedhi.png",
357 new_toggle("loadmode_newcat.png",
360 "loadmode_checked.png",
362 "loadmode_checkedhi.png",
364 new_toggle("loadmode_cat.png",
367 "loadmode_checked.png",
369 "loadmode_checkedhi.png",
371 new_toggle("loadmode_newtracks.png",
374 "loadmode_checked.png",
376 "loadmode_checkedhi.png",
377 "loadmode_newtracks");
378 new_toggle("loadmode_paste.png",
381 "loadmode_checked.png",
383 "loadmode_checkedhi.png",
385 new_toggle("loadmode_resource.png",
388 "loadmode_checked.png",
390 "loadmode_checkedhi.png",
391 "loadmode_resource");
392 new_toggle("loadmode_nested.png",
395 "loadmode_checked.png",
397 "loadmode_checkedhi.png",
400 resources->bar_data = new_image("bar", "bar.png");
403 resources->min_menu_w = 0;
404 resources->menu_popup_bg = 0; // if (0) use menu_light, menu_up, menu_shadow
405 resources->menu_item_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
406 resources->menu_bar_bg = 0; // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8
407 resources->menu_title_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
410 resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images
412 resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C
414 resources->vertical_slider_data = new_image_set(6,
415 "vertical_slider_fg_up.png",
416 "vertical_slider_fg_hi.png",
417 "vertical_slider_fg_dn.png",
418 "vertical_slider_bg_up.png",
419 "vertical_slider_bg_hi.png",
420 "vertical_slider_bg_dn.png");
421 resources->listbox_expand = new_image_set(5,
422 "listbox_expandup.png",
423 "listbox_expanduphi.png",
424 "listbox_expandchecked.png",
425 "listbox_expanddn.png",
426 "listbox_expandcheckedhi.png");
427 resources->listbox_up = new_image("listbox_up.png");
428 resources->listbox_dn = new_image("listbox_dn.png");
431 mbutton_left = new_image("mbutton_left.png");
432 mbutton_right = new_image("mbutton_right.png");
433 new_image("timebar_bg", "timebar_bg.png");
434 new_image("timebar_brender", "timebar_brender.png");
435 new_image("clock_bg", "mclock.png");
436 new_image("patchbay_bg", "patchbay_bg.png");
437 tracks_bg = new_image("tracks_bg.png");
438 zoombar_left = new_image("zoombar_left.png");
439 zoombar_right = new_image("zoombar_right.png");
440 statusbar_left = new_image("statusbar_left.png");
441 statusbar_right = new_image("statusbar_right.png");
443 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
444 new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
445 new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
447 new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
448 new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
449 new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
450 new_button("swap_extents.png",
455 preferences_category_overlap = 0;
456 preferencescategory_x = 5;
457 preferencescategory_y = 5;
458 preferencestitle_x = 5;
459 preferencestitle_y = 10;
460 preferencesoptions_x = 5;
461 preferencesoptions_y = 0;
463 cpanel_bg = new_image("cpanel_bg.png");
464 cbuttons_left = new_image("cbuttons_left.png");
465 cbuttons_right = new_image("cbuttons_right.png");
466 cmeter_bg = new_image("cmeter_bg.png");
468 ctimebar_x = ccanvas_x;
469 ctimebar_y = ccanvas_y + ccanvas_h;
470 ctimebar_w = ccanvas_w;
472 message_normal = resources->text_default;
474 mtransport_margin = 11;
477 vbuttons_left = new_image("vbuttons_left.png");
478 vbuttons_right = new_image("vbuttons_right.png");
479 vmeter_bg = new_image("vmeter_bg.png");
481 new_image("mbutton_bg", "mbutton_bg.png");
482 new_image("mbutton_blue", "mbutton_blue.png");
483 new_image("tracks_bg","tracks_bg.png");
484 new_image("zoombar_left","zoombar_left.png");
485 new_image("zoombar_right","zoombar_right.png");
486 new_image("statusbar_left","statusbar_left.png");
487 new_image("statusbar_right","statusbar_right.png");
488 preferences_bg = new_image("preferences_bg.png");
490 new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
491 new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
493 new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
494 new_image("mode_add", "mode_add.png");
495 new_image("mode_divide", "mode_divide.png");
496 new_image("mode_multiply", "mode_multiply.png");
497 new_image("mode_normal", "mode_normal.png");
498 new_image("mode_replace", "mode_replace.png");
499 new_image("mode_subtract", "mode_subtract.png");
500 new_image("mode_max", "mode_max.png");
501 new_image("mode_min", "mode_min.png");
503 new_bg = new_image("new_bg.png");
504 setformat_bg = new_image("setformat_bg2.png");
506 new_toggle("plugin_on.png",
507 "pluginbutton_hi.png",
508 "pluginbutton_hi.png",
509 "pluginbutton_select.png",
510 "pluginbutton_dn.png",
511 "pluginbutton_selecthi.png",
514 new_toggle("plugin_show.png",
516 "pluginbutton_hi.png",
517 "pluginbutton_select.png",
518 "pluginbutton_dn.png",
519 "pluginbutton_selecthi.png",
521 new_image("cpanel_bg", "cpanel_bg.png");
522 new_image("cbuttons_left", "cbuttons_left.png");
523 new_image("cbuttons_right", "cbuttons_right.png");
524 new_image("cmeter_bg", "cmeter_bg.png");
525 new_image("vbuttons_left", "vbuttons_left.png");
526 timebar_view_data = new_image("timebar_view.png");
528 new_image("preferences_bg", "preferences_bg.png");
535 new_image("new_bg", "new_bg.png");
536 new_image("setformat_bg", "setformat_bg2.png");
541 setformat_w = get_image("setformat_bg")->get_w();
542 setformat_h = get_image("setformat_bg")->get_h();
545 setformat_margin = 30;
546 setformat_channels_x = 25;
547 setformat_channels_y = 242;
548 setformat_channels_w = 250;
549 setformat_channels_h = 250;
555 new_image_set("playpatch_data",
559 "playpatch_checked.png",
561 "playpatch_checkedhi.png");
563 new_image_set("recordpatch_data",
565 "recordpatch_up.png",
566 "recordpatch_hi.png",
567 "recordpatch_checked.png",
568 "recordpatch_dn.png",
569 "recordpatch_checkedhi.png");
571 new_image_set("gangpatch_data",
575 "gangpatch_checked.png",
577 "gangpatch_checkedhi.png");
579 new_image_set("drawpatch_data",
583 "drawpatch_checked.png",
585 "drawpatch_checkedhi.png");
588 new_image_set("mutepatch_data",
592 "mutepatch_checked.png",
594 "mutepatch_checkedhi.png");
598 new_image_set("expandpatch_data",
600 "expandpatch_up.png",
601 "expandpatch_hi.png",
602 "expandpatch_checked.png",
603 "expandpatch_dn.png",
604 "expandpatch_checkedhi.png");
605 new_image_set("drawpatch_data", 5, "drawpatch_up.png", "drawpatch_hi.png", "drawpatch_checked.png", "drawpatch_dn.png", "drawpatch_checkedhi.png");
606 new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png");
607 new_image_set("gangpatch_data", 5, "gangpatch_up.png", "gangpatch_hi.png", "gangpatch_checked.png", "gangpatch_dn.png", "gangpatch_checkedhi.png");
608 new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png");
609 new_image_set("playpatch_data", 5, "playpatch_up.png", "playpatch_hi.png", "playpatch_checked.png", "playpatch_dn.png", "playpatch_checkedhi.png");
610 new_image_set("recordpatch_data", 5, "recordpatch_up.png", "recordpatch_hi.png", "recordpatch_checked.png", "recordpatch_dn.png", "recordpatch_checkedhi.png");
618 out_point = new_image_set(5,
623 "out_checkedhi.png");
624 in_point = new_image_set(5,
631 label_toggle = new_image_set(5,
632 "labeltoggle_up.png",
633 "labeltoggle_uphi.png",
635 "labeltoggle_dn.png",
636 "label_checkedhi.png");
638 ffmpeg_toggle = new_image_set(5,
645 proxy_toggle = new_image_set(5,
652 shbtn_data = new_image_set(3,
657 new_image_set("preset_edit",
663 statusbar_cancel_data = new_image_set(3,
664 "statusbar_cancel_up.png",
665 "statusbar_cancel_hi.png",
666 "statusbar_cancel_dn.png");
669 VFrame *editpanel_up = new_image("editpanel_up.png");
670 VFrame *editpanel_hi = new_image("editpanel_hi.png");
671 VFrame *editpanel_dn = new_image("editpanel_dn.png");
672 VFrame *editpanel_checked = new_image("editpanel_checked.png");
673 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
675 new_image("panel_divider", "panel_divider.png");
676 new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
677 new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
678 new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
680 new_toggle("histogram_toggle.png",
687 new_toggle("histogram_rgb.png",
693 "histogram_rgb_toggle");
694 new_toggle("waveform.png",
701 new_toggle("waveform_rgb.png",
707 "waveform_rgb_toggle");
708 new_toggle("scope.png",
716 new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
717 new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
719 //bottom_justify = new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
720 //center_justify = new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
721 //channel_data = new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn);
722 new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
723 new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
724 new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
725 new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
726 new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
727 new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
728 new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
729 new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
730 new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
731 new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
732 new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
733 new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
734 over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
735 overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
736 new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
737 new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
738 new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
739 new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
740 new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
741 new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
742 splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
743 new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
744 new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
745 new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
746 new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
747 //new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
748 //wrench_data = new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn);
751 new_image("cwindow_inactive", "cwindow_inactive.png");
752 new_image("cwindow_active", "cwindow_active.png");
754 #define TRANSPORT_LEFT_IMAGES "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
755 #define TRANSPORT_CENTER_IMAGES "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
756 #define TRANSPORT_RIGHT_IMAGES "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
758 new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
759 new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
760 new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
761 new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
762 new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
763 new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
764 new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
765 new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
766 new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
767 new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
768 new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
769 new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
770 new_button("stop.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
771 new_image_set("batch_render_start",
775 "batchstart_dn.png");
776 new_image_set("batch_render_stop",
781 new_image_set("batch_render_cancel",
783 "batchcancel_up.png",
784 "batchcancel_hi.png",
785 "batchcancel_dn.png");
788 new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
789 new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
790 new_image_set("category_button",
792 "preferencesbutton_dn.png",
793 "preferencesbutton_dnhi.png",
794 "preferencesbutton_dnlo.png");
795 //camera_data = new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
796 //crop_data = new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
797 new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
798 //magnify_data = new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
799 //mask_data = new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
800 //proj_data = new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
801 //protect_data = new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
802 //show_meters = new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
803 //titlesafe_data = new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
804 //tool_data = new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
805 new_toggle("eyedrop.png",
813 new_image_set("category_button_checked",
815 "preferencesbutton_up.png",
816 "preferencesbutton_uphi.png",
817 "preferencesbutton_dnlo.png");
824 static VFrame **transport_bg = new_image_set(3,
828 new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
829 build_transport((char*)"end", get_image_data("end.png"), transport_bg, 2);
830 build_transport((char*)"fastfwd", get_image_data("fastfwd.png"), transport_bg, 1);
831 build_transport((char*)"fastrev", get_image_data("fastrev.png"), transport_bg, 1);
832 build_transport((char*)"play", get_image_data("play.png"), transport_bg, 1);
833 build_transport((char*)"framefwd", get_image_data("framefwd.png"), transport_bg, 1);
834 build_transport((char*)"framerev", get_image_data("framerev.png"), transport_bg, 1);
835 build_transport((char*)"pause", get_image_data("pause.png"), transport_bg, 1);
836 build_transport((char*)"record", get_image_data("record.png"), transport_bg, 1);
837 build_transport((char*)"singleframe", get_image_data("singleframe.png"), transport_bg, 1);
838 build_transport((char*)"reverse", get_image_data("reverse.png"), transport_bg, 1);
839 build_transport((char*)"rewind", get_image_data("rewind.png"), transport_bg, 0);
840 build_transport((char*)"stop", get_image_data("stop.png"), transport_bg, 1);
841 build_transport((char*)"stoprec", get_image_data("stoprec.png"), transport_bg, 2);
843 VFrame *cpanel_up = new_image("editpanel_up.png");
844 VFrame *cpanel_hi = new_image("editpanel_hi.png");
845 VFrame *cpanel_dn = new_image("editpanel_dn.png");
846 VFrame *cpanel_checked = new_image("editpanel_checked.png");
847 VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
848 new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
849 new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
850 new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
851 new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
852 new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
853 new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
854 new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
855 new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
856 new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
857 new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
858 // toggle for tangent mode (compositor/tool window)
859 new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
860 new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
864 new_toggle("blank30x30.png",
865 new_image("locklabels_locked.png"),
866 new_image("locklabels_lockedhi.png"),
867 new_image("locklabels_unlocked.png"),
868 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
869 new_image("locklabels_unlockedhi.png"),
871 title_font = MEDIUMFONT_3D;
873 recordgui_fixed_color = YELLOW;
874 recordgui_variable_color = RED;
876 int font_size = (int)(14*resources->font_scale + 0.5);
877 char string[BCTEXTLEN];
878 sprintf(string,"-*-helvetica-bold-r-normal-*-%d-*", font_size);
879 delete [] resources->medium_font;
880 resources->medium_font = cstrdup(string);
882 channel_position_color = MEYELLOW;
883 resources->meter_title_w = 25;
885 // (asset) edit info text color
886 edit_font_color = YELLOW;
889 resources->label_images = new_image_set(5,
892 "radial_checked.png",
894 "radial_checkedhi.png");
896 /* resources->type_to_icon = new_image_set(5,
906 #define CWINDOW_METER_MARGIN 5
907 #define VWINDOW_METER_MARGIN 5
910 void BlondCVTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
913 mbuttons_y = gui->mainmenu->get_h();
914 mbuttons_w = w - (ffmpeg_toggle[0]->get_w()+2 + proxy_toggle[0]->get_w()+2);
915 mbuttons_h = get_image("mbutton_bg")->get_h();
917 mclock_y = mbuttons_y + mbuttons_h + CWINDOW_METER_MARGIN;
918 mclock_w = get_image("clock_bg")->get_w() - 40;
919 mclock_h = get_image("clock_bg")->get_h();
920 mtimebar_x = get_image("patchbay_bg")->get_w();
921 mtimebar_y = mbuttons_y + mbuttons_h;
922 mtimebar_w = w - mtimebar_x;
923 mtimebar_h = get_image("timebar_bg")->get_h();
925 mstatus_y = h - statusbar_left->get_h();
927 mstatus_h = statusbar_left->get_h();
928 mstatus_message_x = 10;
929 mstatus_message_y = 5;
930 mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 240;
931 mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
932 mstatus_progress_w = 230;
933 mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
934 mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
936 mzoom_y = mstatus_y - zoombar_left->get_h();
937 mzoom_h = zoombar_left->get_h();
940 patchbay_y = mtimebar_y + mtimebar_h;
941 patchbay_w = get_image("patchbay_bg")->get_w();
942 patchbay_h = mzoom_y - patchbay_y;
944 mcanvas_y = mtimebar_y + mtimebar_h;
946 mcanvas_h = patchbay_h;
948 mhscroll_y = mcanvas_y + mcanvas_h;
949 mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT) - patchbay_w;
950 mvscroll_x = mcanvas_x + mcanvas_w;
951 mvscroll_y = mcanvas_y;
952 mvscroll_h = mcanvas_h;
955 void BlondCVTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
961 ccomposite_w = cpanel_bg->get_w();
962 ccomposite_h = mwindow->session->cwindow_h - cbuttons_left->get_h();
964 cedit_y = ccomposite_h + 17;
966 ctransport_y = mwindow->session->cwindow_h - get_image_set("autokeyframe")[0]->get_h();
967 ccanvas_x = ccomposite_x + ccomposite_w;
969 ccanvas_h = ccomposite_h;
971 cstatus_y = mwindow->session->cwindow_h - 40;
972 if(mwindow->edl->session->cwindow_meter)
974 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(this,mwindow->edl->session->audio_channels,
975 mwindow->edl->session->cwindow_meter);
976 ccanvas_w = cmeter_x - ccanvas_x - 5;
980 cmeter_x = mwindow->session->cwindow_w;
981 ccanvas_w = cmeter_x - ccanvas_x;
988 ccomposite_x = -cpanel_bg->get_w();
990 ccomposite_w = cpanel_bg->get_w();
991 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
994 cedit_y = mwindow->session->cwindow_h + 17;
996 ctransport_y = cedit_y + 40;
999 ccanvas_w = mwindow->session->cwindow_w;
1000 ccanvas_h = mwindow->session->cwindow_h;
1001 cmeter_x = mwindow->session->cwindow_w;
1002 cstatus_x = mwindow->session->cwindow_w;
1003 cstatus_y = mwindow->session->cwindow_h;
1009 czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
1010 czoom_y = ctransport_y + 5;
1014 cmeter_h = mwindow->session->cwindow_h - cmeter_y;
1016 cslider_w = ccanvas_x + ccanvas_w - cslider_x - 5;
1017 ctimebar_x = ccanvas_x;
1018 ctimebar_y = ccanvas_y + ccanvas_h;
1019 ctimebar_w = ccanvas_w;
1024 ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
1025 ctime_y = ctransport_y;
1027 cdest_y = czoom_y + 30;
1032 void BlondCVTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
1035 recordgui_status_x = 10;
1036 recordgui_status_y = 10;
1037 recordgui_status_x2 = 160;
1038 recordgui_batch_x = 310;
1039 recordgui_batch_y = 10;
1040 recordgui_batchcaption_x = recordgui_batch_x + 110;
1043 recordgui_transport_x = recordgui_batch_x;
1044 recordgui_transport_y = recordgui_batch_y + 150;
1046 //recordgui_buttons_x = recordgui_batch_x - 50;
1047 //recordgui_buttons_y = recordgui_transport_y + 40;
1048 //recordgui_options_x = recordgui_buttons_x;
1049 //recordgui_options_y = recordgui_buttons_y + 35;
1051 recordgui_batches_x = 10;
1052 recordgui_batches_y = 270;
1053 recordgui_batches_w = w - 20;
1054 recordgui_batches_h = h - recordgui_batches_y - 70;
1055 recordgui_loadmode_x = w / 2 - loadmode_w / 2;
1056 recordgui_loadmode_y = h - 60;
1058 recordgui_controls_x = 10;
1059 recordgui_controls_y = h - 40;
1062 void BlondCVTheme::get_rmonitor_sizes(int do_audio,
1069 Theme::get_rmonitor_sizes(do_audio,
1075 if(!do_video && do_audio)
1077 rmonitor_meter_y -= 30;
1078 rmonitor_meter_h += 30;
1083 void BlondCVTheme::get_vwindow_sizes(VWindowGUI *gui)
1086 vmeter_h = mwindow->session->vwindow_h - cmeter_y;
1089 vcanvas_h = mwindow->session->vwindow_h - vbuttons_left->get_h();
1091 if(mwindow->edl->session->vwindow_meter)
1093 rmonitor_meter_y -= 30;
1094 rmonitor_meter_h += 30;
1095 vmeter_x = mwindow->session->vwindow_w -
1096 VWINDOW_METER_MARGIN -
1097 MeterPanel::get_meters_width(this,
1098 mwindow->edl->session->audio_channels,
1099 mwindow->edl->session->vwindow_meter);
1100 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
1104 vmeter_x = mwindow->session->vwindow_w;
1105 vcanvas_w = mwindow->session->vwindow_w;
1108 vtimebar_x = vcanvas_x;
1109 vtimebar_y = vcanvas_y + vcanvas_h;
1110 vtimebar_w = vcanvas_w;
1114 vslider_y = vtimebar_y + 25;
1115 vslider_w = vtimebar_w - vslider_x;
1117 vedit_y = vslider_y + BC_Slider::get_span(0);
1119 vtransport_y = mwindow->session->vwindow_h -
1120 get_image_set("autokeyframe")[0]->get_h();
1122 vtime_y = vedit_y + 10;
1130 void BlondCVTheme::build_icons()
1132 new_image("mwindow_icon", "heroine_icon.png");
1133 new_image("vwindow_icon", "heroine_icon.png");
1134 new_image("cwindow_icon", "heroine_icon.png");
1135 new_image("awindow_icon", "heroine_icon.png");
1136 new_image("record_icon", "heroine_icon.png");
1141 void BlondCVTheme::build_bg_data()
1144 channel_bg_data = new VFramePng(get_image_data("channel_bg.png"));
1145 channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1148 new_image("resource1024", "resource1024.png");
1149 new_image("resource512", "resource512.png");
1150 new_image("resource256", "resource256.png");
1151 new_image("resource128", "resource128.png");
1152 new_image("resource64", "resource64.png");
1153 new_image("resource32", "resource32.png");
1154 new_image("plugin_bg_data", "plugin_bg.png");
1155 new_image("title_bg_data", "title_bg.png");
1156 new_image("vtimebar_bg_data", "vwindow_timebar.png");
1161 void BlondCVTheme::build_overlays()
1163 keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1164 camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1165 maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1166 modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1167 pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1168 projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1179 void BlondCVTheme::draw_rwindow_bg(RecordGUI *gui)
1183 // int margin2 = 80;
1184 // gui->draw_9segment(recordgui_batch_x - margin,
1186 // mwindow->session->rwindow_w - recordgui_status_x + margin,
1187 // recordgui_buttons_y,
1189 // gui->draw_3segmenth(recordgui_options_x - margin2,
1190 // recordgui_buttons_y - 5,
1191 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
1193 // y = recordgui_buttons_y - 5 + rgui_controls->get_h();
1194 // gui->draw_9segment(0,
1196 // mwindow->session->rwindow_w,
1197 // mwindow->session->rwindow_h - y,
1201 void BlondCVTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
1204 // int panel_w = 300;
1205 // int x = rmonitor_meter_x - margin;
1206 // int w = mwindow->session->rmonitor_w - x;
1207 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1208 // gui->clear_box(0,
1210 // mwindow->session->rmonitor_w,
1211 // mwindow->session->rmonitor_h);
1212 // gui->draw_9segment(x,
1215 // mwindow->session->rmonitor_h,
1216 // rmonitor_meters);
1224 void BlondCVTheme::draw_mwindow_bg(MWindowGUI *gui)
1227 gui->draw_3segmenth(mbuttons_x,
1231 gui->draw_3segmenth(mbuttons_x + 750,
1237 gui->draw_3segmenth(0,
1238 mbuttons_y + mbutton_left->get_h(),
1239 get_image("patchbay_bg")->get_w(),
1240 get_image("clock_bg"));
1243 gui->draw_3segmentv(patchbay_x,
1246 get_image("patchbay_bg"));
1249 gui->draw_9segment(mcanvas_x,
1256 gui->draw_3segmenth(mtimebar_x,
1259 get_image("timebar_bg"));
1262 int zoombar_center = 710;
1263 gui->draw_3segmenth(mzoom_x,
1267 if(mzoom_w > zoombar_center)
1268 gui->draw_3segmenth(mzoom_x + zoombar_center,
1270 mzoom_w - zoombar_center,
1274 gui->draw_3segmenth(mstatus_x,
1279 if(mstatus_w > zoombar_center)
1280 gui->draw_3segmenth(mstatus_x + zoombar_center,
1282 mstatus_w - zoombar_center,
1286 void BlondCVTheme::draw_cwindow_bg(CWindowGUI *gui)
1288 const int button_division = 570;
1289 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1290 gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1291 if(mwindow->edl->session->cwindow_meter)
1293 gui->draw_3segmenth(button_division,
1295 cmeter_x - CWINDOW_METER_MARGIN - button_division,
1296 get_image("cbuttons_right"));
1297 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1299 mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1300 mwindow->session->cwindow_h,
1301 get_image("cmeter_bg"));
1305 gui->draw_3segmenth(button_division,
1307 cmeter_x - CWINDOW_METER_MARGIN - button_division + 100,
1308 get_image("cbuttons_right"));
1312 void BlondCVTheme::draw_vwindow_bg(VWindowGUI *gui)
1314 const int button_division = 400;
1315 gui->draw_3segmenth(0,
1318 get_image("vbuttons_left"));
1319 if(mwindow->edl->session->vwindow_meter)
1321 gui->draw_3segmenth(button_division,
1323 vmeter_x - VWINDOW_METER_MARGIN - button_division,
1324 get_image("cbuttons_right"));
1325 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
1327 mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1328 mwindow->session->vwindow_h,
1329 get_image("cmeter_bg"));
1333 gui->draw_3segmenth(button_division,
1335 vmeter_x - VWINDOW_METER_MARGIN - button_division + 100,
1336 get_image("cbuttons_right"));
1340 void BlondCVTheme::get_preferences_sizes()
1345 void BlondCVTheme::draw_preferences_bg(PreferencesWindow *gui)
1347 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1350 void BlondCVTheme::get_new_sizes(NewWindow *gui)
1354 void BlondCVTheme::draw_new_bg(NewWindow *gui)
1356 gui->draw_vframe(get_image("new_bg"), 0, 0);
1359 void BlondCVTheme::draw_setformat_bg(SetFormatWindow *gui)
1361 gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1362 gui->draw_vframe(setformat_bg, 0, 0);
1366 // pmd: SUV (same), 1_2_2blond (nonexist)
1367 void BlondCVTheme::get_plugindialog_sizes()
1370 plugindialog_new_x = x;
1371 plugindialog_new_y = y;
1372 plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
1373 plugindialog_shared_y = y;
1374 plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
1375 plugindialog_module_y = y;
1377 plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - 10;
1378 plugindialog_new_h = mwindow->session->plugindialog_h - 120;
1379 plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - 10;
1380 plugindialog_shared_h = mwindow->session->plugindialog_h - 120;
1381 plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - 10;
1382 plugindialog_module_h = mwindow->session->plugindialog_h - 120;
1384 plugindialog_newattach_x = plugindialog_new_x + 20;
1385 plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + 10;
1386 plugindialog_sharedattach_x = plugindialog_shared_x + 20;
1387 plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + 10;
1388 plugindialog_moduleattach_x = plugindialog_module_x + 20;
1389 plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + 10;