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 "blondtheme.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_blondtheme_data_start[];
78 theme->set_data(_binary_blondtheme_data_start);
89 BlondTheme::BlondTheme()
94 BlondTheme::~BlondTheme()
98 void BlondTheme::initialize()
100 BC_Resources *resources = BC_WindowBase::get_resources();
101 resources->generic_button_images = new_image_set(3,
105 resources->horizontal_slider_data = new_image_set(6,
111 "hslider_bg_dn.png");
112 resources->progress_images = new_image_set(2,
115 resources->tumble_data = new_image_set(4,
120 resources->listbox_button = new_image_set(4,
121 "listbox_button_up.png",
122 "listbox_button_hi.png",
123 "listbox_button_dn.png",
124 "listbox_button_hi.png");
125 resources->listbox_column = new_image_set(3,
126 "listbox_column_up.png",
127 "listbox_column_hi.png",
128 "listbox_column_dn.png");
129 resources->pan_data = new_image_set(7,
135 "pan_channel_small.png",
136 "pan_stick_small.png");
137 resources->pan_text_color = WHITE;
139 resources->pot_images = new_image_set(3,
144 resources->text_default = 0x000000;
145 resources->text_background = 0xffffff;
146 resources->text_border1 = 0x4a484a; // (top outer)
147 resources->text_border2 = 0x000000; // (top inner)
148 resources->text_border3 = 0xacaeac; // (bottom inner)
149 resources->text_border4 = 0xffffff; // (bottom outer)
150 resources->text_inactive_highlight = 0xacacac;
151 resources->checkbox_images = new_image_set(5,
154 "checkbox_checked.png",
156 "checkbox_checkedhi.png");
158 resources->bg_color = BLOND;
159 resources->default_text_color = 0x000000;
160 resources->menu_title_text = 0x000000;
161 resources->popup_title_text = 0x000000;
162 resources->menu_item_text = 0x000000;
163 resources->radial_images = new_image_set(5,
166 "radial_checked.png",
168 "radial_checkedhi.png");
170 resources->generic_button_margin = 15;
171 resources->pot_needle_color = resources->text_default;
172 resources->pot_offset = 1;
173 resources->progress_text = resources->text_default;
174 resources->meter_font_color = RED;
175 resources->xmeter_images = new_image_set(7,
183 resources->ymeter_images = new_image_set(7,
192 resources->menu_light = 0x00cacd;
193 resources->menu_highlighted = 0x9c95ff;
194 resources->menu_down = 0x007d7b;
195 resources->menu_up = 0x009594;
196 resources->menu_shadow = 0x004a4a;
197 resources->popupmenu_margin = 10; // ugly
198 resources->popupmenu_triangle_margin = 15; // ugly
199 resources->hscroll_data = new_image_set(10,
200 "hscroll_center_up.png",
201 "hscroll_center_hi.png",
202 "hscroll_center_dn.png",
204 "hscroll_back_up.png",
205 "hscroll_back_hi.png",
206 "hscroll_back_dn.png",
207 "hscroll_fwd_up.png",
208 "hscroll_fwd_hi.png",
209 "hscroll_fwd_dn.png");
211 resources->listbox_title_color = 0x000000;
212 resources->vscroll_data = new_image_set(10,
213 "vscroll_center_up.png",
214 "vscroll_center_hi.png",
215 "vscroll_center_dn.png",
217 "vscroll_back_up.png",
218 "vscroll_back_hi.png",
219 "vscroll_back_dn.png",
220 "vscroll_fwd_up.png",
221 "vscroll_fwd_hi.png",
222 "vscroll_fwd_dn.png");
224 resources->listbox_title_margin = 0;
225 resources->listbox_title_hotspot = 5; // No. of pixels around the borders to allow dragging
226 resources->listbox_border1 = 0x4a484a; // (top outer)
227 resources->listbox_border2 = 0x000000; // (top inner)
228 resources->listbox_border3 = 0xffe200; // (bottom inner)
229 resources->listbox_border4 = 0xffffff; // (bottom outer)
230 resources->listbox_highlighted = 0xeee6ee;
231 resources->listbox_inactive = 0xffffffff; // (background)
232 resources->listbox_bg = new_image("list_bg.png");
233 resources->listbox_text = 0x000000;
234 resources->ok_images = new_button("ok.png",
239 resources->dirbox_margin = 50;
240 resources->filebox_margin = 101;
241 resources->file_color = 0x000000;
242 resources->directory_color = 0x0000ff;
243 resources->cancel_images = new_button("cancel.png",
251 rgui_batch = new_image("recordgui_batch.png");
252 rgui_controls = new_image("recordgui_controls.png");
253 rgui_list = new_image("recordgui_list.png");
254 rmonitor_panel = new_image("recordmonitor_panel.png");
255 rmonitor_meters = new_image("recordmonitor_meters.png");
257 resources->filebox_icons_images = new_button("icons.png",
258 "fileboxbutton_up.png",
259 "fileboxbutton_hi.png",
260 "fileboxbutton_dn.png");
262 resources->filebox_text_images = new_button("text.png",
263 "fileboxbutton_up.png",
264 "fileboxbutton_hi.png",
265 "fileboxbutton_dn.png");
267 resources->filebox_newfolder_images = new_button("folder.png",
268 "fileboxbutton_up.png",
269 "fileboxbutton_hi.png",
270 "fileboxbutton_dn.png");
272 resources->filebox_updir_images = new_button("updir.png",
273 "fileboxbutton_up.png",
274 "fileboxbutton_hi.png",
275 "fileboxbutton_dn.png");
277 resources->filebox_delete_images = new_button("delete.png",
278 "fileboxbutton_up.png",
279 "fileboxbutton_hi.png",
280 "fileboxbutton_dn.png");
282 resources->filebox_reload_images = new_button("reload.png",
283 "fileboxbutton_up.png",
284 "fileboxbutton_hi.png",
285 "fileboxbutton_dn.png");
288 resources->filebox_descend_images = new_button("openfolder.png",
293 resources->usethis_button_images =
294 resources->ok_images = new_button("ok.png",
305 resources->cancel_images = new_button("cancel.png",
310 new_button("cancel.png",
314 "new_cancel_images");
316 resources->bar_data = new_image("bar", "bar.png");
319 resources->min_menu_w = 0;
320 resources->menu_popup_bg = 0; // if (0) use menu_light, menu_up, menu_shadow
321 resources->menu_item_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
322 resources->menu_bar_bg = 0; // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8
323 resources->menu_title_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
326 resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images
328 resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C
330 resources->vertical_slider_data = new_image_set(6,
331 "vertical_slider_fg_up.png",
332 "vertical_slider_fg_hi.png",
333 "vertical_slider_fg_dn.png",
334 "vertical_slider_bg_up.png",
335 "vertical_slider_bg_hi.png",
336 "vertical_slider_bg_dn.png");
337 resources->listbox_expand = new_image_set(5,
338 "listbox_expandup.png",
339 "listbox_expanduphi.png",
340 "listbox_expandchecked.png",
341 "listbox_expanddn.png",
342 "listbox_expandcheckedhi.png");
343 resources->listbox_up = new_image("listbox_up.png");
344 resources->listbox_dn = new_image("listbox_dn.png");
347 mbutton_left = new_image("mbutton_left.png");
348 mbutton_right = new_image("mbutton_right.png");
349 new_image("timebar_bg", "timebar_bg.png");
350 new_image("timebar_brender", "timebar_brender.png");
351 new_image("clock_bg", "mclock.png");
352 new_image("patchbay_bg", "patchbay_bg.png");
353 tracks_bg = new_image("tracks_bg.png");
354 zoombar_left = new_image("zoombar_left.png");
355 zoombar_right = new_image("zoombar_right.png");
356 statusbar_left = new_image("statusbar_left.png");
357 statusbar_right = new_image("statusbar_right.png");
359 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
360 new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
361 new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
363 new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
364 new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
365 new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
366 new_button("swap_extents.png",
371 preferences_category_overlap = 0;
372 preferencescategory_x = 5;
373 preferencescategory_y = 5;
374 preferencestitle_x = 5;
375 preferencestitle_y = 10;
376 preferencesoptions_x = 5;
377 preferencesoptions_y = 0;
379 cpanel_bg = new_image("cpanel_bg.png");
380 cbuttons_left = new_image("cbuttons_left.png");
381 cbuttons_right = new_image("cbuttons_right.png");
382 cmeter_bg = new_image("cmeter_bg.png");
384 message_normal = resources->text_default;
386 mtransport_margin = 11;
389 vbuttons_left = new_image("vbuttons_left.png");
390 vbuttons_right = new_image("vbuttons_right.png");
391 vmeter_bg = new_image("vmeter_bg.png");
393 new_image("mbutton_bg", "mbutton_bg.png");
394 new_image("mbutton_blue", "mbutton_blue.png");
395 new_image("tracks_bg","tracks_bg.png");
396 new_image("zoombar_left","zoombar_left.png");
397 new_image("zoombar_right","zoombar_right.png");
398 new_image("statusbar_left","statusbar_left.png");
399 new_image("statusbar_right","statusbar_right.png");
400 preferences_bg = new_image("preferences_bg.png");
402 new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
403 new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
405 new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
406 new_image("mode_add", "mode_add.png");
407 new_image("mode_divide", "mode_divide.png");
408 new_image("mode_multiply", "mode_multiply.png");
409 new_image("mode_normal", "mode_normal.png");
410 new_image("mode_replace", "mode_replace.png");
411 new_image("mode_subtract", "mode_subtract.png");
412 new_image("mode_max", "mode_max.png");
413 new_image("mode_min", "mode_min.png");
415 new_bg = new_image("new_bg.png");
416 setformat_bg = new_image("setformat_bg2.png");
418 new_toggle("plugin_on.png",
419 "pluginbutton_hi.png",
420 "pluginbutton_hi.png",
421 "pluginbutton_select.png",
422 "pluginbutton_dn.png",
423 "pluginbutton_selecthi.png",
426 new_toggle("plugin_show.png",
428 "pluginbutton_hi.png",
429 "pluginbutton_select.png",
430 "pluginbutton_dn.png",
431 "pluginbutton_selecthi.png",
433 new_image("cpanel_bg", "cpanel_bg.png");
434 new_image("cbuttons_left", "cbuttons_left.png");
435 new_image("cbuttons_right", "cbuttons_right.png");
436 new_image("cmeter_bg", "cmeter_bg.png");
437 new_image("vbuttons_left", "vbuttons_left.png");
438 timebar_view_data = new_image("timebar_view.png");
440 new_image("preferences_bg", "preferences_bg.png");
447 new_image("new_bg", "new_bg.png");
448 new_image("setformat_bg", "setformat_bg2.png");
453 setformat_w = get_image("setformat_bg")->get_w();
454 setformat_h = get_image("setformat_bg")->get_h();
457 setformat_margin = 30;
458 setformat_channels_x = 25;
459 setformat_channels_y = 242;
460 setformat_channels_w = 250;
461 setformat_channels_h = 250;
467 new_image_set("playpatch_data",
471 "playpatch_checked.png",
473 "playpatch_checkedhi.png");
475 new_image_set("recordpatch_data",
477 "recordpatch_up.png",
478 "recordpatch_hi.png",
479 "recordpatch_checked.png",
480 "recordpatch_dn.png",
481 "recordpatch_checkedhi.png");
483 new_image_set("gangpatch_data",
487 "gangpatch_checked.png",
489 "gangpatch_checkedhi.png");
491 new_image_set("drawpatch_data",
495 "drawpatch_checked.png",
497 "drawpatch_checkedhi.png");
500 new_image_set("mutepatch_data",
504 "mutepatch_checked.png",
506 "mutepatch_checkedhi.png");
510 new_image_set("expandpatch_data",
512 "expandpatch_up.png",
513 "expandpatch_hi.png",
514 "expandpatch_checked.png",
515 "expandpatch_dn.png",
516 "expandpatch_checkedhi.png");
517 new_image_set("drawpatch_data", 5, "drawpatch_up.png", "drawpatch_hi.png", "drawpatch_checked.png", "drawpatch_dn.png", "drawpatch_checkedhi.png");
518 new_image_set("expandpatch_data", 5, "expandpatch_up.png", "expandpatch_hi.png", "expandpatch_checked.png", "expandpatch_dn.png", "expandpatch_checkedhi.png");
519 new_image_set("gangpatch_data", 5, "gangpatch_up.png", "gangpatch_hi.png", "gangpatch_checked.png", "gangpatch_dn.png", "gangpatch_checkedhi.png");
520 new_image_set("mutepatch_data", 5, "mutepatch_up.png", "mutepatch_hi.png", "mutepatch_checked.png", "mutepatch_dn.png", "mutepatch_checkedhi.png");
521 new_image_set("playpatch_data", 5, "playpatch_up.png", "playpatch_hi.png", "playpatch_checked.png", "playpatch_dn.png", "playpatch_checkedhi.png");
522 new_image_set("recordpatch_data", 5, "recordpatch_up.png", "recordpatch_hi.png", "recordpatch_checked.png", "recordpatch_dn.png", "recordpatch_checkedhi.png");
530 out_point = new_image_set(5,
535 "out_checkedhi.png");
536 in_point = new_image_set(5,
543 label_toggle = new_image_set(5,
544 "labeltoggle_up.png",
545 "labeltoggle_uphi.png",
547 "labeltoggle_dn.png",
548 "label_checkedhi.png");
551 statusbar_cancel_data = new_image_set(3,
552 "statusbar_cancel_up.png",
553 "statusbar_cancel_hi.png",
554 "statusbar_cancel_dn.png");
557 VFrame *editpanel_up = new_image("editpanel_up.png");
558 VFrame *editpanel_hi = new_image("editpanel_hi.png");
559 VFrame *editpanel_dn = new_image("editpanel_dn.png");
560 VFrame *editpanel_checked = new_image("editpanel_checked.png");
561 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
563 new_image("panel_divider", "panel_divider.png");
564 new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
565 new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
566 new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
569 //bottom_justify = new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
570 //center_justify = new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
571 //channel_data = new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn);
572 new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
573 new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
574 new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
575 new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
576 new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
577 new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
578 new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
579 new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
580 new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
581 new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
582 new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
583 new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
584 over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
585 overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
586 new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
587 new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
588 new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
589 new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
590 new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
591 new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
592 splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
593 new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
594 new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
595 new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
596 new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
597 //new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
598 //wrench_data = new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn);
601 new_image("cwindow_inactive", "cwindow_inactive.png");
602 new_image("cwindow_active", "cwindow_active.png");
604 #define TRANSPORT_LEFT_IMAGES "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
605 #define TRANSPORT_CENTER_IMAGES "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
606 #define TRANSPORT_RIGHT_IMAGES "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
608 new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
609 new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
610 new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
611 new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
612 new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
613 new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
614 new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
615 new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
616 new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
617 new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
618 new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
619 new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
620 new_button("stop.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
621 new_image_set("batch_render_start",
625 "batchstart_dn.png");
626 new_image_set("batch_render_stop",
631 new_image_set("batch_render_cancel",
633 "batchcancel_up.png",
634 "batchcancel_hi.png",
635 "batchcancel_dn.png");
638 new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
639 new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
640 new_image_set("category_button",
642 "preferencesbutton_dn.png",
643 "preferencesbutton_dnhi.png",
644 "preferencesbutton_dnlo.png");
645 //camera_data = new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
646 //crop_data = new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
647 new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
648 //magnify_data = new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
649 //mask_data = new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
650 //proj_data = new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
651 //protect_data = new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
652 //show_meters = new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
653 //titlesafe_data = new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
654 //tool_data = new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
655 new_toggle("eyedrop.png",
663 new_image_set("category_button_checked",
665 "preferencesbutton_up.png",
666 "preferencesbutton_uphi.png",
667 "preferencesbutton_dnlo.png");
674 static VFrame **transport_bg = new_image_set(3,
678 new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
679 build_transport((char*)"end", get_image_data("end.png"), transport_bg, 2);
680 build_transport((char*)"fastfwd", get_image_data("fastfwd.png"), transport_bg, 1);
681 build_transport((char*)"fastrev", get_image_data("fastrev.png"), transport_bg, 1);
682 build_transport((char*)"play", get_image_data("play.png"), transport_bg, 1);
683 build_transport((char*)"framefwd", get_image_data("framefwd.png"), transport_bg, 1);
684 build_transport((char*)"framerev", get_image_data("framerev.png"), transport_bg, 1);
685 build_transport((char*)"pause", get_image_data("pause.png"), transport_bg, 1);
686 build_transport((char*)"record", get_image_data("record.png"), transport_bg, 1);
687 build_transport((char*)"singleframe", get_image_data("singleframe.png"), transport_bg, 1);
688 build_transport((char*)"reverse", get_image_data("reverse.png"), transport_bg, 1);
689 build_transport((char*)"rewind", get_image_data("rewind.png"), transport_bg, 0);
690 build_transport((char*)"stop", get_image_data("stop.png"), transport_bg, 1);
691 build_transport((char*)"stoprec", get_image_data("stoprec.png"), transport_bg, 2);
693 VFrame *cpanel_up = new_image("editpanel_up.png");
694 VFrame *cpanel_hi = new_image("editpanel_hi.png");
695 VFrame *cpanel_dn = new_image("editpanel_dn.png");
696 VFrame *cpanel_checked = new_image("editpanel_checked.png");
697 VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
698 new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
699 new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
700 new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
701 new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
702 new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
703 new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
704 new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
705 new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
706 new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
707 new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
708 // toggle for tangent mode (compositor/tool window)
709 new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
710 new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
714 new_toggle("blank30x30.png",
715 new_image("locklabels_locked.png"),
716 new_image("locklabels_lockedhi.png"),
717 new_image("locklabels_unlocked.png"),
718 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
719 new_image("locklabels_unlockedhi.png"),
721 title_font = MEDIUMFONT_3D;
723 recordgui_fixed_color = YELLOW;
724 recordgui_variable_color = RED;
725 resources->medium_font = N_("-*-helvetica-bold-r-normal-*-14-*");
727 channel_position_color = MEYELLOW;
728 resources->meter_title_w = 25;
730 // (asset) edit info text color
731 edit_font_color = YELLOW;
734 resources->label_images = new_image_set(5,
737 "radial_checked.png",
739 "radial_checkedhi.png");
741 /* resources->type_to_icon = new_image_set(5,
751 #define CWINDOW_METER_MARGIN 5
752 #define VWINDOW_METER_MARGIN 5
755 void BlondTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
758 mbuttons_y = gui->mainmenu->get_h();
760 mbuttons_h = mbutton_left->get_h();
762 mclock_y = mbuttons_y + mbuttons_h + CWINDOW_METER_MARGIN;
763 mclock_w = get_image("clock_bg")->get_w() - 40;
764 mclock_h = get_image("clock_bg")->get_h();
765 mtimebar_x = get_image("patchbay_bg")->get_w();
766 mtimebar_y = mbuttons_y + mbuttons_h;
767 mtimebar_w = w - mtimebar_x;
768 mtimebar_h = get_image("timebar_bg")->get_h();
770 mstatus_y = h - statusbar_left->get_h();
772 mstatus_h = statusbar_left->get_h();
773 mstatus_message_x = 10;
774 mstatus_message_y = 5;
775 mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 240;
776 mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
777 mstatus_progress_w = 230;
778 mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
779 mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
781 mzoom_y = mstatus_y - zoombar_left->get_h();
782 mzoom_h = zoombar_left->get_h();
785 patchbay_y = mtimebar_y + mtimebar_h;
786 patchbay_w = get_image("patchbay_bg")->get_w();
787 patchbay_h = mzoom_y - patchbay_y;
789 mcanvas_y = mtimebar_y + mtimebar_h;
791 mcanvas_h = patchbay_h;
793 mhscroll_y = mcanvas_y + mcanvas_h;
794 mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT) - patchbay_w;
795 mvscroll_x = mcanvas_x + mcanvas_w;
796 mvscroll_y = mcanvas_y;
797 mvscroll_h = mcanvas_h;
800 void BlondTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
806 ccomposite_w = cpanel_bg->get_w();
807 ccomposite_h = mwindow->session->cwindow_h - cbuttons_left->get_h();
809 cedit_y = ccomposite_h + 17;
811 ctransport_y = mwindow->session->cwindow_h - get_image_set("autokeyframe")[0]->get_h();
812 ccanvas_x = ccomposite_x + ccomposite_w;
814 ccanvas_h = ccomposite_h;
816 cstatus_y = mwindow->session->cwindow_h - 40;
817 if(mwindow->edl->session->cwindow_meter)
819 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(this,mwindow->edl->session->audio_channels,
820 mwindow->edl->session->cwindow_meter);
821 ccanvas_w = cmeter_x - ccanvas_x - 5;
825 cmeter_x = mwindow->session->cwindow_w;
826 ccanvas_w = cmeter_x - ccanvas_x;
833 ccomposite_x = -get_image("cpanel_bg")->get_w();
834 ccomposite_x = -cpanel_bg->get_w();
836 ccomposite_w = get_image("cpanel_bg")->get_w();
837 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
840 cedit_y = mwindow->session->cwindow_h + 17;
842 ctransport_y = cedit_y + 40;
845 ccanvas_w = mwindow->session->cwindow_w;
846 ccanvas_h = mwindow->session->cwindow_h;
847 cmeter_x = mwindow->session->cwindow_w;
848 cstatus_x = mwindow->session->cwindow_w;
849 cstatus_y = mwindow->session->cwindow_h;
855 czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
856 czoom_y = ctransport_y + 5;
860 cmeter_h = mwindow->session->cwindow_h - cmeter_y;
862 cslider_w = ccanvas_x + ccanvas_w - cslider_x - 5;
863 ctimebar_x = ccanvas_x;
864 ctimebar_y = ccanvas_y + ccanvas_h;
865 ctimebar_w = ccanvas_w;
870 ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
871 ctime_y = ctransport_y;
873 cdest_y = czoom_y + 30;
878 void BlondTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
881 recordgui_status_x = 10;
882 recordgui_status_y = 10;
883 recordgui_status_x2 = 160;
884 recordgui_batch_x = 310;
885 recordgui_batch_y = 10;
886 recordgui_batchcaption_x = recordgui_batch_x + 110;
889 recordgui_transport_x = recordgui_batch_x;
890 recordgui_transport_y = recordgui_batch_y + 150;
892 //recordgui_buttons_x = recordgui_batch_x - 50;
893 //recordgui_buttons_y = recordgui_transport_y + 40;
894 //recordgui_options_x = recordgui_buttons_x;
895 //recordgui_options_y = recordgui_buttons_y + 35;
897 recordgui_batches_x = 10;
898 recordgui_batches_y = 270;
899 recordgui_batches_w = w - 20;
900 recordgui_batches_h = h - recordgui_batches_y - 70;
901 recordgui_loadmode_x = w / 2 - loadmode_w / 2;
902 recordgui_loadmode_y = h - 60;
904 recordgui_controls_x = 10;
905 recordgui_controls_y = h - 40;
908 void BlondTheme::get_rmonitor_sizes(int do_audio,
915 Theme::get_rmonitor_sizes(do_audio,
921 if(!do_video && do_audio)
923 rmonitor_meter_y -= 30;
924 rmonitor_meter_h += 30;
929 void BlondTheme::get_vwindow_sizes(VWindowGUI *gui)
932 vmeter_h = mwindow->session->vwindow_h - cmeter_y;
935 vcanvas_h = mwindow->session->vwindow_h - vbuttons_left->get_h();
937 if(mwindow->edl->session->vwindow_meter)
939 rmonitor_meter_y -= 30;
940 rmonitor_meter_h += 30;
941 vmeter_x = mwindow->session->vwindow_w -
942 VWINDOW_METER_MARGIN -
943 MeterPanel::get_meters_width(this,
944 mwindow->edl->session->audio_channels,
945 mwindow->edl->session->vwindow_meter);
946 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
950 vmeter_x = mwindow->session->vwindow_w;
951 vcanvas_w = mwindow->session->vwindow_w;
954 vtimebar_x = vcanvas_x;
955 vtimebar_y = vcanvas_y + vcanvas_h;
956 vtimebar_w = vcanvas_w;
960 vslider_y = vtimebar_y + 25;
961 vslider_w = vtimebar_w - vslider_x;
963 vedit_y = vslider_y + BC_Slider::get_span(0);
965 vtransport_y = mwindow->session->vwindow_h -
966 get_image_set("autokeyframe")[0]->get_h();
968 vtime_y = vedit_y + 10;
976 void BlondTheme::build_icons()
978 new_image("mwindow_icon", "heroine_icon.png");
979 new_image("vwindow_icon", "heroine_icon.png");
980 new_image("cwindow_icon", "heroine_icon.png");
981 new_image("awindow_icon", "heroine_icon.png");
982 new_image("record_icon", "heroine_icon.png");
983 new_image("clip_icon", "clip_icon.png");
988 void BlondTheme::build_bg_data()
991 channel_bg_data = new VFrame(get_image_data("channel_bg.png"));
992 channel_position_data = new VFrame(get_image_data("channel_position.png"));
995 new_image("resource1024", "resource1024.png");
996 new_image("resource512", "resource512.png");
997 new_image("resource256", "resource256.png");
998 new_image("resource128", "resource128.png");
999 new_image("resource64", "resource64.png");
1000 new_image("resource32", "resource32.png");
1001 new_image("plugin_bg_data", "plugin_bg.png");
1002 new_image("title_bg_data", "title_bg.png");
1003 new_image("vtimebar_bg_data", "vwindow_timebar.png");
1008 void BlondTheme::build_overlays()
1010 keyframe_data = new VFrame(get_image_data("keyframe3.png"));
1011 camerakeyframe_data = new VFrame(get_image_data("camerakeyframe.png"));
1012 maskkeyframe_data = new VFrame(get_image_data("maskkeyframe.png"));
1013 modekeyframe_data = new VFrame(get_image_data("modekeyframe.png"));
1014 pankeyframe_data = new VFrame(get_image_data("pankeyframe.png"));
1015 projectorkeyframe_data = new VFrame(get_image_data("projectorkeyframe.png"));
1026 void BlondTheme::draw_rwindow_bg(RecordGUI *gui)
1030 // int margin2 = 80;
1031 // gui->draw_9segment(recordgui_batch_x - margin,
1033 // mwindow->session->rwindow_w - recordgui_status_x + margin,
1034 // recordgui_buttons_y,
1036 // gui->draw_3segmenth(recordgui_options_x - margin2,
1037 // recordgui_buttons_y - 5,
1038 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
1040 // y = recordgui_buttons_y - 5 + rgui_controls->get_h();
1041 // gui->draw_9segment(0,
1043 // mwindow->session->rwindow_w,
1044 // mwindow->session->rwindow_h - y,
1048 void BlondTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
1051 // int panel_w = 300;
1052 // int x = rmonitor_meter_x - margin;
1053 // int w = mwindow->session->rmonitor_w - x;
1054 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1055 // gui->clear_box(0,
1057 // mwindow->session->rmonitor_w,
1058 // mwindow->session->rmonitor_h);
1059 // gui->draw_9segment(x,
1062 // mwindow->session->rmonitor_h,
1063 // rmonitor_meters);
1071 void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
1074 gui->draw_3segmenth(mbuttons_x,
1078 gui->draw_3segmenth(mbuttons_x + 750,
1084 gui->draw_3segmenth(0,
1085 mbuttons_y + mbutton_left->get_h(),
1086 get_image("patchbay_bg")->get_w(),
1087 get_image("clock_bg"));
1090 gui->draw_3segmentv(patchbay_x,
1093 get_image("patchbay_bg"));
1096 gui->draw_9segment(mcanvas_x,
1103 gui->draw_3segmenth(mtimebar_x,
1106 get_image("timebar_bg"));
1109 int zoombar_center = 710;
1110 gui->draw_3segmenth(mzoom_x,
1114 if(mzoom_w > zoombar_center)
1115 gui->draw_3segmenth(mzoom_x + zoombar_center,
1117 mzoom_w - zoombar_center,
1121 gui->draw_3segmenth(mstatus_x,
1126 if(mstatus_w > zoombar_center)
1127 gui->draw_3segmenth(mstatus_x + zoombar_center,
1129 mstatus_w - zoombar_center,
1133 void BlondTheme::draw_cwindow_bg(CWindowGUI *gui)
1135 const int button_division = 570;
1136 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1137 gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1138 if(mwindow->edl->session->cwindow_meter)
1140 gui->draw_3segmenth(button_division,
1142 cmeter_x - CWINDOW_METER_MARGIN - button_division,
1143 get_image("cbuttons_right"));
1144 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1146 mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1147 mwindow->session->cwindow_h,
1148 get_image("cmeter_bg"));
1152 gui->draw_3segmenth(button_division,
1154 cmeter_x - CWINDOW_METER_MARGIN - button_division + 100,
1155 get_image("cbuttons_right"));
1159 void BlondTheme::draw_vwindow_bg(VWindowGUI *gui)
1161 const int button_division = 400;
1162 gui->draw_3segmenth(0,
1165 get_image("vbuttons_left"));
1166 if(mwindow->edl->session->vwindow_meter)
1168 gui->draw_3segmenth(button_division,
1170 vmeter_x - VWINDOW_METER_MARGIN - button_division,
1171 get_image("cbuttons_right"));
1172 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
1174 mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1175 mwindow->session->vwindow_h,
1176 get_image("cmeter_bg"));
1180 gui->draw_3segmenth(button_division,
1182 vmeter_x - VWINDOW_METER_MARGIN - button_division + 100,
1183 get_image("cbuttons_right"));
1187 void BlondTheme::get_preferences_sizes()
1192 void BlondTheme::draw_preferences_bg(PreferencesWindow *gui)
1194 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1197 void BlondTheme::get_new_sizes(NewWindow *gui)
1201 void BlondTheme::draw_new_bg(NewWindow *gui)
1203 gui->draw_vframe(get_image("new_bg"), 0, 0);
1206 void BlondTheme::draw_setformat_bg(SetFormatWindow *gui)
1208 gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1209 gui->draw_vframe(setformat_bg, 0, 0);
1213 // pmd: SUV (same), 1_2_2blond (nonexist)
1214 void BlondTheme::get_plugindialog_sizes()
1217 plugindialog_new_x = x;
1218 plugindialog_new_y = y;
1219 plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
1220 plugindialog_shared_y = y;
1221 plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
1222 plugindialog_module_y = y;
1224 plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - 10;
1225 plugindialog_new_h = mwindow->session->plugindialog_h - 120;
1226 plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - 10;
1227 plugindialog_shared_h = mwindow->session->plugindialog_h - 120;
1228 plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - 10;
1229 plugindialog_module_h = mwindow->session->plugindialog_h - 120;
1231 plugindialog_newattach_x = plugindialog_new_x + 20;
1232 plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + 10;
1233 plugindialog_sharedattach_x = plugindialog_shared_x + 20;
1234 plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + 10;
1235 plugindialog_moduleattach_x = plugindialog_module_x + 20;
1236 plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + 10;