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 = 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 = 15;
112 resources->popupmenu_triangle_margin = 15;
113 resources->listbox_title_color = TextFgBright;
114 resources->listbox_title_margin = 15;
115 resources->listbox_title_hotspot = 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 = 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 = 25;
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 "loadmode_nested.png",
206 "loadmode_checked.png",
208 "loadmode_checkedhi.png",
210 resources->filebox_icons_images = new_button(
212 "fileboxbutton_up.png",
213 "fileboxbutton_hi.png",
214 "fileboxbutton_dn.png",
216 resources->filebox_text_images = new_button(
218 "fileboxbutton_up.png",
219 "fileboxbutton_hi.png",
220 "fileboxbutton_dn.png",
222 resources->filebox_newfolder_images = new_button(
224 "fileboxbutton_up.png",
225 "fileboxbutton_hi.png",
226 "fileboxbutton_dn.png",
227 "filebox_newfolder");
228 resources->filebox_rename_images = new_button(
230 "fileboxbutton_up.png",
231 "fileboxbutton_hi.png",
232 "fileboxbutton_dn.png",
234 resources->filebox_updir_images = new_button(
236 "fileboxbutton_up.png",
237 "fileboxbutton_hi.png",
238 "fileboxbutton_dn.png",
240 resources->filebox_delete_images = new_button(
242 "fileboxbutton_up.png",
243 "fileboxbutton_hi.png",
244 "fileboxbutton_dn.png",
246 resources->filebox_reload_images = new_button(
248 "fileboxbutton_up.png",
249 "fileboxbutton_hi.png",
250 "fileboxbutton_dn.png",
252 resources->filebox_descend_images = new_button(
254 "filebox_bigbutton_up.png",
255 "filebox_bigbutton_hi.png",
256 "filebox_bigbutton_dn.png",
258 resources->usethis_button_images = resources->ok_images = new_button(
260 "filebox_bigbutton_up.png",
261 "filebox_bigbutton_hi.png",
262 "filebox_bigbutton_dn.png",
266 "new_bigbutton_up.png",
267 "new_bigbutton_hi.png",
268 "new_bigbutton_dn.png",
288 resources->cancel_images = new_button(
290 "filebox_bigbutton_up.png",
291 "filebox_bigbutton_hi.png",
292 "filebox_bigbutton_dn.png",
296 "new_bigbutton_up.png",
297 "new_bigbutton_hi.png",
298 "new_bigbutton_dn.png",
299 "new_cancel_images");
300 new_button("mask_pnt_linear.png",
301 "mask_button_up.png",
302 "mask_button_hi.png",
303 "mask_button_dn.png",
304 "mask_pnt_linear_images");
305 new_button("mask_crv_linear.png",
306 "mask_button_up.png",
307 "mask_button_hi.png",
308 "mask_button_dn.png",
309 "mask_crv_linear_images");
310 new_button("mask_all_linear.png",
311 "mask_button_up.png",
312 "mask_button_hi.png",
313 "mask_button_dn.png",
314 "mask_all_linear_images");
315 new_button("mask_pnt_smooth.png",
316 "mask_button_up.png",
317 "mask_button_hi.png",
318 "mask_button_dn.png",
319 "mask_pnt_smooth_images");
320 new_button("mask_crv_smooth.png",
321 "mask_button_up.png",
322 "mask_button_hi.png",
323 "mask_button_dn.png",
324 "mask_crv_smooth_images");
325 new_button("mask_all_smooth.png",
326 "mask_button_up.png",
327 "mask_button_hi.png",
328 "mask_button_dn.png",
329 "mask_all_smooth_images");
330 new_button("mask_prst_sqr.png",
331 "mask_button_up.png",
332 "mask_button_hi.png",
333 "mask_button_dn.png",
334 "mask_prst_sqr_images");
335 new_button("mask_prst_crc.png",
336 "mask_button_up.png",
337 "mask_button_hi.png",
338 "mask_button_dn.png",
339 "mask_prst_crc_images");
340 new_button("mask_prst_tri.png",
341 "mask_button_up.png",
342 "mask_button_hi.png",
343 "mask_button_dn.png",
344 "mask_prst_tri_images");
345 new_button("mask_prst_ovl.png",
346 "mask_button_up.png",
347 "mask_button_hi.png",
348 "mask_button_dn.png",
349 "mask_prst_ovl_images");
350 new_button("mask_prst_load.png",
351 "mask_button_up.png",
352 "mask_button_hi.png",
353 "mask_button_dn.png",
354 "mask_prst_load_images");
355 new_button("mask_prst_save.png",
356 "mask_button_up.png",
357 "mask_button_hi.png",
358 "mask_button_dn.png",
359 "mask_prst_save_images");
360 new_button("mask_prst_trsh.png",
361 "mask_button_up.png",
362 "mask_button_hi.png",
363 "mask_button_dn.png",
364 "mask_prst_trsh_images");
365 new_button("mask_pstn_cen.png",
366 "mask_button_up.png",
367 "mask_button_hi.png",
368 "mask_button_dn.png",
369 "mask_pstn_cen_images");
370 new_button("mask_pstn_nrm.png",
371 "mask_button_up.png",
372 "mask_button_hi.png",
373 "mask_button_dn.png",
374 "mask_pstn_nrm_images");
375 resources->bar_data = new_image("bar", "bar.png");
376 resources->check = new_image("check", "check.png");
377 resources->min_menu_w = 96;
378 resources->menu_popup_bg = new_image("menu_popup_bg.png");
379 resources->menu_item_bg = new_image_set(
384 resources->menu_bar_bg = new_image("menubar_bg.png");
385 resources->menu_title_bg = new_image_set
390 resources->popupmenu_images = 0;
391 resources->toggle_highlight_bg = new_image(
392 "toggle_highlight_bg",
393 "text_highlight.png");
394 resources->generic_button_images = new_image_set(
399 resources->horizontal_slider_data = new_image_set(
406 "hslider_bg_dn.png");
407 resources->vertical_slider_data = new_image_set(
414 "hslider_bg_dn.png");
415 for( int i=0; i<6; ++i )
416 resources->vertical_slider_data[i]->rotate90();
417 resources->progress_images = new_image_set(
421 resources->tumble_data = new_image_set(
427 resources->listbox_button = new_button4(
428 "listbox_button.png",
434 resources->filebox_szfmt_images = new_image_set(
436 "file_size_zero_up.png",
437 "file_size_zero_hi.png",
438 "file_size_zero_dn.png",
439 "file_size_lwrb_up.png",
440 "file_size_lwrb_hi.png",
441 "file_size_lwrb_dn.png",
442 "file_size_capb_up.png",
443 "file_size_capb_hi.png",
444 "file_size_capb_dn.png",
445 "file_size_semi_up.png",
446 "file_size_semi_hi.png",
447 "file_size_semi_dn.png");
448 resources->listbox_column = new_image_set(
453 resources->listbox_up = new_image("listbox_up.png");
454 resources->listbox_dn = new_image("listbox_dn.png");
455 resources->pan_data = new_image_set(
462 "pan_channel_small.png",
463 "pan_stick_small.png");
464 resources->pan_text_color = TextFgBright;
465 resources->pot_images = new_image_set(
470 resources->checkbox_images = new_image_set(
474 "checkbox_checked.png",
476 "checkbox_checkedhi.png");
477 resources->radial_images = new_image_set(
481 "radial_checked.png",
483 "radial_checkedhi.png");
484 resources->xmeter_images = new_image_set(
493 resources->ymeter_images = new_image_set(
502 resources->hscroll_data = new_image_set(
504 "hscroll_handle_up.png",
505 "hscroll_handle_hi.png",
506 "hscroll_handle_dn.png",
507 "hscroll_handle_bg.png",
508 "hscroll_left_up.png",
509 "hscroll_left_hi.png",
510 "hscroll_left_dn.png",
511 "hscroll_right_up.png",
512 "hscroll_right_hi.png",
513 "hscroll_right_dn.png");
514 resources->vscroll_data = new_image_set(
516 "vscroll_handle_up.png",
517 "vscroll_handle_hi.png",
518 "vscroll_handle_dn.png",
519 "vscroll_handle_bg.png",
520 "vscroll_left_up.png",
521 "vscroll_left_hi.png",
522 "vscroll_left_dn.png",
523 "vscroll_right_up.png",
524 "vscroll_right_hi.png",
525 "vscroll_right_dn.png");
526 resources->scroll_minhandle = 20;
528 "prevtip.png", "tipbutton_up.png",
529 "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
531 "nexttip.png", "tipbutton_up.png",
532 "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
534 "closetip.png", "tipbutton_up.png",
535 "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
537 "swap_extents.png", "editpanel_up.png",
538 "editpanel_hi.png", "editpanel_dn.png", "swap_extents");
539 preferences_category_overlap = 0;
540 preferencescategory_x = 0;
541 preferencescategory_y = 5;
542 preferencestitle_x = 5;
543 preferencestitle_y = 10;
544 preferencesoptions_x = 5;
545 preferencesoptions_y = 0;
546 message_normal = resources->text_default;
547 mtransport_margin = 10;
549 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png",
551 new_image_set("xpane", 3,
555 new_image_set("ypane", 3,
559 new_image("mbutton_bg", "mbutton_bg.png");
560 new_image("timebar_bg", "timebar_bg_flat.png");
561 new_image("timebar_brender", "timebar_brender.png");
562 new_image("clock_bg", "mclock_flat.png");
563 new_image("patchbay_bg", "patchbay_bg.png");
564 new_image("statusbar", "statusbar.png");
565 new_image_set("zoombar_menu", 3,
569 new_image_set("zoombar_tumbler", 4,
572 "zoomtumble_bottom.png",
573 "zoomtumble_top.png");
574 new_image_set("mode_popup", 3,
575 "mode_up.png", "mode_hi.png", "mode_dn.png");
576 new_image("mode_add", "mode_add.png");
577 new_image("mode_divide", "mode_divide.png");
578 new_image("mode_multiply", "mode_multiply.png");
579 new_image("mode_normal", "mode_normal.png");
580 new_image("mode_replace", "mode_replace.png");
581 new_image("mode_subtract", "mode_subtract.png");
582 new_image("mode_max", "mode_max.png");
583 new_image_set("plugin_on", 5,
586 "plugin_onselect.png",
588 "plugin_onselecthi.png");
589 new_image_set("plugin_show", 5,
592 "plugin_showselect.png",
594 "plugin_showselecthi.png");
595 new_image_set("mixpatch_data", 5,
598 "mixpatch_checked.png",
600 "mixpatch_checkedhi.png");
601 new_image("cpanel_bg", "cpanel_bg.png");
602 new_image("cbuttons_left", "cbuttons_left.png");
603 new_image("cbuttons_right", "cbuttons_right.png");
604 new_image("cmeter_bg", "cmeter_bg.png");
605 new_image("cwindow_focus", "cwindow_focus.png");
606 new_image("vbuttons_left", "vbuttons_left.png");
607 new_image("vbuttons_right", "vbuttons_right.png");
608 new_image("vclock", "vclock.png");
609 new_image("preferences_bg", "preferences_bg.png");
610 new_image("new_bg", "new_bg.png");
611 new_image("setformat_bg", "setformat_bg.png");
612 timebar_view_data = new_image("timebar_view.png");
613 setformat_w = get_image("setformat_bg")->get_w();
614 setformat_h = get_image("setformat_bg")->get_h();
622 setformat_margin = 30;
623 setformat_channels_x = 25;
624 setformat_channels_y = 242;
625 setformat_channels_w = 250;
626 setformat_channels_h = 250;
627 loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10;
629 new_toggle("playpatch.png",
632 "playpatch_checked.png",
634 "playpatch_checkedhi.png",
636 new_toggle("recordpatch.png",
637 "recordpatch_up.png",
638 "recordpatch_hi.png",
639 "recordpatch_checked.png",
640 "recordpatch_dn.png",
641 "recordpatch_checkedhi.png",
643 new_toggle("gangpatch.png",
648 "patch_checkedhi.png",
650 new_toggle("drawpatch.png",
655 "patch_checkedhi.png",
657 new_image_set("mutepatch_data",
661 "mutepatch_checked.png",
663 "mutepatch_checkedhi.png");
664 new_image_set("expandpatch_data",
666 "expandpatch_up.png",
667 "expandpatch_hi.png",
668 "expandpatch_checked.png",
669 "expandpatch_dn.png",
670 "expandpatch_checkedhi.png");
673 out_point = new_image_set(
679 "out_checkedhi.png");
680 in_point = new_image_set(
687 label_toggle = new_image_set(
689 "labeltoggle_up.png",
690 "labeltoggle_uphi.png",
692 "labeltoggle_dn.png",
693 "label_checkedhi.png");
694 ffmpeg_toggle = new_image_set(
701 proxy_p_toggle = new_image_set(
707 "proxy_p_chkdhi.png");
708 proxy_s_toggle = new_image_set(
714 "proxy_s_chkdhi.png");
715 mask_mode_toggle = new_image_set(5,
718 "mask_mode_chkd.png",
719 "mask_mode_down.png",
720 "mask_mode_chkdhi.png");
721 shbtn_data = new_image_set(
735 "histogram_carrot_up.png",
736 "histogram_carrot_hi.png",
737 "histogram_carrot_checked.png",
738 "histogram_carrot_dn.png",
739 "histogram_carrot_checkedhi.png");
740 statusbar_cancel_data = new_image_set(
742 "statusbar_cancel_up.png",
743 "statusbar_cancel_hi.png",
744 "statusbar_cancel_dn.png");
745 VFrame *editpanel_up = new_image("editpanel_up.png");
746 VFrame *editpanel_hi = new_image("editpanel_hi.png");
747 VFrame *editpanel_dn = new_image("editpanel_dn.png");
748 VFrame *editpanel_checked = new_image("editpanel_checked.png");
749 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
750 new_image("panel_divider", "panel_divider.png");
751 new_button("bottom_justify.png",
752 editpanel_up, editpanel_hi, editpanel_dn,
754 new_button("center_justify.png",
755 editpanel_up, editpanel_hi, editpanel_dn,
757 new_button("channel.png",
758 editpanel_up, editpanel_hi, editpanel_dn,
760 new_button("lok.png",
761 editpanel_up, editpanel_hi, editpanel_dn,
763 new_toggle("histogram_toggle.png",
770 new_toggle("histogram_rgb.png",
776 "histogram_rgb_toggle");
777 new_toggle("waveform.png",
784 new_toggle("waveform_rgb.png",
790 "waveform_rgb_toggle");
791 new_toggle("scope.png",
798 new_button("picture.png",
799 editpanel_up, editpanel_hi, editpanel_dn,
801 new_button("histogram_img.png",
802 editpanel_up, editpanel_hi, editpanel_dn,
804 new_button("copy.png",
805 editpanel_up, editpanel_hi, editpanel_dn,
807 new_button("commercial.png",
808 editpanel_up, editpanel_hi, editpanel_dn,
810 new_button("cut.png",
811 editpanel_up, editpanel_hi, editpanel_dn,
813 new_button("fit.png",
814 editpanel_up, editpanel_hi, editpanel_dn,
816 new_button("fitautos.png",
817 editpanel_up, editpanel_hi, editpanel_dn,
819 new_button("inpoint.png",
820 editpanel_up, editpanel_hi, editpanel_dn,
822 new_button("label.png",
823 editpanel_up, editpanel_hi, editpanel_dn,
825 new_button("left_justify.png",
826 editpanel_up, editpanel_hi, editpanel_dn,
828 new_button("magnify.png",
829 editpanel_up, editpanel_hi, editpanel_dn,
831 new_button("middle_justify.png",
832 editpanel_up, editpanel_hi, editpanel_dn,
834 new_button("nextlabel.png",
835 editpanel_up, editpanel_hi, editpanel_dn,
837 new_button("prevlabel.png",
838 editpanel_up, editpanel_hi, editpanel_dn,
840 new_button("nextedit.png",
841 editpanel_up, editpanel_hi, editpanel_dn,
843 new_button("prevedit.png",
844 editpanel_up, editpanel_hi, editpanel_dn,
846 new_button("outpoint.png",
847 editpanel_up, editpanel_hi, editpanel_dn,
849 over_button = new_button("over.png",
850 editpanel_up, editpanel_hi, editpanel_dn,
852 overwrite_data = new_button("overwrite.png",
853 editpanel_up, editpanel_hi, editpanel_dn,
855 new_button("paste.png",
856 editpanel_up, editpanel_hi, editpanel_dn,
858 new_button("redo.png",
859 editpanel_up, editpanel_hi, editpanel_dn,
861 new_button("right_justify.png",
862 editpanel_up, editpanel_hi, editpanel_dn,
864 splice_data = new_button("splice.png",
865 editpanel_up, editpanel_hi, editpanel_dn,
867 new_button("toclip.png",
868 editpanel_up, editpanel_hi, editpanel_dn,
870 new_button("goto.png",
871 editpanel_up, editpanel_hi, editpanel_dn,
873 new_button("top_justify.png",
874 editpanel_up, editpanel_hi, editpanel_dn,
876 new_button("undo.png",
877 editpanel_up, editpanel_hi, editpanel_dn,
879 new_button("wrench.png",
880 editpanel_up, editpanel_hi, editpanel_dn,
882 VFrame *transport_up = new_image("transportup.png");
883 VFrame *transport_hi = new_image("transporthi.png");
884 VFrame *transport_dn = new_image("transportdn.png");
885 new_button("end.png",
886 transport_up, transport_hi, transport_dn,
888 new_button("fastfwd.png",
889 transport_up, transport_hi, transport_dn,
891 new_button("fastrev.png",
892 transport_up, transport_hi, transport_dn,
894 new_button("play.png",
895 transport_up, transport_hi, transport_dn,
897 new_button("framefwd.png",
898 transport_up, transport_hi, transport_dn,
900 new_button("framerev.png",
901 transport_up, transport_hi, transport_dn,
903 new_button("pause.png",
904 transport_up, transport_hi, transport_dn,
906 new_button("record.png",
907 transport_up, transport_hi, transport_dn,
909 new_button("singleframe.png",
910 transport_up, transport_hi, transport_dn,
912 new_button("reverse.png",
913 transport_up, transport_hi, transport_dn,
915 new_button("rewind.png",
916 transport_up, transport_hi, transport_dn,
918 new_button("stop.png",
919 transport_up, transport_hi, transport_dn,
921 new_button("stop.png",
922 transport_up, transport_hi, transport_dn,
924 new_image("cwindow_inactive", "cwindow_inactive.png");
925 new_image("cwindow_active", "cwindow_active.png");
926 new_image_set("category_button",
928 "preferencesbutton_dn.png",
929 "preferencesbutton_dnhi.png",
930 "preferencesbutton_dnlo.png");
931 new_image_set("category_button_checked",
933 "preferencesbutton_up.png",
934 "preferencesbutton_uphi.png",
935 "preferencesbutton_dnlo.png");
936 new_image_set("color3way_point",
941 new_toggle("arrow.png",
942 editpanel_up, editpanel_hi, editpanel_checked,
943 editpanel_dn, editpanel_checkedhi,
945 new_toggle("autokeyframe.png",
946 transport_up, editpanel_hi, editpanel_checked,
947 editpanel_dn, editpanel_checkedhi,
949 new_toggle("spankeyframe.png",
950 transport_up, editpanel_hi, editpanel_checked,
951 editpanel_dn, editpanel_checkedhi,
953 new_toggle("ibeam.png",
954 editpanel_up, editpanel_hi, editpanel_checked,
955 editpanel_dn, editpanel_checkedhi,
957 new_toggle("show_meters.png",
958 editpanel_up, editpanel_hi, editpanel_checked,
959 editpanel_dn, editpanel_checkedhi,
961 new_toggle("blank30x30.png",
962 new_image("locklabels_locked.png"),
963 new_image("locklabels_lockedhi.png"),
964 new_image("locklabels_unlocked.png"),
965 new_image("locklabels_dn.png"),
966 new_image("locklabels_unlockedhi.png"),
968 VFrame *cpanel_up = new_image("cpanel_up.png");
969 VFrame *cpanel_hi = new_image("cpanel_hi.png");
970 VFrame *cpanel_dn = new_image("cpanel_dn.png");
971 VFrame *cpanel_checked = new_image("cpanel_checked.png");
972 VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
973 new_toggle("camera.png",
974 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
976 new_toggle("crop.png",
977 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
979 new_toggle("eyedrop.png",
980 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
982 new_toggle("magnify.png",
983 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
985 new_toggle("mask.png",
986 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
988 new_toggle("ruler.png",
989 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
991 new_toggle("projector.png",
992 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
994 new_toggle("protect.png",
995 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
997 new_toggle("titlesafe.png",
998 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1000 new_toggle("toolwindow.png",
1001 cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1003 new_toggle("tan_smooth.png",
1004 editpanel_up, editpanel_hi, editpanel_checked,
1005 editpanel_dn, editpanel_checkedhi,
1007 new_toggle("tan_linear.png",
1008 editpanel_up, editpanel_hi, editpanel_checked,
1009 editpanel_dn, editpanel_checkedhi,
1011 new_toggle("mask_scale_x.png", "mask_scale_up.png", "mask_scale_uphi.png",
1012 "mask_scale_chkd.png", "mask_scale_xdown.png", "mask_scale_chkdhi.png",
1014 new_toggle("mask_scale_y.png", "mask_scale_up.png", "mask_scale_uphi.png",
1015 "mask_scale_chkd.png", "mask_scale_ydown.png", "mask_scale_chkdhi.png",
1017 new_toggle("mask_scale_xy.png", "mask_scale_up.png", "mask_scale_uphi.png",
1018 "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
1022 void CAKEWALKTHEME::get_vwindow_sizes(VWindowGUI *gui)
1024 int edit_w = EditPanel::calculate_w(mwindow, 0, 10);
1025 int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin;
1027 int division_w = 30;
1029 int vtime_border = 15;
1030 vmeter_y = widget_border;
1031 vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border;
1033 if (mwindow->edl->session->vwindow_meter) {
1034 vmeter_x = mwindow->session->vwindow_w -
1035 MeterPanel::get_meters_width(this,
1036 mwindow->edl->session->audio_channels,
1037 mwindow->edl->session->vwindow_meter);
1039 vmeter_x = mwindow->session->vwindow_w + widget_border;
1043 vcanvas_w = vmeter_x - vcanvas_x - widget_border;
1046 transport_w + widget_border +
1047 vtime_w + division_w +
1048 vtime_border > vmeter_x) {
1049 buttons_h = get_image("vbuttons_left")->get_h();
1050 vedit_x = widget_border;
1051 vedit_y = mwindow->session->vwindow_h -
1055 vtransport_x = widget_border;
1056 vtransport_y = mwindow->session->vwindow_h -
1057 get_image_set("autokeyframe")[0]->get_h() -
1060 vtime_x = vedit_x + 65;
1061 vtime_y = vedit_y + 28;
1063 buttons_h = vtimebar_h +
1065 EditPanel::calculate_h(mwindow) +
1067 vtransport_x = widget_border;
1068 vtransport_y = mwindow->session->vwindow_h -
1072 vedit_x = vtransport_x + transport_w + widget_border;
1073 vedit_y = vtransport_y;
1074 vdivision_x = vedit_x + edit_w + division_w;
1075 vtime_x = vdivision_x + vtime_border;
1076 vtime_y = vedit_y + widget_border;
1078 vcanvas_h = mwindow->session->vwindow_h - buttons_h;
1080 vtimebar_y = vcanvas_y + vcanvas_h;
1081 vtimebar_w = vmeter_x - widget_border;
1083 void CAKEWALKTHEME::build_bg_data()
1085 channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1086 new_image("resource1024", "resource1024.png");
1087 new_image("resource512", "resource512.png");
1088 new_image("resource256", "resource256.png");
1089 new_image("resource128", "resource128.png");
1090 new_image("resource64", "resource64.png");
1091 new_image("resource32", "resource32.png");
1092 new_image("plugin_bg_data", "plugin_bg.png");
1093 new_image("title_bg_data", "title_bg.png");
1094 new_image("vtimebar_bg_data", "vwindow_timebar.png");
1096 void CAKEWALKTHEME::build_overlays()
1098 keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1099 camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1100 maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1101 modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1102 hardedge_data = new VFramePng(get_image_data("hardedge.png"));
1103 pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1104 projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1106 void CAKEWALKTHEME::draw_rwindow_bg(RecordGUI *gui)
1109 void CAKEWALKTHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
1112 void CAKEWALKTHEME::draw_mwindow_bg(MWindowGUI *gui)
1114 gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
1115 gui->menu_w(), get_image("mbutton_bg"));
1116 int pdw = get_image("panel_divider")->get_w();
1118 x += 9 * get_image("play")->get_w();
1119 x += mtransport_margin;
1120 gui->draw_vframe(get_image("panel_divider"),
1121 x - toggle_margin / 2 - pdw / 2 + 2,
1123 x += 2 * get_image("arrow")->get_w() + toggle_margin;
1124 gui->draw_vframe(get_image("panel_divider"),
1125 x - toggle_margin / 2 - pdw / 2 + 2,
1127 x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;
1128 gui->draw_vframe(get_image("panel_divider"),
1129 x - toggle_margin / 2 - pdw / 2 + 2,
1131 gui->draw_3segmenth(0,
1132 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1133 get_image("patchbay_bg")->get_w(),
1134 get_image("clock_bg"));
1135 gui->draw_3segmentv(patchbay_x,
1138 get_image("patchbay_bg"));
1139 gui->set_color(BLACK);
1140 gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1141 mcanvas_y + mtimebar_h,
1142 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1143 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1144 gui->draw_3segmenth(mtimebar_x,
1147 get_image("timebar_bg"));
1148 gui->set_color(CwDarkGray);
1149 gui->draw_box(mzoom_x,
1151 mwindow->session->mwindow_w,
1153 gui->draw_3segmenth(mzoom_x,
1156 get_image("statusbar"));
1158 void CAKEWALKTHEME::draw_cwindow_bg(CWindowGUI *gui)
1160 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1161 gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1162 if(mwindow->edl->session->cwindow_meter)
1164 gui->draw_3segmenth(cstatus_x,
1166 cmeter_x - widget_border - cstatus_x,
1167 get_image("cbuttons_right"));
1168 gui->draw_9segment(cmeter_x - widget_border,
1170 mwindow->session->cwindow_w - cmeter_x + widget_border,
1171 mwindow->session->cwindow_h,
1172 get_image("cmeter_bg"));
1174 gui->draw_3segmenth(cstatus_x,
1176 cmeter_x - widget_border - cstatus_x + 100,
1177 get_image("cbuttons_right"));
1180 void CAKEWALKTHEME::draw_vwindow_bg(VWindowGUI *gui)
1182 gui->draw_3segmenth(0,
1185 get_image("vbuttons_left"));
1186 if(mwindow->edl->session->vwindow_meter)
1188 gui->draw_3segmenth(vdivision_x,
1190 vmeter_x - widget_border - vdivision_x,
1191 get_image("vbuttons_right"));
1192 gui->draw_9segment(vmeter_x - widget_border,
1194 mwindow->session->vwindow_w - vmeter_x + widget_border,
1195 mwindow->session->vwindow_h,
1196 get_image("cmeter_bg"));
1198 gui->draw_3segmenth(vdivision_x,
1200 vmeter_x - widget_border - vdivision_x + 100,
1201 get_image("vbuttons_right"));
1203 gui->draw_3segmenth(
1207 get_image("vclock"));
1209 void CAKEWALKTHEME::draw_preferences_bg(PreferencesWindow *gui)
1211 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1213 void CAKEWALKTHEME::draw_new_bg(NewWindow *gui)
1215 gui->draw_vframe(get_image("new_bg"), 0, 0);
1217 void CAKEWALKTHEME::draw_setformat_bg(SetFormatWindow *gui)
1219 gui->draw_vframe(get_image("setformat_bg"), 0, 0);