9a42c48e6221db729f577d1be3babb9872bfcb94
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / theme_cakewalk / cakewalk.C
1 /* cakewalk.C (uncommented). Part of the Cakewalk theme. */
2 #include "bcsignals.h"
3 #include "clip.h"
4 #include "cwindowgui.h"
5 #include "cakewalk.h"
6 #include "edl.h"
7 #include "edlsession.h"
8 #include "mainmenu.h"
9 #include "mainsession.h"
10 #include "mbuttons.h"
11 #include "meterpanel.h"
12 #include "mwindow.h"
13 #include "mwindowgui.h"
14 #include "new.h"
15 #include "patchbay.h"
16 #include "preferencesthread.h"
17 #include "recordgui.h"
18 #include "recordmonitor.h"
19 #include "setformat.h"
20 #include "statusbar.h"
21 #include "timebar.h"
22 #include "trackcanvas.h"
23 #include "vframe.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)
39 {
40  return new CAKEWALKTHEMEMain(server);
41 }
42 CAKEWALKTHEMEMain::CAKEWALKTHEMEMain(PluginServer *server)
43  : PluginTClient(server)
44 {
45 }
46 CAKEWALKTHEMEMain::~CAKEWALKTHEMEMain()
47 {
48 }
49 const char* CAKEWALKTHEMEMain::plugin_title() { return N_("Cakewalk"); }
50 Theme* CAKEWALKTHEMEMain::new_theme()
51 {
52  theme = new CAKEWALKTHEME;
53  extern unsigned char _binary_theme_cakewalk_data_start[];
54  theme->set_data(_binary_theme_cakewalk_data_start);
55  return theme;
56 }
57 CAKEWALKTHEME::CAKEWALKTHEME()
58  : Theme()
59 {
60 }
61 CAKEWALKTHEME::~CAKEWALKTHEME()
62 {
63  delete camerakeyframe_data;
64  delete channel_position_data;
65  delete keyframe_data;
66  delete maskkeyframe_data;
67  delete modekeyframe_data;
68  delete hardedge_data;
69  delete pankeyframe_data;
70  delete projectorkeyframe_data;
71 }
72 void CAKEWALKTHEME::initialize()
73 {
74  BC_Resources *resources = BC_WindowBase::get_resources();
75  delete about_bg;
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;
131  title_color = BLACK;
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;
141  audio_color = BLACK;
142  resources->audiovideo_color = TextFg;
143  resources->blink_rate = 750;
144  clock_fg_color = MeterGreen;
145  inout_highlight_color=CwCyan;
146  new_toggle(
147   "loadmode_new.png",
148   "loadmode_up.png",
149   "loadmode_hi.png",
150   "loadmode_checked.png",
151   "loadmode_dn.png",
152   "loadmode_checkedhi.png",
153   "loadmode_new");
154  new_toggle(
155   "loadmode_none.png",
156   "loadmode_up.png",
157   "loadmode_hi.png",
158   "loadmode_checked.png",
159   "loadmode_dn.png",
160   "loadmode_checkedhi.png",
161   "loadmode_none");
162  new_toggle(
163   "loadmode_newcat.png",
164   "loadmode_up.png",
165   "loadmode_hi.png",
166   "loadmode_checked.png",
167   "loadmode_dn.png",
168   "loadmode_checkedhi.png",
169   "loadmode_newcat");
170  new_toggle(
171   "loadmode_cat.png",
172   "loadmode_up.png",
173   "loadmode_hi.png",
174   "loadmode_checked.png",
175   "loadmode_dn.png",
176   "loadmode_checkedhi.png",
177   "loadmode_cat");
178  new_toggle(
179   "loadmode_newtracks.png",
180   "loadmode_up.png",
181   "loadmode_hi.png",
182   "loadmode_checked.png",
183   "loadmode_dn.png",
184   "loadmode_checkedhi.png",
185   "loadmode_newtracks");
186  new_toggle(
187   "loadmode_paste.png",
188   "loadmode_up.png",
189   "loadmode_hi.png",
190   "loadmode_checked.png",
191   "loadmode_dn.png",
192   "loadmode_checkedhi.png",
193   "loadmode_paste");
194  new_toggle(
195   "loadmode_resource.png",
196   "loadmode_up.png",
197   "loadmode_hi.png",
198   "loadmode_checked.png",
199   "loadmode_dn.png",
200   "loadmode_checkedhi.png",
201   "loadmode_resource");
202
203  new_toggle("loadmode_edl_clip.png",
204   "loadmode_up.png",
205   "loadmode_hi.png",
206   "loadmode_checked.png",
207   "loadmode_dn.png",
208   "loadmode_checkedhi.png",
209   "loadmode_edl_clip");
210  new_toggle("loadmode_edl_nested.png",
211   "loadmode_up.png",
212   "loadmode_hi.png",
213   "loadmode_checked.png",
214   "loadmode_dn.png",
215   "loadmode_checkedhi.png",
216   "loadmode_edl_nested");
217  new_toggle("loadmode_edl_fileref.png",
218   "loadmode_up.png",
219   "loadmode_hi.png",
220   "loadmode_checked.png",
221   "loadmode_dn.png",
222   "loadmode_checkedhi.png",
223   "loadmode_edl_fileref");
224
225  resources->filebox_icons_images = new_button(
226   "icons.png",
227   "fileboxbutton_up.png",
228   "fileboxbutton_hi.png",
229   "fileboxbutton_dn.png",
230   "filebox_icons");
231  resources->filebox_text_images = new_button(
232   "text.png",
233   "fileboxbutton_up.png",
234   "fileboxbutton_hi.png",
235   "fileboxbutton_dn.png",
236   "filebox_text");
237  resources->filebox_newfolder_images = new_button(
238   "folder.png",
239   "fileboxbutton_up.png",
240   "fileboxbutton_hi.png",
241   "fileboxbutton_dn.png",
242   "filebox_newfolder");
243  resources->filebox_rename_images = new_button(
244   "rename.png",
245   "fileboxbutton_up.png",
246   "fileboxbutton_hi.png",
247   "fileboxbutton_dn.png",
248   "filebox_rename");
249  resources->filebox_updir_images = new_button(
250   "updir.png",
251   "fileboxbutton_up.png",
252   "fileboxbutton_hi.png",
253   "fileboxbutton_dn.png",
254   "filebox_updir");
255  resources->filebox_delete_images = new_button(
256   "delete.png",
257   "fileboxbutton_up.png",
258   "fileboxbutton_hi.png",
259   "fileboxbutton_dn.png",
260   "filebox_delete");
261  resources->filebox_reload_images = new_button(
262   "reload.png",
263   "fileboxbutton_up.png",
264   "fileboxbutton_hi.png",
265   "fileboxbutton_dn.png",
266   "filebox_reload");
267  resources->filebox_descend_images = new_button(
268   "openfolder.png",
269   "filebox_bigbutton_up.png",
270   "filebox_bigbutton_hi.png",
271   "filebox_bigbutton_dn.png",
272   "filebox_descend");
273  resources->usethis_button_images = resources->ok_images = new_button(
274   "ok.png",
275   "filebox_bigbutton_up.png",
276   "filebox_bigbutton_hi.png",
277   "filebox_bigbutton_dn.png",
278   "ok_button");
279  new_button(
280   "ok.png",
281   "new_bigbutton_up.png",
282   "new_bigbutton_hi.png",
283   "new_bigbutton_dn.png",
284   "new_ok_images");
285  new_button(
286   "reset.png",
287   "reset_up.png",
288   "reset_hi.png",
289   "reset_dn.png",
290   "reset_button");
291  new_button(
292   "unclear.png",
293   "unclear_up.png",
294   "unclear_hi.png",
295   "unclear_dn.png",
296   "unclear_button");
297  new_button(
298   "keyframe.png",
299   "editpanel_up.png",
300   "editpanel_hi.png",
301   "editpanel_dn.png",
302   "keyframe_button");
303  resources->cancel_images = new_button(
304   "cancel.png",
305   "filebox_bigbutton_up.png",
306   "filebox_bigbutton_hi.png",
307   "filebox_bigbutton_dn.png",
308   "cancel_button");
309  new_button(
310   "cancel.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(
395   3,
396   "menuitem_up.png",
397   "menuitem_hi.png",
398   "menuitem_dn.png");
399  resources->menu_bar_bg = new_image("menubar_bg.png");
400  resources->menu_title_bg = new_image_set
401   (3,
402    "menubar_up.png",
403    "menubar_hi.png",
404    "menubar_dn.png");
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(
410   3,
411   "generic_up.png",
412   "generic_hi.png",
413   "generic_dn.png");
414  resources->horizontal_slider_data = new_image_set(
415   6,
416   "hslider_fg_up.png",
417   "hslider_fg_hi.png",
418   "hslider_fg_dn.png",
419   "hslider_bg_up.png",
420   "hslider_bg_hi.png",
421   "hslider_bg_dn.png");
422  resources->vertical_slider_data = new_image_set(
423   6,
424   "hslider_fg_up.png",
425   "hslider_fg_hi.png",
426   "hslider_fg_dn.png",
427   "hslider_bg_up.png",
428   "hslider_bg_hi.png",
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(
433   2,
434   "progress_bg.png",
435   "progress_hi.png");
436  resources->tumble_data = new_image_set(
437   4,
438   "tumble_up.png",
439   "tumble_hi.png",
440   "tumble_bottom.png",
441   "tumble_top.png");
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",
449   "editpanel_up.png",
450   "editpanel_hi.png",
451   "editpanel_dn.png",
452   "editpanel_hi.png",
453   "listbox_button");
454  resources->filebox_szfmt_images = new_image_set(
455   12,
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(
469   3,
470   "column_up.png",
471   "column_hi.png",
472   "column_dn.png");
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(
476   7,
477   "pan_up.png",
478   "pan_hi.png",
479   "pan_popup.png",
480   "pan_channel.png",
481   "pan_stick.png",
482   "pan_channel_small.png",
483   "pan_stick_small.png");
484  resources->pan_text_color = TextFgBright;
485  resources->pot_images = new_image_set(
486   3,
487   "pot_up.png",
488   "pot_hi.png",
489   "pot_dn.png");
490  resources->checkbox_images = new_image_set(
491   5,
492   "checkbox_up.png",
493   "checkbox_hi.png",
494   "checkbox_checked.png",
495   "checkbox_dn.png",
496   "checkbox_checkedhi.png");
497  resources->radial_images = new_image_set(
498   5,
499   "radial_up.png",
500   "radial_hi.png",
501   "radial_checked.png",
502   "radial_dn.png",
503   "radial_checkedhi.png");
504  resources->xmeter_images = new_image_set(
505   7,
506   "xmeter_normal.png",
507   "xmeter_green.png",
508   "xmeter_red.png",
509   "xmeter_yellow.png",
510   "xmeter_white.png",
511   "xmeter_over.png",
512   "downmix51_2.png");
513  resources->ymeter_images = new_image_set(
514   7,
515   "ymeter_normal.png",
516   "ymeter_green.png",
517   "ymeter_red.png",
518   "ymeter_yellow.png",
519   "ymeter_white.png",
520   "ymeter_over.png",
521   "downmix51_2.png");
522  resources->hscroll_data = new_image_set(
523   10,
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(
535   10,
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);
547  new_button(
548   "prevtip.png", "tipbutton_up.png",
549   "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
550  new_button(
551   "nexttip.png", "tipbutton_up.png",
552   "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
553  new_button(
554   "closetip.png", "tipbutton_up.png",
555   "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
556  new_button(
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",
570       "pane");
571  new_image_set("xpane", 3,
572       "xpane_up.png",
573       "xpane_hi.png",
574       "xpane_dn.png");
575  new_image_set("ypane", 3,
576       "ypane_up.png",
577       "ypane_hi.png",
578       "ypane_dn.png");
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,
586       "zoompopup_up.png",
587       "zoompopup_hi.png",
588       "zoompopup_dn.png");
589  new_image_set("zoombar_tumbler", 4,
590       "zoomtumble_up.png",
591       "zoomtumble_hi.png",
592       "zoomtumble_bottom.png",
593       "zoomtumble_top.png");
594 new_image_set("auto_range", 4,
595       "autorange_up.png",
596       "autorange_hi.png",
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,
609       "plugin_on.png",
610       "plugin_onhi.png",
611       "plugin_onselect.png",
612       "plugin_ondn.png",
613       "plugin_onselecthi.png");
614  new_image_set("plugin_show", 5,
615       "plugin_show.png",
616       "plugin_showhi.png",
617       "plugin_showselect.png",
618       "plugin_showdn.png",
619       "plugin_showselecthi.png");
620  new_image_set("mixpatch_data", 5,
621       "mixpatch_up.png",
622       "mixpatch_hi.png",
623       "mixpatch_checked.png",
624       "mixpatch_dn.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);
653  browse_pad = yS(20);
654  new_toggle("playpatch.png",
655       "playpatch_up.png",
656       "playpatch_hi.png",
657       "playpatch_checked.png",
658       "playpatch_dn.png",
659       "playpatch_checkedhi.png",
660       "playpatch_data");
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",
667       "recordpatch_data");
668  new_toggle("gangpatch.png",
669       "patch_up.png",
670       "patch_hi.png",
671       "patch_checked.png",
672       "patch_dn.png",
673       "patch_checkedhi.png",
674       "gangpatch_data");
675  new_toggle("drawpatch.png",
676       "patch_up.png",
677       "patch_hi.png",
678       "patch_checked.png",
679       "patch_dn.png",
680       "patch_checkedhi.png",
681       "drawpatch_data");
682  new_toggle("masterpatch.png",
683       "patch_up.png",
684       "patch_hi.png",
685       "patch_checked.png",
686       "patch_dn.png",
687       "patch_checkedhi.png",
688       "masterpatch_data");
689
690  new_image_set("mutepatch_data",
691       5,
692       "mutepatch_up.png",
693       "mutepatch_hi.png",
694       "mutepatch_checked.png",
695       "mutepatch_dn.png",
696       "mutepatch_checkedhi.png");
697  new_image_set("expandpatch_data",
698       5,
699       "expandpatch_up.png",
700       "expandpatch_hi.png",
701       "expandpatch_checked.png",
702       "expandpatch_dn.png",
703       "expandpatch_checkedhi.png");
704  build_bg_data();
705  build_overlays();
706  out_point = new_image_set(
707   5,
708   "out_up.png",
709   "out_hi.png",
710   "out_checked.png",
711   "out_dn.png",
712   "out_checkedhi.png");
713  in_point = new_image_set(
714   5,
715   "in_up.png",
716   "in_hi.png",
717   "in_checked.png",
718   "in_dn.png",
719   "in_checkedhi.png");
720  label_toggle = new_image_set(
721   5,
722   "labeltoggle_up.png",
723   "labeltoggle_uphi.png",
724   "label_checked.png",
725   "labeltoggle_dn.png",
726   "label_checkedhi.png");
727  ffmpeg_toggle = new_image_set(
728   5,
729   "ff_up.png",
730   "ff_hi.png",
731   "ff_checked.png",
732   "ff_down.png",
733   "ff_checkedhi.png");
734  proxy_p_toggle = new_image_set(
735   5,
736   "proxy_p_up.png",
737   "proxy_p_hi.png",
738   "proxy_p_chkd.png",
739   "proxy_p_down.png",
740   "proxy_p_chkdhi.png");
741  proxy_s_toggle = new_image_set(
742   5,
743   "proxy_s_up.png",
744   "proxy_s_hi.png",
745   "proxy_s_chkd.png",
746   "proxy_s_down.png",
747   "proxy_s_chkdhi.png");
748  mask_mode_toggle = new_image_set(5,
749           "mask_mode_up.png",
750           "mask_mode_hi.png",
751           "mask_mode_chkd.png",
752           "mask_mode_down.png",
753           "mask_mode_chkdhi.png");
754  shbtn_data = new_image_set(
755   3,
756   "shbtn_up.png",
757   "shbtn_hi.png",
758   "shbtn_dn.png");
759  new_image_set(
760   "preset_edit",
761   3,
762   "preset_edit0.png",
763   "preset_edit1.png",
764   "preset_edit2.png");
765  new_image_set(
766   "histogram_carrot",
767   5,
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(
774   3,
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,
786       "bottom_justify");
787  new_button("center_justify.png",
788       editpanel_up, editpanel_hi, editpanel_dn,
789       "center_justify");
790  new_button("channel.png",
791       editpanel_up, editpanel_hi, editpanel_dn,
792       "channel");
793  new_button("lok.png",
794       editpanel_up, editpanel_hi, editpanel_dn,
795       "lok");
796  new_toggle("histogram_toggle.png",
797       editpanel_up,
798       editpanel_hi,
799       editpanel_checked,
800       editpanel_dn,
801       editpanel_checkedhi,
802       "histogram_toggle");
803  new_toggle("histogram_rgb.png",
804       editpanel_up,
805       editpanel_hi,
806       editpanel_checked,
807       editpanel_dn,
808       editpanel_checkedhi,
809       "histogram_rgb_toggle");
810  new_toggle("waveform.png",
811       editpanel_up,
812       editpanel_hi,
813       editpanel_checked,
814       editpanel_dn,
815       editpanel_checkedhi,
816       "waveform_toggle");
817  new_toggle("waveform_rgb.png",
818       editpanel_up,
819       editpanel_hi,
820       editpanel_checked,
821       editpanel_dn,
822       editpanel_checkedhi,
823       "waveform_rgb_toggle");
824  new_toggle("scope.png",
825       editpanel_up,
826       editpanel_hi,
827       editpanel_checked,
828       editpanel_dn,
829       editpanel_checkedhi,
830       "scope_toggle");
831  new_button("picture.png",
832       editpanel_up, editpanel_hi, editpanel_dn,
833       "picture");
834  new_button("histogram_img.png",
835       editpanel_up, editpanel_hi, editpanel_dn,
836       "histogram_img");
837  new_button("copy.png",
838       editpanel_up, editpanel_hi, editpanel_dn,
839       "copy");
840  new_button("commercial.png",
841       editpanel_up, editpanel_hi, editpanel_dn,
842       "commercial");
843  new_button("cut.png",
844       editpanel_up, editpanel_hi, editpanel_dn,
845       "cut");
846  new_button("fit.png",
847       editpanel_up, editpanel_hi, editpanel_dn,
848       "fit");
849  new_button("fitautos.png",
850       editpanel_up, editpanel_hi, editpanel_dn,
851       "fitautos");
852  new_button("inpoint.png",
853       editpanel_up, editpanel_hi, editpanel_dn,
854       "inbutton");
855  new_button("label.png",
856       editpanel_up, editpanel_hi, editpanel_dn,
857       "labelbutton");
858  new_button("left_justify.png",
859       editpanel_up, editpanel_hi, editpanel_dn,
860       "left_justify");
861  new_button("magnify.png",
862       editpanel_up, editpanel_hi, editpanel_dn,
863       "magnify_button");
864  new_button("middle_justify.png",
865       editpanel_up, editpanel_hi, editpanel_dn,
866       "middle_justify");
867  new_button("nextlabel.png",
868       editpanel_up, editpanel_hi, editpanel_dn,
869       "nextlabel");
870  new_button("prevlabel.png",
871       editpanel_up, editpanel_hi, editpanel_dn,
872       "prevlabel");
873  new_button("nextedit.png",
874       editpanel_up, editpanel_hi, editpanel_dn,
875       "nextedit");
876  new_button("prevedit.png",
877       editpanel_up, editpanel_hi, editpanel_dn,
878       "prevedit");
879  new_button("outpoint.png",
880       editpanel_up, editpanel_hi, editpanel_dn,
881       "outbutton");
882  over_button = new_button("over.png",
883         editpanel_up, editpanel_hi, editpanel_dn,
884         "overbutton");
885  overwrite_data = new_button("overwrite.png",
886         editpanel_up, editpanel_hi, editpanel_dn,
887         "overwritebutton");
888  new_button("paste.png",
889       editpanel_up, editpanel_hi, editpanel_dn,
890       "paste");
891  new_button("redo.png",
892       editpanel_up, editpanel_hi, editpanel_dn,
893       "redo");
894  new_button("right_justify.png",
895       editpanel_up, editpanel_hi, editpanel_dn,
896       "right_justify");
897  splice_data = new_button("splice.png",
898         editpanel_up, editpanel_hi, editpanel_dn,
899         "splicebutton");
900  new_button("toclip.png",
901       editpanel_up, editpanel_hi, editpanel_dn,
902       "toclip");
903  new_button("goto.png",
904       editpanel_up, editpanel_hi, editpanel_dn,
905       "goto");
906  new_button("clapper.png",
907       editpanel_up, editpanel_hi, editpanel_dn,
908       "clapperbutton");
909  new_button("top_justify.png",
910       editpanel_up, editpanel_hi, editpanel_dn,
911       "top_justify");
912  new_button("undo.png",
913       editpanel_up, editpanel_hi, editpanel_dn,
914       "undo");
915  new_button("wrench.png",
916       editpanel_up, editpanel_hi, editpanel_dn,
917       "wrench");
918
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]));
939
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,
945       "end");
946  new_button("fastfwd.png",
947       transport_up, transport_hi, transport_dn,
948       "fastfwd");
949  new_button("fastrev.png",
950       transport_up, transport_hi, transport_dn,
951       "fastrev");
952  new_button("play.png",
953       transport_up, transport_hi, transport_dn,
954       "play");
955  new_button("framefwd.png",
956       transport_up, transport_hi, transport_dn,
957       "framefwd");
958  new_button("framerev.png",
959       transport_up, transport_hi, transport_dn,
960       "framerev");
961  new_button("pause.png",
962       transport_up, transport_hi, transport_dn,
963       "pause");
964  new_button("record.png",
965       transport_up, transport_hi, transport_dn,
966       "record");
967  new_button("singleframe.png",
968       transport_up, transport_hi, transport_dn,
969       "recframe");
970  new_button("reverse.png",
971       transport_up, transport_hi, transport_dn,
972       "reverse");
973  new_button("rewind.png",
974       transport_up, transport_hi, transport_dn,
975       "rewind");
976  new_button("stop.png",
977       transport_up, transport_hi, transport_dn,
978       "stop");
979  new_button("stop.png",
980       transport_up, transport_hi, transport_dn,
981       "stoprec");
982  new_image("cwindow_inactive", "cwindow_inactive.png");
983  new_image("cwindow_active", "cwindow_active.png");
984  new_image_set("category_button",
985       3,
986       "preferencesbutton_dn.png",
987       "preferencesbutton_dnhi.png",
988       "preferencesbutton_dnlo.png");
989  new_image_set("category_button_checked",
990       3,
991       "preferencesbutton_up.png",
992       "preferencesbutton_uphi.png",
993       "preferencesbutton_dnlo.png");
994  new_image_set("color3way_point",
995       3,
996       "color3way_up.png",
997       "color3way_hi.png",
998       "color3way_dn.png");
999  new_toggle("arrow.png",
1000       editpanel_up, editpanel_hi, editpanel_checked,
1001       editpanel_dn, editpanel_checkedhi,
1002       "arrow");
1003  new_toggle("autokeyframe.png",
1004       transport_up, editpanel_hi, editpanel_checked,
1005       editpanel_dn, editpanel_checkedhi,
1006       "autokeyframe");
1007  new_toggle("spankeyframe.png",
1008       transport_up, editpanel_hi, editpanel_checked,
1009       editpanel_dn, editpanel_checkedhi,
1010       "spankeyframe");
1011  new_toggle("ibeam.png",
1012       editpanel_up, editpanel_hi, editpanel_checked,
1013       editpanel_dn, editpanel_checkedhi,
1014       "ibeam");
1015  new_toggle("show_meters.png",
1016       editpanel_up, editpanel_hi, editpanel_checked,
1017       editpanel_dn, editpanel_checkedhi,
1018       "meters");
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"),
1025       "locklabels");
1026  new_toggle("gang0.png",
1027       editpanel_up, editpanel_hi, editpanel_checked,
1028       editpanel_dn, editpanel_checkedhi,
1029       "gang0");
1030  new_toggle("gang1.png",
1031       editpanel_up, editpanel_hi, editpanel_checked,
1032       editpanel_dn, editpanel_checkedhi,
1033       "gang1");
1034  new_toggle("gang2.png",
1035       editpanel_up, editpanel_hi, editpanel_checked,
1036       editpanel_dn, editpanel_checkedhi,
1037       "gang2");
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,
1045       "camera");
1046  new_toggle("crop.png",
1047       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1048       "crop");
1049  new_toggle("eyedrop.png",
1050       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1051       "eyedrop");
1052  new_toggle("magnify.png",
1053       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1054       "magnify");
1055  new_toggle("mask.png",
1056       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1057       "mask");
1058  new_toggle("ruler.png",
1059       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1060       "ruler");
1061  new_toggle("projector.png",
1062       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1063       "projector");
1064  new_toggle("protect.png",
1065       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1066       "protect");
1067  new_toggle("titlesafe.png",
1068       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1069       "titlesafe");
1070  new_toggle("toolwindow.png",
1071       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1072       "tool");
1073  new_toggle("tan_smooth.png",
1074       editpanel_up, editpanel_hi, editpanel_checked,
1075       editpanel_dn, editpanel_checkedhi,
1076       "tan_smooth");
1077  new_toggle("tan_linear.png",
1078       editpanel_up, editpanel_hi, editpanel_checked,
1079       editpanel_dn, editpanel_checkedhi,
1080       "tan_linear");
1081  new_toggle("tan_tangent.png",
1082       editpanel_up, editpanel_hi, editpanel_checked,
1083       editpanel_dn, editpanel_checkedhi,
1084       "tan_tangent");
1085  new_toggle("tan_free.png",
1086        editpanel_up, editpanel_hi, editpanel_checked,
1087       editpanel_dn, editpanel_checkedhi,
1088       "tan_free");
1089  new_toggle("tan_bump.png",
1090       editpanel_up, editpanel_hi, editpanel_checked,
1091       editpanel_dn, editpanel_checkedhi,
1092       "tan_bump");
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",
1095       "mask_scale_x");
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",
1098       "mask_scale_y");
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",
1101       "mask_scale_xy");
1102  flush_images();
1103 }
1104 void CAKEWALKTHEME::get_vwindow_sizes(VWindowGUI *gui)
1105 {
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);
1110  vtime_w = xS(140);
1111  int vtime_border = xS(15);
1112  vmeter_y = widget_border;
1113  vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border;
1114  int buttons_h;
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);
1120  } else {
1121   vmeter_x = mwindow->session->vwindow_w + widget_border;
1122  }
1123  vcanvas_x = 0;
1124  vcanvas_y = 0;
1125  vcanvas_w = vmeter_x - vcanvas_x - widget_border;
1126  if (edit_w +
1127   widget_border * 2 +
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 -
1134    buttons_h +
1135    vtimebar_h +
1136    widget_border;
1137   vtransport_x = widget_border;
1138   vtransport_y = mwindow->session->vwindow_h -
1139    get_image_set("autokeyframe")[0]->get_h() -
1140    widget_border;
1141   vdivision_x = xS(280);
1142   vtime_x = vedit_x + xS(85);
1143   vtime_y = vedit_y + yS(28);
1144  } else {
1145   buttons_h = vtimebar_h +
1146    widget_border +
1147    EditPanel::calculate_h(mwindow) +
1148    widget_border;
1149   vtransport_x = widget_border;
1150   vtransport_y = mwindow->session->vwindow_h -
1151    buttons_h +
1152    vtimebar_h +
1153    widget_border;
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;
1159  }
1160  vcanvas_h = mwindow->session->vwindow_h - buttons_h;
1161  vtimebar_x = 0;
1162  vtimebar_y = vcanvas_y + vcanvas_h;
1163  vtimebar_w = vmeter_x - widget_border;
1164 }
1165 void CAKEWALKTHEME::build_bg_data()
1166 {
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");
1177 }
1178 void CAKEWALKTHEME::build_overlays()
1179 {
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"));
1187 }
1188 void CAKEWALKTHEME::draw_rwindow_bg(RecordGUI *gui)
1189 {
1190 }
1191 void CAKEWALKTHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
1192 {
1193 }
1194 void CAKEWALKTHEME::draw_mwindow_bg(MWindowGUI *gui)
1195 {
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();
1199  int x = mbuttons_x;
1200  x += 9 * get_image("play")->get_w();
1201  x += mtransport_margin;
1202  int xs2 = xS(2);
1203  gui->draw_vframe(get_image("panel_divider"),
1204       x - toggle_margin / 2 - pdw / 2 + xs2,
1205       mbuttons_y - 1);
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,
1209       mbuttons_y - 1);
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,
1213       mbuttons_y - 1);
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,
1219       patchbay_y,
1220       patchbay_h,
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,
1228       mtimebar_y,
1229       mtimebar_w,
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,
1235       mzoom_y,
1236       mzoom_w,
1237       get_image("statusbar"));
1238 }
1239 void CAKEWALKTHEME::draw_cwindow_bg(CWindowGUI *gui)
1240 {
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)
1244  {
1245   gui->draw_3segmenth(cstatus_x,
1246        ccomposite_h,
1247        cmeter_x - widget_border - cstatus_x,
1248        get_image("cbuttons_right"));
1249   gui->draw_9segment(cmeter_x - widget_border,
1250          0,
1251          mwindow->session->cwindow_w - cmeter_x + widget_border,
1252          mwindow->session->cwindow_h,
1253          get_image("cmeter_bg"));
1254  } else {
1255   gui->draw_3segmenth(cstatus_x,
1256        ccomposite_h,
1257        cmeter_x - widget_border - cstatus_x + xS(100),
1258        get_image("cbuttons_right"));
1259  }
1260 }
1261 void CAKEWALKTHEME::draw_vwindow_bg(VWindowGUI *gui)
1262 {
1263  gui->draw_3segmenth(0,
1264       vcanvas_h,
1265       vdivision_x,
1266       get_image("vbuttons_left"));
1267  if(mwindow->edl->session->vwindow_meter)
1268  {
1269   gui->draw_3segmenth(vdivision_x,
1270        vcanvas_h,
1271        vmeter_x - widget_border - vdivision_x,
1272        get_image("vbuttons_right"));
1273   gui->draw_9segment(vmeter_x - widget_border,
1274          0,
1275          mwindow->session->vwindow_w - vmeter_x + widget_border,
1276          mwindow->session->vwindow_h,
1277          get_image("cmeter_bg"));
1278  } else {
1279   gui->draw_3segmenth(vdivision_x,
1280        vcanvas_h,
1281        vmeter_x - widget_border - vdivision_x + xS(100),
1282        get_image("vbuttons_right"));
1283  }
1284  gui->draw_3segmenth(vtime_x - xS(5), vtime_y + 0,
1285   vtime_w + xS(10), get_image("vclock"));
1286 }
1287 void CAKEWALKTHEME::draw_preferences_bg(PreferencesWindow *gui)
1288 {
1289  gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1290 }
1291 void CAKEWALKTHEME::draw_new_bg(NewWindow *gui)
1292 {
1293  gui->draw_vframe(get_image("new_bg"), 0, 0);
1294 }
1295 void CAKEWALKTHEME::draw_setformat_bg(SetFormatWindow *gui)
1296 {
1297  gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1298 }