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 "bluedottheme.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"
48 #define BGREY 0xc0c0e0 //MEGEY with a shade of blue
49 #define DDBLUE 0x000050 //Dark blue with the shade of grey
52 PluginClient* new_plugin(PluginServer *server)
54 return new BlueDotThemeMain(server);
63 BlueDotThemeMain::BlueDotThemeMain(PluginServer *server)
64 : PluginTClient(server)
68 BlueDotThemeMain::~BlueDotThemeMain()
72 const char* BlueDotThemeMain::plugin_title()
77 Theme* BlueDotThemeMain::new_theme()
79 theme = new BlueDotTheme;
80 extern unsigned char _binary_bluedottheme_data_start[];
81 theme->set_data(_binary_bluedottheme_data_start);
92 BlueDotTheme::BlueDotTheme()
97 BlueDotTheme::~BlueDotTheme()
99 delete channel_position_data;
100 delete keyframe_data;
101 delete camerakeyframe_data;
102 delete maskkeyframe_data;
103 delete modekeyframe_data;
104 delete pankeyframe_data;
105 delete projectorkeyframe_data;
108 void BlueDotTheme::initialize()
110 BC_Resources *resources = BC_WindowBase::get_resources();
112 // about_bg = new_image("about_bg.png");
115 // COPIED FROM DEFAULT THEME 1>>
116 resources->text_default = 0x000000;
117 resources->text_background = 0xffffff;
119 resources->text_border1 = 0x4a484a; // (top outer)
120 resources->text_border2 = 0x000000; // (top inner)
121 resources->text_border3 = 0xacaeac; // (bottom inner)
122 resources->text_border4 = 0xffffff; // (bottom outer)
123 resources->text_inactive_highlight = 0xacacac;
124 resources->text_highlight = BGREY;
125 // COPIED FROM DEFAULT THEME <<1
127 resources->bg_color = FGGREY; //bg of windows (where no pics...
128 // COPIED FROM DEFAULT THEME 2>>
129 resources->default_text_color = 0x000000;
130 resources->menu_title_text = 0x000000;
131 resources->popup_title_text = 0x000000;
132 // COPIED FROM DEFAULT THEME <<2
133 resources->menu_item_text = BLACK;
135 // COPIED FROM DEFAULT THEME 3>>
136 resources->generic_button_margin = 15; //Length of buttons and color tabs
137 resources->pot_needle_color = resources->text_default;
138 resources->pot_offset = 0;
139 resources->progress_text = resources->text_default;
140 // COPIED FROM DEFAULT THEME <<3
141 resources->meter_font = SMALLFONT; //Specific to BD
142 resources->meter_font_color = BLACK;
143 resources->meter_title_w = 20; //Specific to BD
144 resources->meter_3d = 0; //Specific to BD
146 resources->menu_light = FTGREY; //menu
147 resources->menu_highlighted = BGREY; //NMBLUE
148 resources->menu_down = BGREY;
149 resources->menu_up = FGGREY;
150 resources->menu_shadow = FTGREY;
152 // MIHA: COPIED FROM DEFAULT THEME M1>>
153 resources->popupmenu_margin = 10; // ugly
154 resources->popupmenu_triangle_margin = 15; // ugly
155 // MIHA: COPIED FROM DEFAULT THEME M1<<
158 // COPIED FROM DEFAULT THEME 4>>
159 resources->listbox_title_color = 0x000000;
161 resources->listbox_title_margin = 0;
162 resources->listbox_title_hotspot = 5; // No. of pixels around the borders to allow dragging
163 resources->listbox_border1 = 0x4a484a; // (top outer)
164 resources->listbox_border2 = 0x000000; // (top inner)
165 resources->listbox_border3 = 0xffe200; // (bottom inner)
166 resources->listbox_border4 = 0xffffff; // (bottom outer)
167 resources->listbox_highlighted = 0xeee6ee;
168 resources->listbox_inactive = 0xffffffff; // (background)
169 resources->listbox_bg = new_image("list_bg.png"); //NOT COPIED!
170 resources->listbox_text = 0x000000;
171 resources->listbox_selected = BGREY;
173 resources->dirbox_margin = 50;
174 resources->filebox_margin = 101;
175 resources->file_color = 0x000000;
176 resources->directory_color = DKBLUE;
177 // COPIED FROM DEFAULT THEME <<4
178 resources->menu_highlighted_fontcolor = DDBLUE; //Specific to BD
180 new_toggle("loadmode_new.png",
183 "loadmode_checked.png",
185 "loadmode_checkedhi.png",
187 new_toggle("loadmode_none.png",
190 "loadmode_checked.png",
192 "loadmode_checkedhi.png",
194 new_toggle("loadmode_newcat.png",
197 "loadmode_checked.png",
199 "loadmode_checkedhi.png",
201 new_toggle("loadmode_cat.png",
204 "loadmode_checked.png",
206 "loadmode_checkedhi.png",
208 new_toggle("loadmode_newtracks.png",
211 "loadmode_checked.png",
213 "loadmode_checkedhi.png",
214 "loadmode_newtracks");
215 new_toggle("loadmode_paste.png",
218 "loadmode_checked.png",
220 "loadmode_checkedhi.png",
222 new_toggle("loadmode_resource.png",
225 "loadmode_checked.png",
227 "loadmode_checkedhi.png",
228 "loadmode_resource");
229 new_toggle("loadmode_nested.png",
232 "loadmode_checked.png",
234 "loadmode_checkedhi.png",
237 //There are differences here, but we won't change until the end.
239 resources->filebox_icons_images = new_image_set(3,
241 "file_icons_uphi.png",
242 "file_icons_dn.png");
244 resources->filebox_text_images = new_image_set(3,
246 "file_text_uphi.png",
249 resources->filebox_newfolder_images = new_image_set(3,
250 "file_newfolder_up.png",
251 "file_newfolder_uphi.png",
252 "file_newfolder_dn.png");
254 resources->filebox_updir_images = new_image_set(3,
256 "file_updir_uphi.png",
257 "file_updir_dn.png");
259 resources->filebox_delete_images = new_image_set(3,
260 "file_delete_up.png",
261 "file_delete_uphi.png",
262 "file_delete_dn.png");
264 resources->filebox_reload_images = new_image_set(3,
265 "file_reload_up.png",
266 "file_reload_uphi.png",
267 "file_reload_dn.png");
270 resources->filebox_descend_images = new_image_set(3,
271 "file_openfolder_up.png",
272 "file_openfolder_uphi.png",
273 "file_openfolder_dn.png");
276 resources->usethis_button_images =
277 resources->ok_images = new_button("ok.png",
288 resources->cancel_images = new_button("cancel.png",
293 new_button("cancel.png",
297 "new_cancel_images");
299 resources->bar_data = new_image("bar", "bar.png");
302 resources->medium_7segment = new_image_set(20,
324 resources->bar_data = new_image("bar", "bar.png");
325 resources->check = new_image("check", "check.png");
327 resources->min_menu_w = 0;
328 resources->menu_popup_bg = 0; // if (0) use menu_light, menu_up, menu_shadow
329 resources->menu_item_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
330 resources->menu_bar_bg = 0; // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8
331 resources->menu_title_bg = 0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
334 resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images
336 resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C
338 resources->generic_button_images = new_image_set(3,
342 resources->horizontal_slider_data = new_image_set(6,
348 "hslider_bg_dn.png");
349 resources->vertical_slider_data = new_image_set(6,
350 "vertical_slider_fg_up.png",
351 "vertical_slider_fg_hi.png",
352 "vertical_slider_fg_dn.png",
353 "vertical_slider_bg_up.png",
354 "vertical_slider_bg_hi.png",
355 "vertical_slider_bg_dn.png");
356 resources->progress_images = new_image_set(2,
359 resources->tumble_data = new_image_set(4,
364 resources->listbox_button = new_image_set(4,
365 "listbox_button_up.png",
366 "listbox_button_hi.png",
367 "listbox_button_dn.png",
368 "listbox_button_disabled.png"); // probably need to make this for the suv theme
369 resources->listbox_column = new_image_set(3,
373 resources->listbox_expand = new_image_set(5,
374 "listbox_expandup.png",
375 "listbox_expanduphi.png",
376 "listbox_expandchecked.png",
377 "listbox_expanddn.png",
378 "listbox_expandcheckedhi.png");
379 resources->listbox_up = new_image("listbox_up.png");
380 resources->listbox_dn = new_image("listbox_dn.png");
381 resources->pan_data = new_image_set(7,
387 "pan_channel_small.png",
388 "pan_stick_small.png");
389 resources->pan_text_color = WHITE;
391 resources->pot_images = new_image_set(3,
394 "pot_dn.png"); //Graphic Copied from default. Improve!!
396 resources->checkbox_images = new_image_set(5,
399 "checkbox_checked.png",
401 "checkbox_checkedhi.png");
403 resources->radial_images = new_image_set(5,
406 "radial_checked.png",
408 "radial_checkedhi.png");
410 resources->xmeter_images = new_image_set(7,
418 resources->ymeter_images = new_image_set(7,
427 resources->hscroll_data = new_image_set(10,
428 "hscroll_center_up.png",
429 "hscroll_center_hi.png",
430 "hscroll_center_dn.png",
432 "hscroll_back_up.png",
433 "hscroll_back_hi.png",
434 "hscroll_back_dn.png",
435 "hscroll_fwd_up.png",
436 "hscroll_fwd_hi.png",
437 "hscroll_fwd_dn.png");
439 resources->vscroll_data = new_image_set(10,
440 "vscroll_center_up.png",
441 "vscroll_center_hi.png",
442 "vscroll_center_dn.png",
444 "vscroll_back_up.png",
445 "vscroll_back_hi.png",
446 "vscroll_back_dn.png",
447 "vscroll_fwd_up.png",
448 "vscroll_fwd_hi.png",
449 "vscroll_fwd_dn.png");
451 //Graphic Copied from default. Improve!!
452 //To make this work better, it may be neccessary to replace new_button with new_image_set
453 new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
454 new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
455 new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
456 new_button("swap_extents.png",
461 //swap_extents.png not copied
464 rgui_batch = new_image("recordgui_batch.png");
465 rgui_controls = new_image("recordgui_controls.png");
466 rgui_list = new_image("recordgui_list.png");
467 rmonitor_panel = new_image("recordmonitor_panel.png");
468 rmonitor_meters = new_image("recordmonitor_meters.png");
472 preferences_category_overlap = 0;
473 preferencescategory_x = 5;
474 preferencescategory_y = 5;
475 preferencestitle_x = 5;
476 preferencestitle_y = 10;
477 preferencesoptions_x = 5;
478 preferencesoptions_y = 0;
483 message_normal = resources->text_default;
485 mtransport_margin = 11;
489 new_image("mbutton_left","mbutton_left.png");
490 new_image("mbutton_right","mbutton_right.png");
491 new_image("timebar_bg", "timebar_bg.png");
492 new_image("timebar_brender", "timebar_brender.png");
493 new_image("clock_bg", "mclock.png");
494 new_image("patchbay_bg", "patchbay_bg.png");
495 new_image("tracks_bg","tracks_bg.png");
496 new_image("zoombar_left","zoombar_left.png");
497 new_image("zoombar_right","zoombar_right.png");
498 new_image("statusbar_left","statusbar_left.png");
499 new_image("statusbar_right","statusbar_right.png");
501 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
502 new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
503 new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
505 //Here an improvement may be needed
506 new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
507 new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
509 //Graphic Copied from default. Improve!!
510 new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
511 new_image("mode_add", "mode_add.png");
512 new_image("mode_divide", "mode_divide.png");
513 new_image("mode_multiply", "mode_multiply.png");
514 new_image("mode_normal", "mode_normal.png");
515 new_image("mode_replace", "mode_replace.png");
516 new_image("mode_subtract", "mode_subtract.png");
517 new_image("mode_max", "mode_max.png");
518 new_image("mode_min", "mode_min.png");
520 //Graphic Copied from default. Improve!!
521 new_toggle("plugin_on.png",
522 "pluginbutton_hi.png",
523 "pluginbutton_hi.png",
524 "pluginbutton_select.png",
525 "pluginbutton_dn.png",
526 "pluginbutton_selecthi.png",
529 //Graphic Copied from default. Improve!!
530 new_toggle("plugin_show.png",
532 "pluginbutton_hi.png",
533 "pluginbutton_select.png",
534 "pluginbutton_dn.png",
535 "pluginbutton_selecthi.png",
538 new_image("cpanel_bg", "cpanel_bg.png");
539 new_image("cbuttons_left", "cbuttons_left.png");
540 new_image("cbuttons_right", "cbuttons_right.png");
541 new_image("cmeter_bg", "cmeter_bg.png");
542 new_image("vbuttons_left", "vbuttons_left.png");
543 new_image("vbuttons_right", "vbuttons_right.png");
544 timebar_view_data = new_image("timebar_view.png");
547 new_image("cpanel_bg.png");
548 new_image("cbuttons_left.png");
549 new_image("cbuttons_right.png");
550 new_image("cmeter_bg.png");
553 new_image("vbuttons_left.png");
554 new_image("vbuttons_right.png");
555 new_image("vmeter_bg.png");
557 new_image("preferences_bg", "preferences_bg.png");
560 new_image("new_bg", "new_bg.png");
561 new_image("setformat_bg", "setformat_bg2.png");
564 timebar_view_data = new_image("timebar_view.png");
566 // x, y of Format dialog box
577 setformat_margin = 30;
578 setformat_channels_x = 25;
579 setformat_channels_y = 242;
580 setformat_channels_w = 250;
581 setformat_channels_h = 250;
586 //This buttons miss a bit. May need to be improved
587 new_image_set("playpatch_data",
591 "playpatch_checked.png",
593 "playpatch_checkedhi.png");
595 new_image_set("recordpatch_data",
597 "recordpatch_up.png",
598 "recordpatch_hi.png",
599 "recordpatch_checked.png",
600 "recordpatch_dn.png",
601 "recordpatch_checkedhi.png");
603 new_image_set("gangpatch_data",
607 "gangpatch_checked.png",
609 "gangpatch_checkedhi.png");
611 new_image_set("drawpatch_data",
615 "drawpatch_checked.png",
617 "drawpatch_checkedhi.png");
620 new_image_set("mutepatch_data",
624 "mutepatch_checked.png",
626 "mutepatch_checkedhi.png");
628 new_image_set("expandpatch_data",
630 "expandpatch_up.png",
631 "expandpatch_hi.png",
632 "expandpatch_checked.png",
633 "expandpatch_dn.png",
634 "expandpatch_checkedhi.png");
642 //Graphic Copied from default. Improve!! -> See outpoint.png/inpoint.png
643 out_point = new_image_set(5,
648 "out_checkedhi.png");
649 in_point = new_image_set(5,
656 //Graphic Copied from default. Improve!! -> see label.png
657 label_toggle = new_image_set(5,
658 "labeltoggle_up.png",
659 "labeltoggle_uphi.png",
661 "labeltoggle_dn.png",
662 "label_checkedhi.png");
664 ffmpeg_toggle = new_image_set(5,
671 shbtn_data = new_image_set(3,
676 statusbar_cancel_data = new_image_set(3,
677 "statusbar_cancel_up.png",
678 "statusbar_cancel_hi.png",
679 "statusbar_cancel_dn.png");
681 //Graphic Copied from default. Improve!! -> make transparent edges
682 VFrame *editpanel_up = new_image("editpanel_up.png");
683 VFrame *editpanel_hi = new_image("editpanel_hi.png");
684 VFrame *editpanel_dn = new_image("editpanel_dn.png");
685 VFrame *editpanel_checked = new_image("editpanel_checked.png");
686 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
688 //Graphic Copied from default. Improve!!
689 new_image("panel_divider", "panel_divider.png");
690 new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
691 new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
692 new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
695 new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
696 new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
697 new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
698 new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
699 new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
700 new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
701 // indelete_data = new_button("clearinpoint.png", editpanel_up, editpanel_hi, editpanel_dn); //Specific to BD
702 new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
703 new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
704 new_button("magnifyS.png", "editpanelW_up.png", "editpanelW_hi.png", "editpanelW_dn.png", "magnify_button");
705 new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
706 new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
707 new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
708 // outdelete_data = new_button("clearoutpoint.png", editpanel_up, editpanel_hi, editpanel_dn); //Specific to BD
709 over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
710 overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
711 new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
712 new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
713 new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
714 new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
715 new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
716 new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
717 splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
718 new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
719 new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
720 new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
721 new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
722 new_button("wrench.png", "editpanelW_up.png", "editpanelW_hi.png", "editpanelW_dn.png", "wrench");
724 //Make transparent borders
725 #define TRANSPORT_LEFT_IMAGES "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
726 #define TRANSPORT_CENTER_IMAGES "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
727 #define TRANSPORT_RIGHT_IMAGES "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
728 // build_transport(duplex_data, get_image_data("duplex.png"), transport_bg, 1); //Specific to BD
729 new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
730 new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
731 new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
732 new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
733 new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
734 new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
735 //Graphic Copied from default. Improve!!
736 new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
737 new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
738 //Graphic Copied from default. Improve!!
739 new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
740 new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
741 new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
742 new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
743 new_button("stoprec.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
748 //Graphic Copied from default. Improve!!
749 new_image("cwindow_inactive", "cwindow_inactive.png");
750 new_image("cwindow_active", "cwindow_active.png");
753 new_image_set("batch_render_start",
757 "batchstart_dn.png");
758 new_image_set("batch_render_stop",
763 new_image_set("batch_render_cancel",
765 "batchcancel_up.png",
766 "batchcancel_hi.png",
767 "batchcancel_dn.png");
769 // MIHA: COPIED FROM DEFAULT THEME M2>>
770 //Graphic Copied from default. Improve!!
771 new_image_set("category_button",
773 "preferencesbutton_dn.png",
774 "preferencesbutton_dnhi.png",
775 "preferencesbutton_dnlo.png");
777 new_image_set("category_button_checked",
779 "preferencesbutton_up.png",
780 "preferencesbutton_uphi.png",
781 "preferencesbutton_dnlo.png");
782 // MIHA: COPIED FROM DEFAULT THEME M2<<
785 new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
786 new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
787 new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
788 new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
789 new_toggle("blank30x30.png",
790 new_image("locklabels_locked.png"),
791 new_image("locklabels_lockedhi.png"),
792 new_image("locklabels_unlocked.png"),
793 new_image("locklabels_dn.png"), // can't have seperate down for each!!??
794 new_image("locklabels_unlockedhi.png"),
797 // MIHA: COPIED FROM DEFAULT THEME M3>>
798 //Is that necessary??
799 VFrame *cpanel_up = new_image("editpanel_up.png");
800 VFrame *cpanel_hi = new_image("editpanel_hi.png");
801 VFrame *cpanel_dn = new_image("editpanel_dn.png");
802 VFrame *cpanel_checked = new_image("editpanel_checked.png");
803 VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
805 new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
806 new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
807 new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
808 new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
809 new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
810 new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
811 new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
812 new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
813 new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
814 new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
816 // MIHA: COPIED FROM DEFAULT THEME M3<<
818 // Maybe we can live without the commented part
819 // MIHA: Commented out in favor of default version M4>>
820 // new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"camera");
821 // new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"crop");
822 // new_toggle("eyedrop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"eyedrop");
823 // new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"magnify");
824 // new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"mask");
825 // new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"projector");
826 // new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"protect");
827 // new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"titlesafe");
828 // new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"tool");
829 // MIHA: Commented out in favor of default version M4<<
834 title_font = MEDIUMFONT;
836 recordgui_fixed_color = BLACK;
837 recordgui_variable_color = RED;
838 resources->medium_font = "-*-helvetica-medium-r-normal-*-14-*";
840 channel_position_color = MEYELLOW;
841 resources->meter_title_w = 25;
843 // (asset) edit info text color
844 edit_font_color = BLACK;
848 resources->draw_clock_background = 0;
852 resources->button_highlighted = LTGREY;
853 resources->button_uphighlighted = DKGREY;
854 resources->button_light = WHITE;
855 resources->button_up = LTGREY;
856 resources->button_shadow = DKGREY;
857 resources->button_down = MDGREY;
863 resources->label_images = new_image_set(5,
866 "radial_checked.png",
868 "radial_checkedhi.png");
870 /* resources->type_to_icon = new_image_set(5,
879 resources->audiovideo_color = DKGREY;
883 resources->tooltip_bg_color = 0xfff7e3;
886 //CWINDOW is probalby ComposerWindow, V=ViewerWindow
887 #define CWINDOW_METER_MARGIN 5
888 #define VWINDOW_METER_MARGIN 5
891 void BlueDotTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
893 // Position of menu buttons (start, stop, ff, etc.)
895 mbuttons_y = gui->mainmenu->get_h();
897 mbuttons_h = get_image("mbutton_left")->get_h();
898 mclock_x = 20; //x position of digits in clock window
899 mclock_y = mbuttons_y + 1 + mbuttons_h + CWINDOW_METER_MARGIN;
900 mclock_w = get_image("clock_bg")->get_w() - 72;
901 mclock_h = get_image("clock_bg")->get_h();
903 //Time bar - coordinates and dimensions
904 mtimebar_x = get_image("patchbay_bg")->get_w();
905 mtimebar_y = mbuttons_y + mbuttons_h;
906 mtimebar_w = w - mtimebar_x;
907 mtimebar_h = get_image("timebar_bg")->get_h();
909 // Zooming tracks - just above the status bar
910 mzoom_h = get_image("zoombar_left")->get_h();
912 mzoom_y = h - get_image("statusbar_left")->get_h() - mzoom_h;
915 // Status bar at the very bottom of the screen.
917 // mstatus_y = mzoom_y + mzoom_h;
918 mstatus_y = mzoom_y + mzoom_h;
920 mstatus_h = h - mstatus_y;
921 mstatus_message_x = 10;
922 mstatus_message_y = 8;
923 mstatus_progress_w = 230;
924 mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 240;
925 mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
928 mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
929 mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
931 //This is Patch Bay - on the left side of the tracks.
933 patchbay_y = mtimebar_y + mtimebar_h;
934 patchbay_w = get_image("patchbay_bg")->get_w();
935 patchbay_h = mzoom_y - patchbay_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
937 //Canvas where audio and video tracks are
939 mcanvas_y = mtimebar_y + mtimebar_h;
941 mcanvas_h = patchbay_h;
944 mhscroll_y = mzoom_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
945 mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT);
946 mvscroll_x = mcanvas_x + mcanvas_w;
947 mvscroll_y = mcanvas_y;
948 mvscroll_h = mcanvas_h;
952 void BlueDotTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
959 ccomposite_w = get_image("cpanel_bg")->get_w();
960 ccomposite_h = mwindow->session->cwindow_h -
961 get_image("cbuttons_left")->get_h();
963 cslider_y = ccomposite_h + 23;
965 cedit_y = cslider_y + 17;
967 ctransport_y = mwindow->session->cwindow_h -
968 get_image_set("autokeyframe")[0]->get_h();
969 ccanvas_x = ccomposite_x + ccomposite_w;
971 ccanvas_h = ccomposite_h;
974 cstatus_y = mwindow->session->cwindow_h - 66;
976 if(mwindow->edl->session->cwindow_meter)
978 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(this,
979 mwindow->edl->session->audio_channels, mwindow->edl->session->cwindow_meter);
980 ccanvas_w = cmeter_x - ccanvas_x - 5;
984 cmeter_x = mwindow->session->cwindow_w;
985 ccanvas_w = cmeter_x - ccanvas_x;
992 ccomposite_x = -get_image("cpanel_bg")->get_w();
994 ccomposite_w = get_image("cpanel_bg")->get_w();
995 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
998 cslider_y = mwindow->session->cwindow_h;
1000 cedit_y = cslider_y + 17;
1002 ctransport_y = cedit_y + 40;
1005 ccanvas_w = mwindow->session->cwindow_w;
1006 ccanvas_h = mwindow->session->cwindow_h;
1007 cmeter_x = mwindow->session->cwindow_w;
1009 cstatus_x = mwindow->session->cwindow_w;
1010 cstatus_y = mwindow->session->cwindow_h;
1017 czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
1018 czoom_y = ctransport_y + 5;
1022 cmeter_h = mwindow->session->cwindow_h - cmeter_y;
1025 cslider_w = ccanvas_x + ccanvas_w - cslider_x;
1026 ctimebar_x = ccanvas_x;
1027 ctimebar_y = ccanvas_y + ccanvas_h;
1028 ctimebar_w = ccanvas_w;
1033 ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
1034 ctime_y = ctransport_y;
1036 cdest_y = czoom_y + 30;
1042 void BlueDotTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
1047 // COPIED START--------
1048 void BlueDotTheme::get_rmonitor_sizes(int do_audio,
1055 Theme::get_rmonitor_sizes(do_audio,
1061 if(!do_video && do_audio)
1063 rmonitor_meter_y -= 30;
1064 rmonitor_meter_h += 30;
1067 // COPIED END--------
1070 void BlueDotTheme::get_vwindow_sizes(VWindowGUI *gui)
1073 vmeter_h = mwindow->session->vwindow_h - cmeter_y;
1076 vcanvas_h = mwindow->session->vwindow_h - get_image("vbuttons_left")->get_h();
1078 if(mwindow->edl->session->vwindow_meter)
1080 vmeter_x = mwindow->session->vwindow_w -
1081 VWINDOW_METER_MARGIN -
1082 MeterPanel::get_meters_width(this,
1083 mwindow->edl->session->audio_channels, mwindow->edl->session->vwindow_meter);
1084 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
1088 vmeter_x = mwindow->session->vwindow_w;
1089 vcanvas_w = mwindow->session->vwindow_w;
1092 vtimebar_x = vcanvas_x;
1093 vtimebar_y = vcanvas_y + vcanvas_h;
1094 vtimebar_w = vcanvas_w;
1099 vslider_y = vtimebar_y + 25;
1100 vslider_w = vtimebar_w - vslider_x;
1102 vedit_y = vslider_y + 17;
1104 vtransport_y = mwindow->session->vwindow_h -
1105 get_image_set("autokeyframe")[0]->get_h();
1107 vtime_y = vedit_y + 7;
1113 vzoom_x = vtime_x + 150;
1115 vsource_x = vtime_x + 50;
1116 vsource_y = vtransport_y + 5;
1123 void BlueDotTheme::build_icons()
1125 new_image("mwindow_icon", "heroine_icon.png");
1126 new_image("vwindow_icon", "heroine_icon.png");
1127 new_image("cwindow_icon", "heroine_icon.png");
1128 new_image("awindow_icon", "heroine_icon.png");
1129 new_image("record_icon", "heroine_icon.png");
1130 new_image("clip_icon", "clip_icon.png");
1135 void BlueDotTheme::build_bg_data()
1138 channel_bg_data = new VFramePng(get_image_data("channel_bg.png"));
1139 channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1142 new_image("resource1024", "resource1024.png");
1143 new_image("resource512", "resource512.png");
1144 new_image("resource256", "resource256.png");
1145 new_image("resource128", "resource128.png");
1146 new_image("resource64", "resource64.png");
1147 new_image("resource32", "resource32.png");
1148 //Graphic Copied from default. Improve!!
1149 new_image("plugin_bg_data", "plugin_bg.png");
1150 new_image("title_bg_data", "title_bg.png");
1151 new_image("vtimebar_bg_data", "vwindow_timebar.png");
1155 //Graphic Copied from default. Improve!! -- use your imagination
1156 void BlueDotTheme::build_overlays()
1158 keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1159 camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1160 maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1161 modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1162 pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1163 projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1174 void BlueDotTheme::draw_rwindow_bg(RecordGUI *gui)
1178 // int margin2 = 80;
1179 // gui->draw_9segment(recordgui_batch_x - margin,
1181 // mwindow->session->rwindow_w - recordgui_status_x + margin,
1182 // recordgui_buttons_y,
1184 // gui->draw_3segmenth(recordgui_options_x - margin2,
1185 // recordgui_buttons_y - 5,
1186 // mwindow->session->rwindow_w - recordgui_options_x + margin2,
1188 // y = recordgui_buttons_y - 5 + rgui_controls->get_h();
1189 // gui->draw_9segment(0,
1191 // mwindow->session->rwindow_w,
1192 // mwindow->session->rwindow_h - y,
1196 void BlueDotTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
1199 // int panel_w = 300;
1200 // int x = rmonitor_meter_x - margin;
1201 // int w = mwindow->session->rmonitor_w - x;
1202 // if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
1203 // gui->clear_box(0,
1205 // mwindow->session->rmonitor_w,
1206 // mwindow->session->rmonitor_h);
1207 // gui->draw_9segment(x,
1210 // mwindow->session->rmonitor_h,
1211 // rmonitor_meters);
1219 void BlueDotTheme::draw_mwindow_bg(MWindowGUI *gui)
1221 // Button bar (not menu bar)
1222 #define MBUTTONS_RIGHTEDGE 290 + 11 + 2*30 + 11 + 2*30 + 11 + 14*30
1223 gui->draw_3segmenth(mbuttons_x,
1226 get_image("mbutton_left"),
1228 gui->draw_3segmenth(mbuttons_x + MBUTTONS_RIGHTEDGE,
1231 get_image("mbutton_right"));
1233 // MIHA: COPIED FROM DEFAULT THEME M6>>
1234 gui->draw_vframe(get_image("panel_divider"),
1235 mbuttons_x + 290 + 5,
1238 gui->draw_vframe(get_image("panel_divider"),
1239 mbuttons_x + 290 + 11 + 30 * 2 + 5,
1242 gui->draw_vframe(get_image("panel_divider"),
1243 mbuttons_x + 290 + 11 + 30 * 2 + 11 + 30 * 2 + 5,
1247 // MIHA: COPIED FROM DEFAULT THEME M6<<
1250 // Clock (here the background of the clock is drawn)
1251 gui->draw_3segmenth(0,
1252 mbuttons_y + get_image("mbutton_left")->get_h(),
1253 get_image("patchbay_bg")->get_w(),
1254 get_image("clock_bg"));
1258 gui->draw_3segmentv(patchbay_x,
1261 get_image("patchbay_bg"));
1267 //Drawing of Track's canvas
1268 gui->draw_9segment(mcanvas_x,
1272 get_image("tracks_bg"));
1276 gui->draw_3segmenth(mtimebar_x,
1279 get_image("timebar_bg"));
1283 #define ZOOMBAR_CENTER 1100
1284 gui->draw_3segmenth(mzoom_x,
1287 get_image("zoombar_left"));
1288 if(mzoom_w > ZOOMBAR_CENTER)
1289 gui->draw_3segmenth(mzoom_x + ZOOMBAR_CENTER,
1291 mzoom_w - ZOOMBAR_CENTER,
1292 get_image("zoombar_right"));
1296 gui->draw_3segmenth(mstatus_x,
1299 get_image("statusbar_left"));
1301 if(mstatus_w > ZOOMBAR_CENTER)
1302 gui->draw_3segmenth(mstatus_x + ZOOMBAR_CENTER,
1304 mstatus_w - ZOOMBAR_CENTER,
1305 get_image("statusbar_right"));
1309 void BlueDotTheme::draw_cwindow_bg(CWindowGUI *gui)
1312 const int button_division = 530;
1313 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1314 gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1315 if(mwindow->edl->session->cwindow_meter)
1317 gui->draw_3segmenth(button_division,
1319 cmeter_x - CWINDOW_METER_MARGIN - button_division,
1320 get_image("cbuttons_right"));
1321 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1323 mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1324 mwindow->session->cwindow_h,
1325 get_image("cmeter_bg"));
1329 gui->draw_3segmenth(button_division,
1331 cmeter_x - CWINDOW_METER_MARGIN - button_division + 100,
1332 get_image("cbuttons_right"));
1336 void BlueDotTheme::draw_vwindow_bg(VWindowGUI *gui)
1339 const int button_division = 535;
1340 gui->draw_3segmenth(0,
1343 get_image("vbuttons_left"));
1344 if(mwindow->edl->session->vwindow_meter)
1346 gui->draw_3segmenth(button_division,
1348 vmeter_x - VWINDOW_METER_MARGIN - button_division,
1349 get_image("vbuttons_right"));
1350 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
1352 mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1353 mwindow->session->vwindow_h,
1354 get_image("vmeter_bg"));
1358 gui->draw_3segmenth(button_division,
1360 vmeter_x - VWINDOW_METER_MARGIN - button_division + 100,
1361 get_image("vbuttons_right"));
1365 void BlueDotTheme::get_preferences_sizes()
1370 void BlueDotTheme::draw_preferences_bg(PreferencesWindow *gui)
1372 gui->draw_9segment(0, 0, gui->get_w(), gui->get_h() - 40, get_image("preferences_bg"));
1375 void BlueDotTheme::get_new_sizes(NewWindow *gui)
1379 void BlueDotTheme::draw_new_bg(NewWindow *gui)
1381 gui->draw_vframe(get_image("new_bg"), 0, 0);
1384 void BlueDotTheme::draw_setformat_bg(SetFormatWindow *gui)
1386 gui->draw_vframe(get_image("setformat_bg"), 0, 0);