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"
24 #include "cwindowgui.h"
25 #include "defaulttheme.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"
49 PluginClient* new_plugin(PluginServer *server)
51 return new BlondThemeMain(server);
60 BlondThemeMain::BlondThemeMain(PluginServer *server)
61 : PluginTClient(server)
65 BlondThemeMain::~BlondThemeMain()
69 const char* BlondThemeMain::plugin_title()
74 Theme* BlondThemeMain::new_theme()
76 theme = new BlondTheme;
77 extern unsigned char _binary_defaulttheme_data_start[];
78 theme->set_data(_binary_defaulttheme_data_start);
89 BlondTheme::BlondTheme()
94 BlondTheme::~BlondTheme()
98 void BlondTheme::initialize()
100 BC_Resources *resources = BC_WindowBase::get_resources();
103 resources->text_default = 0x000000;
104 resources->text_background = 0xffffff;
105 resources->text_border1 = 0x4a484a; // (top outer)
106 resources->text_border2 = 0x000000; // (top inner)
107 resources->text_border3 = 0xacaeac; // (bottom inner)
108 resources->text_border4 = 0xffffff; // (bottom outer)
109 resources->text_inactive_highlight = 0xacacac;
111 resources->bg_color = BLOND;
112 resources->default_text_color = 0x000000;
113 resources->menu_title_text = 0x000000;
114 resources->popup_title_text = 0x000000;
115 resources->menu_item_text = 0x000000;
117 resources->generic_button_margin = 15;
118 resources->pot_needle_color = resources->text_default;
119 resources->pot_offset = 1;
120 resources->progress_text = resources->text_default;
121 resources->meter_font_color = RED;
123 resources->menu_light = 0x00cacd;
124 resources->menu_highlighted = 0x9c95ff;
125 resources->menu_down = 0x007d7b;
126 resources->menu_up = 0x009594;
127 resources->menu_shadow = 0x004a4a;
128 resources->popupmenu_margin = 10; // ugly
129 resources->popupmenu_triangle_margin = 15; // ugly
131 resources->listbox_title_color = 0x000000;
133 resources->listbox_title_margin = 0;
134 resources->listbox_title_hotspot = 5; // No. of pixels around the borders to allow dragging
135 resources->listbox_border1 = 0x4a484a; // (top outer)
136 resources->listbox_border2 = 0x000000; // (top inner)
137 resources->listbox_border3 = 0xffe200; // (bottom inner)
138 resources->listbox_border4 = 0xffffff; // (bottom outer)
139 resources->listbox_highlighted = 0xeee6ee;
140 resources->listbox_inactive = 0xffffffff; // (background)
141 resources->listbox_bg = new_image("list_bg.png");
142 resources->listbox_text = 0x000000;
144 resources->dirbox_margin = 50;
145 resources->filebox_margin = 101;
146 resources->file_color = 0x000000;
147 resources->directory_color = 0x0000ff;
152 resources->filebox_icons_images = new_button("icons.png",
153 "fileboxbutton_up.png",
154 "fileboxbutton_hi.png",
155 "fileboxbutton_dn.png");
157 resources->filebox_text_images = new_button("text.png",
158 "fileboxbutton_up.png",
159 "fileboxbutton_hi.png",
160 "fileboxbutton_dn.png");
162 resources->filebox_newfolder_images = new_button("folder.png",
163 "fileboxbutton_up.png",
164 "fileboxbutton_hi.png",
165 "fileboxbutton_dn.png");
167 resources->filebox_updir_images = new_button("updir.png",
168 "fileboxbutton_up.png",
169 "fileboxbutton_hi.png",
170 "fileboxbutton_dn.png");
172 resources->filebox_delete_images = new_button("delete.png",
173 "fileboxbutton_up.png",
174 "fileboxbutton_hi.png",
175 "fileboxbutton_dn.png");
177 resources->filebox_reload_images = new_button("reload.png",
178 "fileboxbutton_up.png",
179 "fileboxbutton_hi.png",
180 "fileboxbutton_dn.png");
183 resources->filebox_descend_images = new_button("openfolder.png",
188 resources->usethis_button_images =
189 resources->ok_images = new_button("ok.png",
200 resources->cancel_images = new_button("cancel.png",
205 new_button("cancel.png",
209 "new_cancel_images");
211 resources->bar_data = new_image("bar", "bar.png");
214 resources->min_menu_w = 0;
215 resources->menu_popup_bg = 0; // if (0) use menu_light, menu_up, menu_shadow
216 resources->menu_item_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
217 resources->menu_bar_bg = 0; // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8
218 resources->menu_title_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
221 resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images
223 resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C
225 resources->generic_button_images = new_image_set(3,
229 resources->horizontal_slider_data = new_image_set(6,
235 "hslider_bg_dn.png");
236 resources->vertical_slider_data = new_image_set(6,
237 "vertical_slider_fg_up.png",
238 "vertical_slider_fg_hi.png",
239 "vertical_slider_fg_dn.png",
240 "vertical_slider_bg_up.png",
241 "vertical_slider_bg_hi.png",
242 "vertical_slider_bg_dn.png");
243 resources->progress_images = new_image_set(2,
246 resources->tumble_data = new_image_set(4,
251 resources->listbox_button = new_image_set(4,
252 "listbox_button_up.png",
253 "listbox_button_hi.png",
254 "listbox_button_dn.png",
255 "listbox_button_disabled.png"); // probably need to make this for the suv theme
256 resources->listbox_column = new_image_set(3,
260 resources->listbox_expand = new_image_set(5,
261 "listbox_expandup.png",
262 "listbox_expanduphi.png",
263 "listbox_expandchecked.png",
264 "listbox_expanddn.png",
265 "listbox_expandcheckedhi.png");
266 resources->listbox_up = new_image("listbox_up.png");
267 resources->listbox_dn = new_image("listbox_dn.png");
268 resources->pan_data = new_image_set(7,
274 "pan_channel_small.png",
275 "pan_stick_small.png");
276 resources->pan_text_color = WHITE;
278 resources->pot_images = new_image_set(3,
283 resources->checkbox_images = new_image_set(5,
286 "checkbox_checked.png",
288 "checkbox_checkedhi.png");
290 resources->radial_images = new_image_set(5,
293 "radial_checked.png",
295 "radial_checkedhi.png");
297 resources->xmeter_images = new_image_set(6,
304 resources->ymeter_images = new_image_set(6,
312 resources->hscroll_data = new_image_set(10,
313 "hscroll_handle_up.png",
314 "hscroll_handle_hi.png",
315 "hscroll_handle_dn.png",
316 "hscroll_handle_bg.png",
317 "hscroll_left_up.png",
318 "hscroll_left_hi.png",
319 "hscroll_left_dn.png",
320 "hscroll_right_up.png",
321 "hscroll_right_hi.png",
322 "hscroll_right_dn.png");
324 resources->vscroll_data = new_image_set(10,
325 "vscroll_handle_up.png",
326 "vscroll_handle_hi.png",
327 "vscroll_handle_dn.png",
328 "vscroll_handle_bg.png",
329 "vscroll_left_up.png",
330 "vscroll_left_hi.png",
331 "vscroll_left_dn.png",
332 "vscroll_right_up.png",
333 "vscroll_right_hi.png",
334 "vscroll_right_dn.png");
337 new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
338 new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
339 new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
340 new_button("swap_extents.png",
348 rgui_batch = new_image("recordgui_batch.png");
349 rgui_controls = new_image("recordgui_controls.png");
350 rgui_list = new_image("recordgui_list.png");
351 rmonitor_panel = new_image("recordmonitor_panel.png");
352 rmonitor_meters = new_image("recordmonitor_meters.png");
355 preferences_category_overlap = 0;
356 preferencescategory_x = 5;
357 preferencescategory_y = 5;
358 preferencestitle_x = 5;
359 preferencestitle_y = 10;
360 preferencesoptions_x = 5;
361 preferencesoptions_y = 0;
364 message_normal = resources->text_default;
366 mtransport_margin = 11;
369 new_image("mbutton_bg", "mbutton_bg.png");
370 new_image("mbutton_blue", "mbutton_blue.png");
371 new_image("timebar_bg", "timebar_bg.png");
372 new_image("timebar_brender", "timebar_brender.png");
373 new_image("clock_bg", "mclock.png");
374 new_image("patchbay_bg", "patchbay_bg.png");
375 new_image("tracks_bg","tracks_bg.png");
376 new_image("zoombar_left","zoombar_left.png");
377 new_image("zoombar_right","zoombar_right.png");
378 new_image("statusbar_left","statusbar_left.png");
379 new_image("statusbar_right","statusbar_right.png");
381 new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
382 new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
384 new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
385 new_image("mode_add", "mode_add.png");
386 new_image("mode_divide", "mode_divide.png");
387 new_image("mode_multiply", "mode_multiply.png");
388 new_image("mode_normal", "mode_normal.png");
389 new_image("mode_replace", "mode_replace.png");
390 new_image("mode_subtract", "mode_subtract.png");
391 new_image("mode_max", "mode_max.png");
393 new_toggle("plugin_on.png",
394 "pluginbutton_hi.png",
395 "pluginbutton_hi.png",
396 "pluginbutton_select.png",
397 "pluginbutton_dn.png",
398 "pluginbutton_selecthi.png",
401 new_toggle("plugin_show.png",
403 "pluginbutton_hi.png",
404 "pluginbutton_select.png",
405 "pluginbutton_dn.png",
406 "pluginbutton_selecthi.png",
410 new_image("cpanel_bg", "cpanel_bg.png");
411 new_image("cbuttons_left", "cbuttons_left.png");
412 new_image("cbuttons_right", "cbuttons_right.png");
413 new_image("cmeter_bg", "cmeter_bg.png");
416 new_image("vbuttons_left", "vbuttons_left.png");
418 new_image("preferences_bg", "preferences_bg.png");
421 new_image("new_bg", "new_bg.png");
422 new_image("setformat_bg", "setformat_bg2.png");
425 timebar_view_data = new_image("timebar_view.png");
427 setformat_w = get_image("setformat_bg")->get_w();
428 setformat_h = get_image("setformat_bg")->get_h();
437 setformat_margin = 30;
438 setformat_channels_x = 25;
439 setformat_channels_y = 242;
440 setformat_channels_w = 250;
441 setformat_channels_h = 250;
447 new_image_set("playpatch_data",
451 "playpatch_checked.png",
453 "playpatch_checkedhi.png");
455 new_image_set("recordpatch_data",
457 "recordpatch_up.png",
458 "recordpatch_hi.png",
459 "recordpatch_checked.png",
460 "recordpatch_dn.png",
461 "recordpatch_checkedhi.png");
463 new_image_set("gangpatch_data",
467 "gangpatch_checked.png",
469 "gangpatch_checkedhi.png");
471 new_image_set("drawpatch_data",
475 "drawpatch_checked.png",
477 "drawpatch_checkedhi.png");
480 new_image_set("mutepatch_data",
484 "mutepatch_checked.png",
486 "mutepatch_checkedhi.png");
488 new_image_set("expandpatch_data",
490 "expandpatch_up.png",
491 "expandpatch_hi.png",
492 "expandpatch_checked.png",
493 "expandpatch_dn.png",
494 "expandpatch_checkedhi.png");
503 out_point = new_image_set(5,
508 "out_checkedhi.png");
509 in_point = new_image_set(5,
516 label_toggle = new_image_set(5,
517 "labeltoggle_up.png",
518 "labeltoggle_uphi.png",
520 "labeltoggle_dn.png",
521 "label_checkedhi.png");
524 statusbar_cancel_data = new_image_set(3,
525 "statusbar_cancel_up.png",
526 "statusbar_cancel_hi.png",
527 "statusbar_cancel_dn.png");
530 VFrame *editpanel_up = new_image("editpanel_up.png");
531 VFrame *editpanel_hi = new_image("editpanel_hi.png");
532 VFrame *editpanel_dn = new_image("editpanel_dn.png");
533 VFrame *editpanel_checked = new_image("editpanel_checked.png");
534 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
536 new_image("panel_divider", "panel_divider.png");
537 new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
538 new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
539 new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
542 new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
543 new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
544 new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
545 new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
546 new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
547 new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
548 new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
549 new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
550 new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
551 new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
552 new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
553 over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
554 overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
555 new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
556 new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
557 new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
558 new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
559 splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
560 new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
561 new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
562 new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
563 new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
564 new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
567 #define TRANSPORT_LEFT_IMAGES "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
568 #define TRANSPORT_CENTER_IMAGES "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
569 #define TRANSPORT_RIGHT_IMAGES "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
571 new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
572 new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
573 new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
574 new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
575 new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
576 new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
577 new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
578 new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
579 new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
580 new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
581 new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
582 new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
583 new_button("stop.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
588 new_image("cwindow_inactive", "cwindow_inactive.png");
589 new_image("cwindow_active", "cwindow_active.png");
592 new_image_set("batch_render_start",
596 "batchstart_dn.png");
597 new_image_set("batch_render_stop",
602 new_image_set("batch_render_cancel",
604 "batchcancel_up.png",
605 "batchcancel_hi.png",
606 "batchcancel_dn.png");
608 new_image_set("category_button",
610 "preferencesbutton_dn.png",
611 "preferencesbutton_dnhi.png",
612 "preferencesbutton_dnlo.png");
614 new_image_set("category_button_checked",
616 "preferencesbutton_up.png",
617 "preferencesbutton_uphi.png",
618 "preferencesbutton_dnlo.png");
625 new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
626 new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
627 new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
628 new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
630 VFrame *cpanel_up = new_image("editpanel_up.png");
631 VFrame *cpanel_hi = new_image("editpanel_hi.png");
632 VFrame *cpanel_dn = new_image("editpanel_dn.png");
633 VFrame *cpanel_checked = new_image("editpanel_checked.png");
634 VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
635 new_toggle("blank30x30.png",
636 new_image("locklabels_locked.png"),
637 new_image("locklabels_lockedhi.png"),
638 new_image("locklabels_unlocked.png"),
639 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
640 new_image("locklabels_unlockedhi.png"),
644 new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
645 new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
646 new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
647 new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
648 new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
649 new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
650 new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
651 new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
652 new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
653 new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
655 // toggle for tangent mode (compositor/tool window)
656 new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
657 new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
662 title_font = MEDIUMFONT_3D;
664 recordgui_fixed_color = YELLOW;
665 recordgui_variable_color = RED;
666 resources->medium_font = "-*-helvetica-bold-r-normal-*-14-*";
668 channel_position_color = MEYELLOW;
669 resources->meter_title_w = 25;
671 // (asset) edit info text color
672 edit_font_color = YELLOW;
675 resources->label_images = new_image_set(5,
678 "radial_checked.png",
680 "radial_checkedhi.png");
682 /* resources->type_to_icon = new_image_set(5,
691 #define CWINDOW_METER_MARGIN 5
692 #define VWINDOW_METER_MARGIN 5
694 void BlondTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
697 mbuttons_y = gui->mainmenu->get_h() + 1;
699 mbuttons_h = get_image("mbutton_bg")->get_h();
701 mclock_y = mbuttons_y - 1 + mbuttons_h + CWINDOW_METER_MARGIN;
702 mclock_w = get_image("clock_bg")->get_w() - 40;
703 mclock_h = get_image("clock_bg")->get_h();
704 mtimebar_x = get_image("patchbay_bg")->get_w();
705 mtimebar_y = mbuttons_y - 1 + mbuttons_h;
706 mtimebar_w = w - mtimebar_x;
707 mtimebar_h = get_image("timebar_bg")->get_h();
708 mzoom_h = get_image("zoombar_left")->get_h();
710 mzoom_y = h - get_image("statusbar_left")->get_h() - mzoom_h;
713 mstatus_y = mzoom_y + mzoom_h;
715 mstatus_h = h - mstatus_y;
716 mstatus_message_x = 10;
717 mstatus_message_y = 5;
718 mstatus_progress_w = 230;
719 mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 2*3 - mstatus_progress_w;
720 mstatus_progress_y = mstatus_h/2 - BC_WindowBase::get_resources()->progress_images[0]->get_h()/2;
722 mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 3;
723 mstatus_cancel_y = mstatus_h/2 - statusbar_cancel_data[0]->get_h()/2;
726 patchbay_y = mtimebar_y + mtimebar_h;
727 patchbay_w = get_image("patchbay_bg")->get_w();
728 patchbay_h = mzoom_y - patchbay_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
729 mcanvas_x = patchbay_x + patchbay_w;
730 mcanvas_y = patchbay_y;
731 mcanvas_w = w - patchbay_w - BC_ScrollBar::get_span(SCROLL_VERT);
732 mcanvas_h = patchbay_h;
734 mhscroll_y = mzoom_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
735 mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT);
736 mvscroll_x = mcanvas_x + mcanvas_w;
737 mvscroll_y = mcanvas_y;
738 mvscroll_h = mcanvas_h;
741 void BlondTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
748 ccomposite_w = get_image("cpanel_bg")->get_w();
749 ccomposite_h = mwindow->session->cwindow_h -
750 get_image("cbuttons_left")->get_h();
752 cslider_y = ccomposite_h + 23;
754 cedit_y = cslider_y + 17;
756 ctransport_y = mwindow->session->cwindow_h -
757 get_image_set("autokeyframe")[0]->get_h();
758 ccanvas_x = ccomposite_x + ccomposite_w;
760 ccanvas_h = ccomposite_h;
762 cstatus_y = mwindow->session->cwindow_h - 40;
763 if(mwindow->edl->session->cwindow_meter)
765 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
766 mwindow->edl->session->cwindow_meter);
767 ccanvas_w = cmeter_x - ccanvas_x - 5;
771 cmeter_x = mwindow->session->cwindow_w;
772 ccanvas_w = cmeter_x - ccanvas_x;
779 ccomposite_x = -get_image("cpanel_bg")->get_w();
781 ccomposite_w = get_image("cpanel_bg")->get_w();
782 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
785 cslider_y = mwindow->session->cwindow_h;
787 cedit_y = cslider_y + 17;
789 ctransport_y = cedit_y + 40;
792 ccanvas_w = mwindow->session->cwindow_w;
793 ccanvas_h = mwindow->session->cwindow_h;
794 cmeter_x = mwindow->session->cwindow_w;
795 cstatus_x = mwindow->session->cwindow_w;
796 cstatus_y = mwindow->session->cwindow_h;
802 czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
803 czoom_y = ctransport_y + 5;
807 cmeter_h = mwindow->session->cwindow_h - cmeter_y;
809 cslider_w = ccanvas_x + ccanvas_w - cslider_x - 5;
810 ctimebar_x = ccanvas_x;
811 ctimebar_y = ccanvas_y + ccanvas_h;
812 ctimebar_w = ccanvas_w;
817 ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
818 ctime_y = ctransport_y;
820 cdest_y = czoom_y + 30;
826 void BlondTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
831 void BlondTheme::get_rmonitor_sizes(int do_audio,
838 Theme::get_rmonitor_sizes(do_audio,
844 if(!do_video && do_audio)
846 rmonitor_meter_y -= 30;
847 rmonitor_meter_h += 30;
852 void BlondTheme::get_vwindow_sizes(VWindowGUI *gui)
855 vmeter_h = mwindow->session->vwindow_h - cmeter_y;
858 vcanvas_h = mwindow->session->vwindow_h - get_image("vbuttons_left")->get_h();
860 if(mwindow->edl->session->vwindow_meter)
862 vmeter_x = mwindow->session->vwindow_w -
863 VWINDOW_METER_MARGIN -
864 MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
865 mwindow->edl->session->vwindow_meter);
866 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
870 vmeter_x = mwindow->session->vwindow_w;
871 vcanvas_w = mwindow->session->vwindow_w;
874 vtimebar_x = vcanvas_x;
875 vtimebar_y = vcanvas_y + vcanvas_h;
876 vtimebar_w = vcanvas_w;
880 vslider_y = vtimebar_y + 25;
881 vslider_w = vtimebar_w - vslider_x;
883 vedit_y = vslider_y + BC_Slider::get_span(0);
885 vtransport_y = mwindow->session->vwindow_h -
886 get_image_set("autokeyframe")[0]->get_h();
888 vtime_y = vedit_y + 10;
894 vzoom_x = vtime_x + 150;
896 vsource_x = vtime_x + 50;
897 vsource_y = vtransport_y + 5;
904 void BlondTheme::build_icons()
906 new_image("mwindow_icon", "heroine_icon.png");
907 new_image("vwindow_icon", "heroine_icon.png");
908 new_image("cwindow_icon", "heroine_icon.png");
909 new_image("awindow_icon", "heroine_icon.png");
910 new_image("record_icon", "heroine_icon.png");
911 new_image("clip_icon", "clip_icon.png");
916 void BlondTheme::build_bg_data()
919 channel_bg_data = new VFrame(get_image_data("channel_bg.png"));
920 channel_position_data = new VFrame(get_image_data("channel_position.png"));
923 new_image("resource1024", "resource1024.png");
924 new_image("resource512", "resource512.png");
925 new_image("resource256", "resource256.png");
926 new_image("resource128", "resource128.png");
927 new_image("resource64", "resource64.png");
928 new_image("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 BlondTheme::build_overlays()
938 keyframe_data = new VFrame(get_image_data("keyframe3.png"));
939 camerakeyframe_data = new VFrame(get_image_data("camerakeyframe.png"));
940 maskkeyframe_data = new VFrame(get_image_data("maskkeyframe.png"));
941 modekeyframe_data = new VFrame(get_image_data("modekeyframe.png"));
942 pankeyframe_data = new VFrame(get_image_data("pankeyframe.png"));
943 projectorkeyframe_data = new VFrame(get_image_data("projectorkeyframe.png"));
954 void BlondTheme::draw_rwindow_bg(RecordGUI *gui)
959 // gui->draw_9segment(recordgui_batch_x - margin,
961 // mwindow->session->rwindow_w - recordgui_status_x + margin,
962 // recordgui_buttons_y,
964 // gui->draw_3segmenth(recordgui_options_x - margin2,
965 // recordgui_buttons_y - 5,
966 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
968 // y = recordgui_buttons_y - 5 + rgui_controls->get_h();
969 // gui->draw_9segment(0,
971 // mwindow->session->rwindow_w,
972 // mwindow->session->rwindow_h - y,
976 void BlondTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
979 // int panel_w = 300;
980 // int x = rmonitor_meter_x - margin;
981 // int w = mwindow->session->rmonitor_w - x;
982 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
985 // mwindow->session->rmonitor_w,
986 // mwindow->session->rmonitor_h);
987 // gui->draw_9segment(x,
990 // mwindow->session->rmonitor_h,
999 void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
1002 int mbuttons_rightedge = mbuttons_x
1003 + get_image("end")->get_w() + 7 * get_image("play")->get_w() + get_image("end")->get_w()
1005 + 2 * get_image("arrow")->get_w()
1007 + 2 * get_image("autokeyframe")->get_w()
1009 + (14 + 1) * get_image("goto")->get_w() + 5; // I don't know why + 1!!
1010 gui->draw_3segmenth(mbuttons_x,
1015 get_image("mbutton_bg"),
1018 gui->draw_3segmenth(mbuttons_x + mbuttons_rightedge,
1020 mwindow->session->mwindow_w,
1021 get_image("mbutton_blue"));
1023 int pdw = get_image("panel_divider")->get_w();
1025 x += get_image("end")->get_w() + 7 * get_image("play")->get_w() + get_image("end")->get_w();
1026 x += mtransport_margin; // the control buttons
1028 gui->draw_vframe(get_image("panel_divider"),
1029 x - toggle_margin / 2 - pdw / 2 + 2,
1031 x += 2 * get_image("arrow")->get_w() + toggle_margin; // the mode buttons
1033 gui->draw_vframe(get_image("panel_divider"),
1034 x - toggle_margin / 2 - pdw / 2 + 2,
1037 x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
1038 gui->draw_vframe(get_image("panel_divider"),
1039 x - toggle_margin / 2 - pdw / 2 + 2,
1043 gui->draw_3segmenth(0,
1044 mbuttons_y + get_image("mbutton_bg")->get_h() - 1,
1045 get_image("patchbay_bg")->get_w(),
1046 get_image("clock_bg"));
1049 gui->draw_3segmentv(patchbay_x,
1052 get_image("patchbay_bg"));
1055 gui->draw_9segment(mcanvas_x,
1059 get_image("tracks_bg"));
1062 gui->draw_3segmenth(mtimebar_x,
1065 get_image("timebar_bg"));
1068 #define ZOOMBAR_CENTER 888
1069 gui->draw_3segmenth(mzoom_x,
1072 get_image("zoombar_left"));
1073 if(mzoom_w > ZOOMBAR_CENTER)
1074 gui->draw_3segmenth(mzoom_x + ZOOMBAR_CENTER,
1076 mzoom_w - ZOOMBAR_CENTER,
1077 get_image("zoombar_right"));
1081 gui->draw_3segmenth(mstatus_x,
1084 get_image("statusbar_left"));
1086 if(mstatus_w > ZOOMBAR_CENTER)
1087 gui->draw_3segmenth(mstatus_x + ZOOMBAR_CENTER,
1089 mstatus_w - ZOOMBAR_CENTER,
1090 get_image("statusbar_right"));
1094 void BlondTheme::draw_cwindow_bg(CWindowGUI *gui)
1096 const int button_division = 570;
1097 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1098 gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1099 if(mwindow->edl->session->cwindow_meter)
1101 gui->draw_3segmenth(button_division,
1103 cmeter_x - CWINDOW_METER_MARGIN - button_division,
1104 get_image("cbuttons_right"));
1105 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1107 mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1108 mwindow->session->cwindow_h,
1109 get_image("cmeter_bg"));
1113 gui->draw_3segmenth(button_division,
1115 cmeter_x - CWINDOW_METER_MARGIN - button_division + 100,
1116 get_image("cbuttons_right"));
1120 void BlondTheme::draw_vwindow_bg(VWindowGUI *gui)
1122 const int button_division = 400;
1123 gui->draw_3segmenth(0,
1126 get_image("vbuttons_left"));
1127 if(mwindow->edl->session->vwindow_meter)
1129 gui->draw_3segmenth(button_division,
1131 vmeter_x - VWINDOW_METER_MARGIN - button_division,
1132 get_image("cbuttons_right"));
1133 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
1135 mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1136 mwindow->session->vwindow_h,
1137 get_image("cmeter_bg"));
1141 gui->draw_3segmenth(button_division,
1143 vmeter_x - VWINDOW_METER_MARGIN - button_division + 100,
1144 get_image("cbuttons_right"));
1148 void BlondTheme::get_preferences_sizes()
1153 void BlondTheme::draw_preferences_bg(PreferencesWindow *gui)
1155 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1158 void BlondTheme::get_new_sizes(NewWindow *gui)
1162 void BlondTheme::draw_new_bg(NewWindow *gui)
1164 gui->draw_vframe(get_image("new_bg"), 0, 0);
1167 void BlondTheme::draw_setformat_bg(SetFormatWindow *gui)
1169 gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1173 // pmd: SUV (same), 1_2_2blond (nonexist)
1174 void BlondTheme::get_plugindialog_sizes()
1177 plugindialog_new_x = x;
1178 plugindialog_new_y = y;
1179 plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
1180 plugindialog_shared_y = y;
1181 plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
1182 plugindialog_module_y = y;
1184 plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - 10;
1185 plugindialog_new_h = mwindow->session->plugindialog_h - 120;
1186 plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - 10;
1187 plugindialog_shared_h = mwindow->session->plugindialog_h - 120;
1188 plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - 10;
1189 plugindialog_module_h = mwindow->session->plugindialog_h - 120;
1191 plugindialog_newattach_x = plugindialog_new_x + 20;
1192 plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + 10;
1193 plugindialog_sharedattach_x = plugindialog_shared_x + 20;
1194 plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + 10;
1195 plugindialog_moduleattach_x = plugindialog_module_x + 20;
1196 plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + 10;