1 /* cakewalk.C (uncommented). Part of the Cakewalk theme. */
4 #include "cwindowgui.h"
7 #include "edlsession.h"
9 #include "mainsession.h"
11 #include "meterpanel.h"
13 #include "mwindowgui.h"
16 #include "preferencesthread.h"
17 #include "recordgui.h"
18 #include "recordmonitor.h"
19 #include "setformat.h"
20 #include "statusbar.h"
22 #include "trackcanvas.h"
24 #include "vwindowgui.h"
25 #define ALARM 0xff0000
26 #define CwGray 0x31363b
27 #define CwDarkGray 0x232629
28 #define TextFg 0xeff0f1
29 #define TextFgBright 0xfffdee
30 #define TextBorderOut 0x7f8c8d
31 #define CwCyan 0x3daee9
32 #define CwCyanDark 0x2980b9
33 #define ComicYellow 0xffcc00
34 #define CwOrange 0xf67400
35 #define LockedRed 0xda4453
36 #define MeterGreen 0xa7fd6f
37 #define MeterYellow 0xfce16f
38 PluginClient* new_plugin(PluginServer *server)
40 return new CAKEWALKTHEMEMain(server);
42 CAKEWALKTHEMEMain::CAKEWALKTHEMEMain(PluginServer *server)
43 : PluginTClient(server)
46 CAKEWALKTHEMEMain::~CAKEWALKTHEMEMain()
49 const char* CAKEWALKTHEMEMain::plugin_title() { return N_("Cakewalk"); }
50 Theme* CAKEWALKTHEMEMain::new_theme()
52 theme = new CAKEWALKTHEME;
53 extern unsigned char _binary_theme_cakewalk_data_start[];
54 theme->set_data(_binary_theme_cakewalk_data_start);
57 CAKEWALKTHEME::CAKEWALKTHEME()
61 CAKEWALKTHEME::~CAKEWALKTHEME()
63 delete camerakeyframe_data;
64 delete channel_position_data;
66 delete maskkeyframe_data;
67 delete modekeyframe_data;
69 delete pankeyframe_data;
70 delete projectorkeyframe_data;
72 void CAKEWALKTHEME::initialize()
74 BC_Resources *resources = BC_WindowBase::get_resources();
76 about_bg = new VFramePng(get_image_data("about_bg.png"));
77 new_image_set_images("mwindow_icon", 1, new VFramePng(get_image_data("cin_icon_mwin.png")));
78 new_image_set_images("vwindow_icon", 1, new VFramePng(get_image_data("cin_icon_vwin.png")));
79 new_image_set_images("cwindow_icon", 1, new VFramePng(get_image_data("cin_icon_cwin.png")));
80 new_image_set_images("awindow_icon", 1, new VFramePng(get_image_data("cin_icon_awin.png")));
81 new_image_set_images("record_icon", 1, new VFramePng(get_image_data("cin_icon_rec.png")));
82 resources->text_default = TextFg;
83 resources->text_background = CwDarkGray;
84 resources->text_background_disarmed = LockedRed;
85 resources->text_border1 = TextBorderOut;
86 resources->text_border2 = CwDarkGray;
87 resources->text_border3 = CwDarkGray;
88 resources->text_border4 = TextBorderOut;
89 resources->text_border2_hi = CwOrange;
90 resources->text_border3_hi = CwOrange;
91 resources->text_highlight = CwCyan;
92 resources->text_inactive_highlight = CwCyanDark;
93 resources->bg_color = CwGray;
94 resources->border_light2 = 0xaaff00;
95 resources->border_shadow2 = 0xaaaaff;
96 resources->default_text_color = TextFg;
97 resources->menu_title_text = WHITE;
98 resources->popup_title_text = WHITE;
99 resources->menu_item_text = WHITE;
100 resources->menu_highlighted_fontcolor = BLACK;
101 resources->generic_button_margin = xS(20);
102 resources->pot_needle_color = TextFg;
103 resources->pot_offset = 1;
104 resources->progress_text = resources->text_default;
105 resources->meter_font_color = resources->default_text_color;
106 resources->menu_light = CwGray;
107 resources->menu_down = ALARM;
108 resources->menu_up = ALARM;
109 resources->menu_shadow = ALARM;
110 resources->menu_highlighted = CwCyan;
111 resources->popupmenu_margin = xS(15);
112 resources->popupmenu_triangle_margin = xS(15);
113 resources->listbox_title_color = TextFgBright;
114 resources->listbox_title_margin = xS(15);
115 resources->listbox_title_hotspot = xS(15);
116 resources->listbox_border1 = TextBorderOut;
117 resources->listbox_border2 = CwDarkGray;
118 resources->listbox_border3 = CwDarkGray;
119 resources->listbox_border4 = TextBorderOut;
120 resources->listbox_border2_hi = CwCyan;
121 resources->listbox_border3_hi = CwCyan;
122 resources->listbox_highlighted = CwCyan;
123 resources->listbox_inactive = CwDarkGray;
124 resources->listbox_bg = 0;
125 resources->listbox_text = TextFg;
126 resources->listbox_selected = CwCyan;
127 resources->filebox_margin = yS(130);
128 resources->file_color = WHITE;
129 resources->directory_color = ComicYellow;
130 title_font = MEDIUMFONT;
132 recordgui_fixed_color = MeterGreen;
133 recordgui_variable_color = MeterYellow;
134 channel_position_color = MeterYellow;
135 resources->meter_title_w = xS(28);
136 edit_font_color = ComicYellow;
137 assetedit_color = TextFgBright;
138 timebar_cursor_color = WHITE;
139 resources->tooltip_bg_color = TextFgBright;
140 resources->tooltip_delay = 1500;
142 resources->audiovideo_color = TextFg;
143 resources->blink_rate = 750;
144 clock_fg_color = MeterGreen;
145 inout_highlight_color=CwCyan;
150 "loadmode_checked.png",
152 "loadmode_checkedhi.png",
158 "loadmode_checked.png",
160 "loadmode_checkedhi.png",
163 "loadmode_newcat.png",
166 "loadmode_checked.png",
168 "loadmode_checkedhi.png",
174 "loadmode_checked.png",
176 "loadmode_checkedhi.png",
179 "loadmode_newtracks.png",
182 "loadmode_checked.png",
184 "loadmode_checkedhi.png",
185 "loadmode_newtracks");
187 "loadmode_paste.png",
190 "loadmode_checked.png",
192 "loadmode_checkedhi.png",
195 "loadmode_resource.png",
198 "loadmode_checked.png",
200 "loadmode_checkedhi.png",
201 "loadmode_resource");
203 new_toggle("loadmode_edl_clip.png",
206 "loadmode_checked.png",
208 "loadmode_checkedhi.png",
209 "loadmode_edl_clip");
210 new_toggle("loadmode_edl_nested.png",
213 "loadmode_checked.png",
215 "loadmode_checkedhi.png",
216 "loadmode_edl_nested");
217 new_toggle("loadmode_edl_fileref.png",
220 "loadmode_checked.png",
222 "loadmode_checkedhi.png",
223 "loadmode_edl_fileref");
225 resources->filebox_icons_images = new_button(
227 "fileboxbutton_up.png",
228 "fileboxbutton_hi.png",
229 "fileboxbutton_dn.png",
231 resources->filebox_text_images = new_button(
233 "fileboxbutton_up.png",
234 "fileboxbutton_hi.png",
235 "fileboxbutton_dn.png",
237 resources->filebox_newfolder_images = new_button(
239 "fileboxbutton_up.png",
240 "fileboxbutton_hi.png",
241 "fileboxbutton_dn.png",
242 "filebox_newfolder");
243 resources->filebox_rename_images = new_button(
245 "fileboxbutton_up.png",
246 "fileboxbutton_hi.png",
247 "fileboxbutton_dn.png",
249 resources->filebox_updir_images = new_button(
251 "fileboxbutton_up.png",
252 "fileboxbutton_hi.png",
253 "fileboxbutton_dn.png",
255 resources->filebox_delete_images = new_button(
257 "fileboxbutton_up.png",
258 "fileboxbutton_hi.png",
259 "fileboxbutton_dn.png",
261 resources->filebox_reload_images = new_button(
263 "fileboxbutton_up.png",
264 "fileboxbutton_hi.png",
265 "fileboxbutton_dn.png",
267 resources->filebox_descend_images = new_button(
269 "filebox_bigbutton_up.png",
270 "filebox_bigbutton_hi.png",
271 "filebox_bigbutton_dn.png",
273 resources->usethis_button_images = resources->ok_images = new_button(
275 "filebox_bigbutton_up.png",
276 "filebox_bigbutton_hi.png",
277 "filebox_bigbutton_dn.png",
281 "new_bigbutton_up.png",
282 "new_bigbutton_hi.png",
283 "new_bigbutton_dn.png",
303 resources->cancel_images = new_button(
305 "filebox_bigbutton_up.png",
306 "filebox_bigbutton_hi.png",
307 "filebox_bigbutton_dn.png",
311 "new_bigbutton_up.png",
312 "new_bigbutton_hi.png",
313 "new_bigbutton_dn.png",
314 "new_cancel_images");
315 new_button("mask_pnt_linear.png",
316 "mask_button_up.png",
317 "mask_button_hi.png",
318 "mask_button_dn.png",
319 "mask_pnt_linear_images");
320 new_button("mask_crv_linear.png",
321 "mask_button_up.png",
322 "mask_button_hi.png",
323 "mask_button_dn.png",
324 "mask_crv_linear_images");
325 new_button("mask_all_linear.png",
326 "mask_button_up.png",
327 "mask_button_hi.png",
328 "mask_button_dn.png",
329 "mask_all_linear_images");
330 new_button("mask_pnt_smooth.png",
331 "mask_button_up.png",
332 "mask_button_hi.png",
333 "mask_button_dn.png",
334 "mask_pnt_smooth_images");
335 new_button("mask_crv_smooth.png",
336 "mask_button_up.png",
337 "mask_button_hi.png",
338 "mask_button_dn.png",
339 "mask_crv_smooth_images");
340 new_button("mask_all_smooth.png",
341 "mask_button_up.png",
342 "mask_button_hi.png",
343 "mask_button_dn.png",
344 "mask_all_smooth_images");
345 new_button("mask_prst_sqr.png",
346 "mask_button_up.png",
347 "mask_button_hi.png",
348 "mask_button_dn.png",
349 "mask_prst_sqr_images");
350 new_button("mask_prst_crc.png",
351 "mask_button_up.png",
352 "mask_button_hi.png",
353 "mask_button_dn.png",
354 "mask_prst_crc_images");
355 new_button("mask_prst_tri.png",
356 "mask_button_up.png",
357 "mask_button_hi.png",
358 "mask_button_dn.png",
359 "mask_prst_tri_images");
360 new_button("mask_prst_ovl.png",
361 "mask_button_up.png",
362 "mask_button_hi.png",
363 "mask_button_dn.png",
364 "mask_prst_ovl_images");
365 new_button("mask_prst_load.png",
366 "mask_button_up.png",
367 "mask_button_hi.png",
368 "mask_button_dn.png",
369 "mask_prst_load_images");
370 new_button("mask_prst_save.png",
371 "mask_button_up.png",
372 "mask_button_hi.png",
373 "mask_button_dn.png",
374 "mask_prst_save_images");
375 new_button("mask_prst_trsh.png",
376 "mask_button_up.png",
377 "mask_button_hi.png",
378 "mask_button_dn.png",
379 "mask_prst_trsh_images");
380 new_button("mask_pstn_cen.png",
381 "mask_button_up.png",
382 "mask_button_hi.png",
383 "mask_button_dn.png",
384 "mask_pstn_cen_images");
385 new_button("mask_pstn_nrm.png",
386 "mask_button_up.png",
387 "mask_button_hi.png",
388 "mask_button_dn.png",
389 "mask_pstn_nrm_images");
390 resources->bar_data = new_image("bar", "bar.png");
391 resources->check = new_image("check", "check.png");
392 resources->min_menu_w = xS(96);
393 resources->menu_popup_bg = new_image("menu_popup_bg.png");
394 resources->menu_item_bg = new_image_set(
399 resources->menu_bar_bg = new_image("menubar_bg.png");
400 resources->menu_title_bg = new_image_set
405 resources->popupmenu_images = 0;
406 resources->toggle_highlight_bg = new_image(
407 "toggle_highlight_bg",
408 "text_highlight.png");
409 resources->generic_button_images = new_image_set(
414 resources->horizontal_slider_data = new_image_set(
421 "hslider_bg_dn.png");
422 resources->vertical_slider_data = new_image_set(
429 "hslider_bg_dn.png");
430 for( int i=0; i<6; ++i )
431 resources->vertical_slider_data[i]->rotate90();
432 resources->progress_images = new_image_set(
436 resources->tumble_data = new_image_set(
442 new_image_set("tumblepatch_data", 4,
443 "tumblepatch_up.png",
444 "tumblepatch_hi.png",
445 "tumblepatch_bottom.png",
446 "tumblepatch_top.png");
447 resources->listbox_button = new_button4(
448 "listbox_button.png",
454 resources->filebox_szfmt_images = new_image_set(
456 "file_size_zero_up.png",
457 "file_size_zero_hi.png",
458 "file_size_zero_dn.png",
459 "file_size_lwrb_up.png",
460 "file_size_lwrb_hi.png",
461 "file_size_lwrb_dn.png",
462 "file_size_capb_up.png",
463 "file_size_capb_hi.png",
464 "file_size_capb_dn.png",
465 "file_size_semi_up.png",
466 "file_size_semi_hi.png",
467 "file_size_semi_dn.png");
468 resources->listbox_column = new_image_set(
473 resources->listbox_up = new_image("listbox_up.png");
474 resources->listbox_dn = new_image("listbox_dn.png");
475 resources->pan_data = new_image_set(
482 "pan_channel_small.png",
483 "pan_stick_small.png");
484 resources->pan_text_color = TextFgBright;
485 resources->pot_images = new_image_set(
490 resources->checkbox_images = new_image_set(
494 "checkbox_checked.png",
496 "checkbox_checkedhi.png");
497 resources->radial_images = new_image_set(
501 "radial_checked.png",
503 "radial_checkedhi.png");
504 resources->xmeter_images = new_image_set(
513 resources->ymeter_images = new_image_set(
522 resources->hscroll_data = new_image_set(
524 "hscroll_handle_up.png",
525 "hscroll_handle_hi.png",
526 "hscroll_handle_dn.png",
527 "hscroll_handle_bg.png",
528 "hscroll_left_up.png",
529 "hscroll_left_hi.png",
530 "hscroll_left_dn.png",
531 "hscroll_right_up.png",
532 "hscroll_right_hi.png",
533 "hscroll_right_dn.png");
534 resources->vscroll_data = new_image_set(
536 "vscroll_handle_up.png",
537 "vscroll_handle_hi.png",
538 "vscroll_handle_dn.png",
539 "vscroll_handle_bg.png",
540 "vscroll_left_up.png",
541 "vscroll_left_hi.png",
542 "vscroll_left_dn.png",
543 "vscroll_right_up.png",
544 "vscroll_right_hi.png",
545 "vscroll_right_dn.png");
546 resources->scroll_minhandle = xS(20);
548 "prevtip.png", "tipbutton_up.png",
549 "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
551 "nexttip.png", "tipbutton_up.png",
552 "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
554 "closetip.png", "tipbutton_up.png",
555 "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
557 "swap_extents.png", "editpanel_up.png",
558 "editpanel_hi.png", "editpanel_dn.png", "swap_extents");
559 preferences_category_overlap = 0;
560 preferencescategory_x = 0;
561 preferencescategory_y = yS(5);
562 preferencestitle_x = xS(5);
563 preferencestitle_y = yS(10);
564 preferencesoptions_x = xS(5);
565 preferencesoptions_y = 0;
566 message_normal = resources->text_default;
567 mtransport_margin = xS(10);
568 toggle_margin = xS(10);
569 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png",
571 new_image_set("xpane", 3,
575 new_image_set("ypane", 3,
579 new_image("mbutton_bg", "mbutton_bg.png");
580 new_image("timebar_bg", "timebar_bg_flat.png");
581 new_image("timebar_brender", "timebar_brender.png");
582 new_image("clock_bg", "mclock_flat.png");
583 new_image("patchbay_bg", "patchbay_bg.png");
584 new_image("statusbar", "statusbar.png");
585 new_image_set("zoombar_menu", 3,
589 new_image_set("zoombar_tumbler", 4,
592 "zoomtumble_bottom.png",
593 "zoomtumble_top.png");
594 new_image_set("auto_range", 4,
597 "autorange_bottom.png",
598 "autorange_top.png");
599 new_image_set("mode_popup", 3,
600 "mode_up.png", "mode_hi.png", "mode_dn.png");
601 new_image("mode_add", "mode_add.png");
602 new_image("mode_divide", "mode_divide.png");
603 new_image("mode_multiply", "mode_multiply.png");
604 new_image("mode_normal", "mode_normal.png");
605 new_image("mode_replace", "mode_replace.png");
606 new_image("mode_subtract", "mode_subtract.png");
607 new_image("mode_max", "mode_max.png");
608 new_image_set("plugin_on", 5,
611 "plugin_onselect.png",
613 "plugin_onselecthi.png");
614 new_image_set("plugin_show", 5,
617 "plugin_showselect.png",
619 "plugin_showselecthi.png");
620 new_image_set("mixpatch_data", 5,
623 "mixpatch_checked.png",
625 "mixpatch_checkedhi.png");
626 new_image("cpanel_bg", "cpanel_bg.png");
627 new_image("cbuttons_left", "cbuttons_left.png");
628 new_image("cbuttons_right", "cbuttons_right.png");
629 new_image("cmeter_bg", "cmeter_bg.png");
630 new_image("cwindow_focus", "cwindow_focus.png");
631 new_image("vbuttons_left", "vbuttons_left.png");
632 new_image("vbuttons_right", "vbuttons_right.png");
633 new_image("vclock", "vclock.png");
634 new_image("preferences_bg", "preferences_bg.png");
635 new_image("new_bg", "new_bg.png");
636 new_image("setformat_bg", "setformat_bg.png");
637 timebar_view_data = new_image("timebar_view.png");
638 setformat_w = get_image("setformat_bg")->get_w();
639 setformat_h = get_image("setformat_bg")->get_h();
640 setformat_x1 = xS(15);
641 setformat_x2 = xS(110);
642 setformat_x3 = xS(315);
643 setformat_x4 = xS(425);
644 setformat_y1 = yS(20);
645 setformat_y2 = yS(85);
646 setformat_y3 = yS(125);
647 setformat_margin = yS(30);
648 setformat_channels_x = xS(25);
649 setformat_channels_y = yS(242);
650 setformat_channels_w = xS(250);
651 setformat_channels_h = yS(250);
652 loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + yS(10);
654 new_toggle("playpatch.png",
657 "playpatch_checked.png",
659 "playpatch_checkedhi.png",
661 new_toggle("recordpatch.png",
662 "recordpatch_up.png",
663 "recordpatch_hi.png",
664 "recordpatch_checked.png",
665 "recordpatch_dn.png",
666 "recordpatch_checkedhi.png",
668 new_toggle("gangpatch.png",
673 "patch_checkedhi.png",
675 new_toggle("drawpatch.png",
680 "patch_checkedhi.png",
682 new_toggle("masterpatch.png",
687 "patch_checkedhi.png",
690 new_image_set("mutepatch_data",
694 "mutepatch_checked.png",
696 "mutepatch_checkedhi.png");
697 new_image_set("expandpatch_data",
699 "expandpatch_up.png",
700 "expandpatch_hi.png",
701 "expandpatch_checked.png",
702 "expandpatch_dn.png",
703 "expandpatch_checkedhi.png");
706 out_point = new_image_set(
712 "out_checkedhi.png");
713 in_point = new_image_set(
720 label_toggle = new_image_set(
722 "labeltoggle_up.png",
723 "labeltoggle_uphi.png",
725 "labeltoggle_dn.png",
726 "label_checkedhi.png");
727 ffmpeg_toggle = new_image_set(
734 proxy_p_toggle = new_image_set(
740 "proxy_p_chkdhi.png");
741 proxy_s_toggle = new_image_set(
747 "proxy_s_chkdhi.png");
748 mask_mode_toggle = new_image_set(5,
751 "mask_mode_chkd.png",
752 "mask_mode_down.png",
753 "mask_mode_chkdhi.png");
754 shbtn_data = new_image_set(
768 "histogram_carrot_up.png",
769 "histogram_carrot_hi.png",
770 "histogram_carrot_checked.png",
771 "histogram_carrot_dn.png",
772 "histogram_carrot_checkedhi.png");
773 statusbar_cancel_data = new_image_set(
775 "statusbar_cancel_up.png",
776 "statusbar_cancel_hi.png",
777 "statusbar_cancel_dn.png");
778 VFrame *editpanel_up = new_image("editpanel_up.png");
779 VFrame *editpanel_hi = new_image("editpanel_hi.png");
780 VFrame *editpanel_dn = new_image("editpanel_dn.png");
781 VFrame *editpanel_checked = new_image("editpanel_checked.png");
782 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
783 new_image("panel_divider", "panel_divider.png");
784 new_button("bottom_justify.png",
785 editpanel_up, editpanel_hi, editpanel_dn,
787 new_button("center_justify.png",
788 editpanel_up, editpanel_hi, editpanel_dn,
790 new_button("channel.png",
791 editpanel_up, editpanel_hi, editpanel_dn,
793 new_button("lok.png",
794 editpanel_up, editpanel_hi, editpanel_dn,
796 new_toggle("histogram_toggle.png",
803 new_toggle("histogram_rgb.png",
809 "histogram_rgb_toggle");
810 new_toggle("waveform.png",
817 new_toggle("waveform_rgb.png",
823 "waveform_rgb_toggle");
824 new_toggle("scope.png",
831 new_button("picture.png",
832 editpanel_up, editpanel_hi, editpanel_dn,
834 new_button("histogram_img.png",
835 editpanel_up, editpanel_hi, editpanel_dn,
837 new_button("copy.png",
838 editpanel_up, editpanel_hi, editpanel_dn,
840 new_button("commercial.png",
841 editpanel_up, editpanel_hi, editpanel_dn,
843 new_button("cut.png",
844 editpanel_up, editpanel_hi, editpanel_dn,
846 new_button("fit.png",
847 editpanel_up, editpanel_hi, editpanel_dn,
849 new_button("fitautos.png",
850 editpanel_up, editpanel_hi, editpanel_dn,
852 new_button("inpoint.png",
853 editpanel_up, editpanel_hi, editpanel_dn,
855 new_button("label.png",
856 editpanel_up, editpanel_hi, editpanel_dn,
858 new_button("left_justify.png",
859 editpanel_up, editpanel_hi, editpanel_dn,
861 new_button("magnify.png",
862 editpanel_up, editpanel_hi, editpanel_dn,
864 new_button("middle_justify.png",
865 editpanel_up, editpanel_hi, editpanel_dn,
867 new_button("nextlabel.png",
868 editpanel_up, editpanel_hi, editpanel_dn,
870 new_button("prevlabel.png",
871 editpanel_up, editpanel_hi, editpanel_dn,
873 new_button("nextedit.png",
874 editpanel_up, editpanel_hi, editpanel_dn,
876 new_button("prevedit.png",
877 editpanel_up, editpanel_hi, editpanel_dn,
879 new_button("outpoint.png",
880 editpanel_up, editpanel_hi, editpanel_dn,
882 over_button = new_button("over.png",
883 editpanel_up, editpanel_hi, editpanel_dn,
885 overwrite_data = new_button("overwrite.png",
886 editpanel_up, editpanel_hi, editpanel_dn,
888 new_button("paste.png",
889 editpanel_up, editpanel_hi, editpanel_dn,
891 new_button("redo.png",
892 editpanel_up, editpanel_hi, editpanel_dn,
894 new_button("right_justify.png",
895 editpanel_up, editpanel_hi, editpanel_dn,
897 splice_data = new_button("splice.png",
898 editpanel_up, editpanel_hi, editpanel_dn,
900 new_button("toclip.png",
901 editpanel_up, editpanel_hi, editpanel_dn,
903 new_button("goto.png",
904 editpanel_up, editpanel_hi, editpanel_dn,
906 new_button("clapper.png",
907 editpanel_up, editpanel_hi, editpanel_dn,
909 new_button("top_justify.png",
910 editpanel_up, editpanel_hi, editpanel_dn,
912 new_button("undo.png",
913 editpanel_up, editpanel_hi, editpanel_dn,
915 new_button("wrench.png",
916 editpanel_up, editpanel_hi, editpanel_dn,
919 VFrame **edge_on = new_toggle("edge_on.png",
920 editpanel_up, editpanel_hi, editpanel_checked,
921 editpanel_dn, editpanel_checkedhi, "edge_on");
922 VFrame **edge_off = new_toggle("edge_off.png",
923 editpanel_up, editpanel_hi, editpanel_checked,
924 editpanel_dn, editpanel_checkedhi, "edge_off");
925 new_image_set_images("bump_edge", 5,
926 new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
927 new VFrame(*edge_on[0]), new VFrame(*edge_off[3]),
928 new VFrame(*edge_on[4]));
929 VFrame **span_on = new_toggle("span_on.png",
930 editpanel_up, editpanel_hi, editpanel_checked,
931 editpanel_dn, editpanel_checkedhi, "span_on");
932 VFrame **span_off = new_toggle("span_off.png",
933 editpanel_up, editpanel_hi, editpanel_checked,
934 editpanel_dn, editpanel_checkedhi, "span_off");
935 new_image_set_images("bump_span", 5,
936 new VFrame(*span_off[0]), new VFrame(*span_off[1]),
937 new VFrame(*span_on[0]), new VFrame(*span_off[3]),
938 new VFrame(*span_on[4]));
940 VFrame *transport_up = new_image("transportup.png");
941 VFrame *transport_hi = new_image("transporthi.png");
942 VFrame *transport_dn = new_image("transportdn.png");
943 new_button("end.png",
944 transport_up, transport_hi, transport_dn,
946 new_button("fastfwd.png",
947 transport_up, transport_hi, transport_dn,
949 new_button("fastrev.png",
950 transport_up, transport_hi, transport_dn,
952 new_button("play.png",
953 transport_up, transport_hi, transport_dn,
955 new_button("framefwd.png",
956 transport_up, transport_hi, transport_dn,
958 new_button("framerev.png",
959 transport_up, transport_hi, transport_dn,
961 new_button("pause.png",
962 transport_up, transport_hi, transport_dn,
964 new_button("record.png",
965 transport_up, transport_hi, transport_dn,
967 new_button("singleframe.png",
968 transport_up, transport_hi, transport_dn,
970 new_button("reverse.png",
971 transport_up, transport_hi, transport_dn,
973 new_button("rewind.png",
974 transport_up, transport_hi, transport_dn,
976 new_button("stop.png",
977 transport_up, transport_hi, transport_dn,
979 new_button("stop.png",
980 transport_up, transport_hi, transport_dn,
982 new_image("cwindow_inactive", "cwindow_inactive.png");
983 new_image("cwindow_active", "cwindow_active.png");
984 new_image_set("category_button",
986 "preferencesbutton_dn.png",
987 "preferencesbutton_dnhi.png",
988 "preferencesbutton_dnlo.png");
989 new_image_set("category_button_checked",
991 "preferencesbutton_up.png",
992 "preferencesbutton_uphi.png",
993 "preferencesbutton_dnlo.png");
994 new_image_set("color3way_point",
999 new_toggle("arrow.png",
1000 editpanel_up, editpanel_hi, editpanel_checked,
1001 editpanel_dn, editpanel_checkedhi,
1003 new_toggle("autokeyframe.png",
1004 transport_up, editpanel_hi, editpanel_checked,
1005 editpanel_dn, editpanel_checkedhi,
1007 new_toggle("spankeyframe.png",
1008 transport_up, editpanel_hi, editpanel_checked,
1009 editpanel_dn, editpanel_checkedhi,
1011 new_toggle("ibeam.png",
1012 editpanel_up, editpanel_hi, editpanel_checked,
1013 editpanel_dn, editpanel_checkedhi,
1015 new_toggle("show_meters.png",
1016 editpanel_up, editpanel_hi, editpanel_checked,
1017 editpanel_dn, editpanel_checkedhi,
1019 new_toggle("blank30x30.png",
1020 new_image("locklabels_locked.png"),
1021 new_image("locklabels_lockedhi.png"),
1022 new_image("locklabels_unlocked.png"),
1023 new_image("locklabels_dn.png"),
1024 new_image("locklabels_unlockedhi.png"),
1026 new_toggle("gang0.png",
1027 editpanel_up, editpanel_hi, editpanel_checked,
1028 editpanel_dn, editpanel_checkedhi,
1030 new_toggle("gang1.png",
1031 editpanel_up, editpanel_hi, editpanel_checked,
1032 editpanel_dn, editpanel_checkedhi,
1034 new_toggle("gang2.png",
1035 editpanel_up, editpanel_hi, editpanel_checked,
1036 editpanel_dn, editpanel_checkedhi,
1038 VFrame *cpanel_up = new_image("cpanel_up.png");
1039 VFrame *cpanel_hi = new_image("cpanel_hi.png");
1040 VFrame *cpanel_dn = new_image("cpanel_dn.png");
1041 VFrame *cpanel_checked = new_image("cpanel_checked.png");
1042 VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
1043 new_toggle("camera.png",
1044 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1046 new_toggle("crop.png",
1047 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1049 new_toggle("eyedrop.png",
1050 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1052 new_toggle("magnify.png",
1053 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1055 new_toggle("mask.png",
1056 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1058 new_toggle("ruler.png",
1059 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1061 new_toggle("projector.png",
1062 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1064 new_toggle("protect.png",
1065 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1067 new_toggle("titlesafe.png",
1068 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1070 new_toggle("toolwindow.png",
1071 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1073 new_toggle("tan_smooth.png",
1074 editpanel_up, editpanel_hi, editpanel_checked,
1075 editpanel_dn, editpanel_checkedhi,
1077 new_toggle("tan_linear.png",
1078 editpanel_up, editpanel_hi, editpanel_checked,
1079 editpanel_dn, editpanel_checkedhi,
1081 new_toggle("tan_tangent.png",
1082 editpanel_up, editpanel_hi, editpanel_checked,
1083 editpanel_dn, editpanel_checkedhi,
1085 new_toggle("tan_free.png",
1086 editpanel_up, editpanel_hi, editpanel_checked,
1087 editpanel_dn, editpanel_checkedhi,
1089 new_toggle("tan_bump.png",
1090 editpanel_up, editpanel_hi, editpanel_checked,
1091 editpanel_dn, editpanel_checkedhi,
1093 new_toggle("mask_scale_x.png", "mask_scale_up.png", "mask_scale_uphi.png",
1094 "mask_scale_chkd.png", "mask_scale_xdown.png", "mask_scale_chkdhi.png",
1096 new_toggle("mask_scale_y.png", "mask_scale_up.png", "mask_scale_uphi.png",
1097 "mask_scale_chkd.png", "mask_scale_ydown.png", "mask_scale_chkdhi.png",
1099 new_toggle("mask_scale_xy.png", "mask_scale_up.png", "mask_scale_uphi.png",
1100 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
1104 void CAKEWALKTHEME::get_vwindow_sizes(VWindowGUI *gui)
1106 int edit_w = EditPanel::calculate_w(mwindow, 0, 12);
1107 int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin;
1108 vtimebar_h = yS(16);
1109 int division_w = xS(30);
1111 int vtime_border = xS(15);
1112 vmeter_y = widget_border;
1113 vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border;
1115 if (mwindow->edl->session->vwindow_meter) {
1116 vmeter_x = mwindow->session->vwindow_w -
1117 MeterPanel::get_meters_width(this,
1118 mwindow->edl->session->audio_channels,
1119 mwindow->edl->session->vwindow_meter);
1121 vmeter_x = mwindow->session->vwindow_w + widget_border;
1125 vcanvas_w = vmeter_x - vcanvas_x - widget_border;
1128 transport_w + widget_border +
1129 vtime_w + division_w +
1130 vtime_border > vmeter_x) {
1131 buttons_h = get_image("vbuttons_left")->get_h();
1132 vedit_x = widget_border;
1133 vedit_y = mwindow->session->vwindow_h -
1137 vtransport_x = widget_border;
1138 vtransport_y = mwindow->session->vwindow_h -
1139 get_image_set("autokeyframe")[0]->get_h() -
1141 vdivision_x = xS(280);
1142 vtime_x = vedit_x + xS(85);
1143 vtime_y = vedit_y + yS(28);
1145 buttons_h = vtimebar_h +
1147 EditPanel::calculate_h(mwindow) +
1149 vtransport_x = widget_border;
1150 vtransport_y = mwindow->session->vwindow_h -
1154 vedit_x = vtransport_x + transport_w + widget_border;
1155 vedit_y = vtransport_y;
1156 vdivision_x = vedit_x + edit_w + division_w;
1157 vtime_x = vdivision_x + vtime_border;
1158 vtime_y = vedit_y + widget_border;
1160 vcanvas_h = mwindow->session->vwindow_h - buttons_h;
1162 vtimebar_y = vcanvas_y + vcanvas_h;
1163 vtimebar_w = vmeter_x - widget_border;
1165 void CAKEWALKTHEME::build_bg_data()
1167 channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1168 new_image1("resource1024", "resource1024.png");
1169 new_image1("resource512", "resource512.png");
1170 new_image1("resource256", "resource256.png");
1171 new_image1("resource128", "resource128.png");
1172 new_image1("resource64", "resource64.png");
1173 new_image1("resource32", "resource32.png");
1174 new_image("plugin_bg_data", "plugin_bg.png");
1175 new_image("title_bg_data", "title_bg.png");
1176 new_image("vtimebar_bg_data", "vwindow_timebar.png");
1178 void CAKEWALKTHEME::build_overlays()
1180 keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1181 camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1182 maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1183 modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1184 hardedge_data = new VFramePng(get_image_data("hardedge.png"));
1185 pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1186 projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1188 void CAKEWALKTHEME::draw_rwindow_bg(RecordGUI *gui)
1191 void CAKEWALKTHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
1194 void CAKEWALKTHEME::draw_mwindow_bg(MWindowGUI *gui)
1196 gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
1197 gui->menu_w(), get_image("mbutton_bg"));
1198 int pdw = get_image("panel_divider")->get_w();
1200 x += 9 * get_image("play")->get_w();
1201 x += mtransport_margin;
1203 gui->draw_vframe(get_image("panel_divider"),
1204 x - toggle_margin / 2 - pdw / 2 + xs2,
1206 x += 2 * get_image("arrow")->get_w() + toggle_margin;
1207 gui->draw_vframe(get_image("panel_divider"),
1208 x - toggle_margin / 2 - pdw / 2 + xs2,
1210 x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;
1211 gui->draw_vframe(get_image("panel_divider"),
1212 x - toggle_margin / 2 - pdw / 2 + xs2,
1214 gui->draw_3segmenth(0,
1215 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1216 get_image("patchbay_bg")->get_w(),
1217 get_image("clock_bg"));
1218 gui->draw_3segmentv(patchbay_x,
1221 get_image("patchbay_bg"));
1222 gui->set_color(BLACK);
1223 gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1224 mcanvas_y + mtimebar_h,
1225 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1226 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1227 gui->draw_3segmenth(mtimebar_x,
1230 get_image("timebar_bg"));
1231 gui->set_color(CwDarkGray);
1232 gui->draw_box(mzoom_x, mzoom_y,
1233 mwindow->session->mwindow_w, yS(25));
1234 gui->draw_3segmenth(mzoom_x,
1237 get_image("statusbar"));
1239 void CAKEWALKTHEME::draw_cwindow_bg(CWindowGUI *gui)
1241 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1242 gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1243 if(mwindow->edl->session->cwindow_meter)
1245 gui->draw_3segmenth(cstatus_x,
1247 cmeter_x - widget_border - cstatus_x,
1248 get_image("cbuttons_right"));
1249 gui->draw_9segment(cmeter_x - widget_border,
1251 mwindow->session->cwindow_w - cmeter_x + widget_border,
1252 mwindow->session->cwindow_h,
1253 get_image("cmeter_bg"));
1255 gui->draw_3segmenth(cstatus_x,
1257 cmeter_x - widget_border - cstatus_x + xS(100),
1258 get_image("cbuttons_right"));
1261 void CAKEWALKTHEME::draw_vwindow_bg(VWindowGUI *gui)
1263 gui->draw_3segmenth(0,
1266 get_image("vbuttons_left"));
1267 if(mwindow->edl->session->vwindow_meter)
1269 gui->draw_3segmenth(vdivision_x,
1271 vmeter_x - widget_border - vdivision_x,
1272 get_image("vbuttons_right"));
1273 gui->draw_9segment(vmeter_x - widget_border,
1275 mwindow->session->vwindow_w - vmeter_x + widget_border,
1276 mwindow->session->vwindow_h,
1277 get_image("cmeter_bg"));
1279 gui->draw_3segmenth(vdivision_x,
1281 vmeter_x - widget_border - vdivision_x + xS(100),
1282 get_image("vbuttons_right"));
1284 gui->draw_3segmenth(vtime_x - xS(5), vtime_y + 0,
1285 vtime_w + xS(10), get_image("vclock"));
1287 void CAKEWALKTHEME::draw_preferences_bg(PreferencesWindow *gui)
1289 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1291 void CAKEWALKTHEME::draw_new_bg(NewWindow *gui)
1293 gui->draw_vframe(get_image("new_bg"), 0, 0);
1295 void CAKEWALKTHEME::draw_setformat_bg(SetFormatWindow *gui)
1297 gui->draw_vframe(get_image("setformat_bg"), 0, 0);