rework camera/projector tool_guis, add horz tumbler orient, update es.po
[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("mode_popup", 3,
595       "mode_up.png", "mode_hi.png", "mode_dn.png");
596  new_image("mode_add", "mode_add.png");
597  new_image("mode_divide", "mode_divide.png");
598  new_image("mode_multiply", "mode_multiply.png");
599  new_image("mode_normal", "mode_normal.png");
600  new_image("mode_replace", "mode_replace.png");
601  new_image("mode_subtract", "mode_subtract.png");
602  new_image("mode_max", "mode_max.png");
603  new_image_set("plugin_on", 5,
604       "plugin_on.png",
605       "plugin_onhi.png",
606       "plugin_onselect.png",
607       "plugin_ondn.png",
608       "plugin_onselecthi.png");
609  new_image_set("plugin_show", 5,
610       "plugin_show.png",
611       "plugin_showhi.png",
612       "plugin_showselect.png",
613       "plugin_showdn.png",
614       "plugin_showselecthi.png");
615  new_image_set("mixpatch_data", 5,
616       "mixpatch_up.png",
617       "mixpatch_hi.png",
618       "mixpatch_checked.png",
619       "mixpatch_dn.png",
620       "mixpatch_checkedhi.png");
621  new_image("cpanel_bg", "cpanel_bg.png");
622  new_image("cbuttons_left", "cbuttons_left.png");
623  new_image("cbuttons_right", "cbuttons_right.png");
624  new_image("cmeter_bg", "cmeter_bg.png");
625  new_image("cwindow_focus", "cwindow_focus.png");
626  new_image("vbuttons_left", "vbuttons_left.png");
627  new_image("vbuttons_right", "vbuttons_right.png");
628  new_image("vclock", "vclock.png");
629  new_image("preferences_bg", "preferences_bg.png");
630  new_image("new_bg", "new_bg.png");
631  new_image("setformat_bg", "setformat_bg.png");
632  timebar_view_data = new_image("timebar_view.png");
633  setformat_w = get_image("setformat_bg")->get_w();
634  setformat_h = get_image("setformat_bg")->get_h();
635  setformat_x1 = xS(15);
636  setformat_x2 = xS(110);
637  setformat_x3 = xS(315);
638  setformat_x4 = xS(425);
639  setformat_y1 = yS(20);
640  setformat_y2 = yS(85);
641  setformat_y3 = yS(125);
642  setformat_margin = yS(30);
643  setformat_channels_x = xS(25);
644  setformat_channels_y = yS(242);
645  setformat_channels_w = xS(250);
646  setformat_channels_h = yS(250);
647  loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + yS(10);
648  browse_pad = yS(20);
649  new_toggle("playpatch.png",
650       "playpatch_up.png",
651       "playpatch_hi.png",
652       "playpatch_checked.png",
653       "playpatch_dn.png",
654       "playpatch_checkedhi.png",
655       "playpatch_data");
656  new_toggle("recordpatch.png",
657       "recordpatch_up.png",
658       "recordpatch_hi.png",
659       "recordpatch_checked.png",
660       "recordpatch_dn.png",
661       "recordpatch_checkedhi.png",
662       "recordpatch_data");
663  new_toggle("gangpatch.png",
664       "patch_up.png",
665       "patch_hi.png",
666       "patch_checked.png",
667       "patch_dn.png",
668       "patch_checkedhi.png",
669       "gangpatch_data");
670  new_toggle("drawpatch.png",
671       "patch_up.png",
672       "patch_hi.png",
673       "patch_checked.png",
674       "patch_dn.png",
675       "patch_checkedhi.png",
676       "drawpatch_data");
677  new_toggle("masterpatch.png",
678       "patch_up.png",
679       "patch_hi.png",
680       "patch_checked.png",
681       "patch_dn.png",
682       "patch_checkedhi.png",
683       "masterpatch_data");
684
685  new_image_set("mutepatch_data",
686       5,
687       "mutepatch_up.png",
688       "mutepatch_hi.png",
689       "mutepatch_checked.png",
690       "mutepatch_dn.png",
691       "mutepatch_checkedhi.png");
692  new_image_set("expandpatch_data",
693       5,
694       "expandpatch_up.png",
695       "expandpatch_hi.png",
696       "expandpatch_checked.png",
697       "expandpatch_dn.png",
698       "expandpatch_checkedhi.png");
699  build_bg_data();
700  build_overlays();
701  out_point = new_image_set(
702   5,
703   "out_up.png",
704   "out_hi.png",
705   "out_checked.png",
706   "out_dn.png",
707   "out_checkedhi.png");
708  in_point = new_image_set(
709   5,
710   "in_up.png",
711   "in_hi.png",
712   "in_checked.png",
713   "in_dn.png",
714   "in_checkedhi.png");
715  label_toggle = new_image_set(
716   5,
717   "labeltoggle_up.png",
718   "labeltoggle_uphi.png",
719   "label_checked.png",
720   "labeltoggle_dn.png",
721   "label_checkedhi.png");
722  ffmpeg_toggle = new_image_set(
723   5,
724   "ff_up.png",
725   "ff_hi.png",
726   "ff_checked.png",
727   "ff_down.png",
728   "ff_checkedhi.png");
729  proxy_p_toggle = new_image_set(
730   5,
731   "proxy_p_up.png",
732   "proxy_p_hi.png",
733   "proxy_p_chkd.png",
734   "proxy_p_down.png",
735   "proxy_p_chkdhi.png");
736  proxy_s_toggle = new_image_set(
737   5,
738   "proxy_s_up.png",
739   "proxy_s_hi.png",
740   "proxy_s_chkd.png",
741   "proxy_s_down.png",
742   "proxy_s_chkdhi.png");
743  mask_mode_toggle = new_image_set(5,
744           "mask_mode_up.png",
745           "mask_mode_hi.png",
746           "mask_mode_chkd.png",
747           "mask_mode_down.png",
748           "mask_mode_chkdhi.png");
749  shbtn_data = new_image_set(
750   3,
751   "shbtn_up.png",
752   "shbtn_hi.png",
753   "shbtn_dn.png");
754  new_image_set(
755   "preset_edit",
756   3,
757   "preset_edit0.png",
758   "preset_edit1.png",
759   "preset_edit2.png");
760  new_image_set(
761   "histogram_carrot",
762   5,
763   "histogram_carrot_up.png",
764   "histogram_carrot_hi.png",
765   "histogram_carrot_checked.png",
766   "histogram_carrot_dn.png",
767   "histogram_carrot_checkedhi.png");
768  statusbar_cancel_data = new_image_set(
769   3,
770   "statusbar_cancel_up.png",
771   "statusbar_cancel_hi.png",
772   "statusbar_cancel_dn.png");
773  VFrame *editpanel_up = new_image("editpanel_up.png");
774  VFrame *editpanel_hi = new_image("editpanel_hi.png");
775  VFrame *editpanel_dn = new_image("editpanel_dn.png");
776  VFrame *editpanel_checked = new_image("editpanel_checked.png");
777  VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
778  new_image("panel_divider", "panel_divider.png");
779  new_button("bottom_justify.png",
780       editpanel_up, editpanel_hi, editpanel_dn,
781       "bottom_justify");
782  new_button("center_justify.png",
783       editpanel_up, editpanel_hi, editpanel_dn,
784       "center_justify");
785  new_button("channel.png",
786       editpanel_up, editpanel_hi, editpanel_dn,
787       "channel");
788  new_button("lok.png",
789       editpanel_up, editpanel_hi, editpanel_dn,
790       "lok");
791  new_toggle("histogram_toggle.png",
792       editpanel_up,
793       editpanel_hi,
794       editpanel_checked,
795       editpanel_dn,
796       editpanel_checkedhi,
797       "histogram_toggle");
798  new_toggle("histogram_rgb.png",
799       editpanel_up,
800       editpanel_hi,
801       editpanel_checked,
802       editpanel_dn,
803       editpanel_checkedhi,
804       "histogram_rgb_toggle");
805  new_toggle("waveform.png",
806       editpanel_up,
807       editpanel_hi,
808       editpanel_checked,
809       editpanel_dn,
810       editpanel_checkedhi,
811       "waveform_toggle");
812  new_toggle("waveform_rgb.png",
813       editpanel_up,
814       editpanel_hi,
815       editpanel_checked,
816       editpanel_dn,
817       editpanel_checkedhi,
818       "waveform_rgb_toggle");
819  new_toggle("scope.png",
820       editpanel_up,
821       editpanel_hi,
822       editpanel_checked,
823       editpanel_dn,
824       editpanel_checkedhi,
825       "scope_toggle");
826  new_button("picture.png",
827       editpanel_up, editpanel_hi, editpanel_dn,
828       "picture");
829  new_button("histogram_img.png",
830       editpanel_up, editpanel_hi, editpanel_dn,
831       "histogram_img");
832  new_button("copy.png",
833       editpanel_up, editpanel_hi, editpanel_dn,
834       "copy");
835  new_button("commercial.png",
836       editpanel_up, editpanel_hi, editpanel_dn,
837       "commercial");
838  new_button("cut.png",
839       editpanel_up, editpanel_hi, editpanel_dn,
840       "cut");
841  new_button("fit.png",
842       editpanel_up, editpanel_hi, editpanel_dn,
843       "fit");
844  new_button("fitautos.png",
845       editpanel_up, editpanel_hi, editpanel_dn,
846       "fitautos");
847  new_button("inpoint.png",
848       editpanel_up, editpanel_hi, editpanel_dn,
849       "inbutton");
850  new_button("label.png",
851       editpanel_up, editpanel_hi, editpanel_dn,
852       "labelbutton");
853  new_button("left_justify.png",
854       editpanel_up, editpanel_hi, editpanel_dn,
855       "left_justify");
856  new_button("magnify.png",
857       editpanel_up, editpanel_hi, editpanel_dn,
858       "magnify_button");
859  new_button("middle_justify.png",
860       editpanel_up, editpanel_hi, editpanel_dn,
861       "middle_justify");
862  new_button("nextlabel.png",
863       editpanel_up, editpanel_hi, editpanel_dn,
864       "nextlabel");
865  new_button("prevlabel.png",
866       editpanel_up, editpanel_hi, editpanel_dn,
867       "prevlabel");
868  new_button("nextedit.png",
869       editpanel_up, editpanel_hi, editpanel_dn,
870       "nextedit");
871  new_button("prevedit.png",
872       editpanel_up, editpanel_hi, editpanel_dn,
873       "prevedit");
874  new_button("outpoint.png",
875       editpanel_up, editpanel_hi, editpanel_dn,
876       "outbutton");
877  over_button = new_button("over.png",
878         editpanel_up, editpanel_hi, editpanel_dn,
879         "overbutton");
880  overwrite_data = new_button("overwrite.png",
881         editpanel_up, editpanel_hi, editpanel_dn,
882         "overwritebutton");
883  new_button("paste.png",
884       editpanel_up, editpanel_hi, editpanel_dn,
885       "paste");
886  new_button("redo.png",
887       editpanel_up, editpanel_hi, editpanel_dn,
888       "redo");
889  new_button("right_justify.png",
890       editpanel_up, editpanel_hi, editpanel_dn,
891       "right_justify");
892  splice_data = new_button("splice.png",
893         editpanel_up, editpanel_hi, editpanel_dn,
894         "splicebutton");
895  new_button("toclip.png",
896       editpanel_up, editpanel_hi, editpanel_dn,
897       "toclip");
898  new_button("goto.png",
899       editpanel_up, editpanel_hi, editpanel_dn,
900       "goto");
901  new_button("clapper.png",
902       editpanel_up, editpanel_hi, editpanel_dn,
903       "clapperbutton");
904  new_button("top_justify.png",
905       editpanel_up, editpanel_hi, editpanel_dn,
906       "top_justify");
907  new_button("undo.png",
908       editpanel_up, editpanel_hi, editpanel_dn,
909       "undo");
910  new_button("wrench.png",
911       editpanel_up, editpanel_hi, editpanel_dn,
912       "wrench");
913
914  VFrame **edge_on = new_toggle("edge_on.png",
915       editpanel_up, editpanel_hi, editpanel_checked,
916       editpanel_dn, editpanel_checkedhi, "edge_on");
917  VFrame **edge_off = new_toggle("edge_off.png",
918       editpanel_up, editpanel_hi, editpanel_checked,
919       editpanel_dn, editpanel_checkedhi, "edge_off");
920  new_image_set_images("bump_edge", 5,
921       new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
922       new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
923       new VFrame(*edge_on[4]));
924  VFrame **span_on = new_toggle("span_on.png",
925       editpanel_up, editpanel_hi, editpanel_checked,
926       editpanel_dn, editpanel_checkedhi, "span_on");
927  VFrame **span_off = new_toggle("span_off.png",
928       editpanel_up, editpanel_hi, editpanel_checked,
929       editpanel_dn, editpanel_checkedhi, "span_off");
930  new_image_set_images("bump_span", 5,
931       new VFrame(*span_off[0]), new VFrame(*span_off[1]),
932       new VFrame(*span_on[0]),  new VFrame(*span_off[3]),
933       new VFrame(*span_on[4]));
934
935  VFrame *transport_up = new_image("transportup.png");
936  VFrame *transport_hi = new_image("transporthi.png");
937  VFrame *transport_dn = new_image("transportdn.png");
938  new_button("end.png",
939       transport_up, transport_hi, transport_dn,
940       "end");
941  new_button("fastfwd.png",
942       transport_up, transport_hi, transport_dn,
943       "fastfwd");
944  new_button("fastrev.png",
945       transport_up, transport_hi, transport_dn,
946       "fastrev");
947  new_button("play.png",
948       transport_up, transport_hi, transport_dn,
949       "play");
950  new_button("framefwd.png",
951       transport_up, transport_hi, transport_dn,
952       "framefwd");
953  new_button("framerev.png",
954       transport_up, transport_hi, transport_dn,
955       "framerev");
956  new_button("pause.png",
957       transport_up, transport_hi, transport_dn,
958       "pause");
959  new_button("record.png",
960       transport_up, transport_hi, transport_dn,
961       "record");
962  new_button("singleframe.png",
963       transport_up, transport_hi, transport_dn,
964       "recframe");
965  new_button("reverse.png",
966       transport_up, transport_hi, transport_dn,
967       "reverse");
968  new_button("rewind.png",
969       transport_up, transport_hi, transport_dn,
970       "rewind");
971  new_button("stop.png",
972       transport_up, transport_hi, transport_dn,
973       "stop");
974  new_button("stop.png",
975       transport_up, transport_hi, transport_dn,
976       "stoprec");
977  new_image("cwindow_inactive", "cwindow_inactive.png");
978  new_image("cwindow_active", "cwindow_active.png");
979  new_image_set("category_button",
980       3,
981       "preferencesbutton_dn.png",
982       "preferencesbutton_dnhi.png",
983       "preferencesbutton_dnlo.png");
984  new_image_set("category_button_checked",
985       3,
986       "preferencesbutton_up.png",
987       "preferencesbutton_uphi.png",
988       "preferencesbutton_dnlo.png");
989  new_image_set("color3way_point",
990       3,
991       "color3way_up.png",
992       "color3way_hi.png",
993       "color3way_dn.png");
994  new_toggle("arrow.png",
995       editpanel_up, editpanel_hi, editpanel_checked,
996       editpanel_dn, editpanel_checkedhi,
997       "arrow");
998  new_toggle("autokeyframe.png",
999       transport_up, editpanel_hi, editpanel_checked,
1000       editpanel_dn, editpanel_checkedhi,
1001       "autokeyframe");
1002  new_toggle("spankeyframe.png",
1003       transport_up, editpanel_hi, editpanel_checked,
1004       editpanel_dn, editpanel_checkedhi,
1005       "spankeyframe");
1006  new_toggle("ibeam.png",
1007       editpanel_up, editpanel_hi, editpanel_checked,
1008       editpanel_dn, editpanel_checkedhi,
1009       "ibeam");
1010  new_toggle("show_meters.png",
1011       editpanel_up, editpanel_hi, editpanel_checked,
1012       editpanel_dn, editpanel_checkedhi,
1013       "meters");
1014  new_toggle("blank30x30.png",
1015       new_image("locklabels_locked.png"),
1016       new_image("locklabels_lockedhi.png"),
1017       new_image("locklabels_unlocked.png"),
1018       new_image("locklabels_dn.png"),
1019       new_image("locklabels_unlockedhi.png"),
1020       "locklabels");
1021  new_toggle("gang0.png",
1022       editpanel_up, editpanel_hi, editpanel_checked,
1023       editpanel_dn, editpanel_checkedhi,
1024       "gang0");
1025  new_toggle("gang1.png",
1026       editpanel_up, editpanel_hi, editpanel_checked,
1027       editpanel_dn, editpanel_checkedhi,
1028       "gang1");
1029  new_toggle("gang2.png",
1030       editpanel_up, editpanel_hi, editpanel_checked,
1031       editpanel_dn, editpanel_checkedhi,
1032       "gang2");
1033  VFrame *cpanel_up = new_image("cpanel_up.png");
1034  VFrame *cpanel_hi = new_image("cpanel_hi.png");
1035  VFrame *cpanel_dn = new_image("cpanel_dn.png");
1036  VFrame *cpanel_checked = new_image("cpanel_checked.png");
1037  VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
1038  new_toggle("camera.png",
1039       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1040       "camera");
1041  new_toggle("crop.png",
1042       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1043       "crop");
1044  new_toggle("eyedrop.png",
1045       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1046       "eyedrop");
1047  new_toggle("magnify.png",
1048       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1049       "magnify");
1050  new_toggle("mask.png",
1051       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1052       "mask");
1053  new_toggle("ruler.png",
1054       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1055       "ruler");
1056  new_toggle("projector.png",
1057       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1058       "projector");
1059  new_toggle("protect.png",
1060       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1061       "protect");
1062  new_toggle("titlesafe.png",
1063       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1064       "titlesafe");
1065  new_toggle("toolwindow.png",
1066       cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi,
1067       "tool");
1068  new_toggle("tan_smooth.png",
1069       editpanel_up, editpanel_hi, editpanel_checked,
1070       editpanel_dn, editpanel_checkedhi,
1071       "tan_smooth");
1072  new_toggle("tan_linear.png",
1073       editpanel_up, editpanel_hi, editpanel_checked,
1074       editpanel_dn, editpanel_checkedhi,
1075       "tan_linear");
1076  new_toggle("tan_tangent.png",
1077       editpanel_up, editpanel_hi, editpanel_checked,
1078       editpanel_dn, editpanel_checkedhi,
1079       "tan_tangent");
1080  new_toggle("tan_free.png",
1081        editpanel_up, editpanel_hi, editpanel_checked,
1082       editpanel_dn, editpanel_checkedhi,
1083       "tan_free");
1084  new_toggle("tan_bump.png",
1085       editpanel_up, editpanel_hi, editpanel_checked,
1086       editpanel_dn, editpanel_checkedhi,
1087       "tan_bump");
1088  new_toggle("mask_scale_x.png", "mask_scale_up.png", "mask_scale_uphi.png",
1089       "mask_scale_chkd.png", "mask_scale_xdown.png", "mask_scale_chkdhi.png",
1090       "mask_scale_x");
1091  new_toggle("mask_scale_y.png", "mask_scale_up.png", "mask_scale_uphi.png",
1092       "mask_scale_chkd.png", "mask_scale_ydown.png", "mask_scale_chkdhi.png",
1093       "mask_scale_y");
1094  new_toggle("mask_scale_xy.png", "mask_scale_up.png", "mask_scale_uphi.png",
1095       "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
1096       "mask_scale_xy");
1097  flush_images();
1098 }
1099 void CAKEWALKTHEME::get_vwindow_sizes(VWindowGUI *gui)
1100 {
1101  int edit_w = EditPanel::calculate_w(mwindow, 0, 12);
1102  int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin;
1103  vtimebar_h = yS(16);
1104  int division_w = xS(30);
1105  vtime_w = xS(140);
1106  int vtime_border = xS(15);
1107  vmeter_y = widget_border;
1108  vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border;
1109  int buttons_h;
1110  if (mwindow->edl->session->vwindow_meter) {
1111   vmeter_x = mwindow->session->vwindow_w -
1112    MeterPanel::get_meters_width(this,
1113            mwindow->edl->session->audio_channels,
1114            mwindow->edl->session->vwindow_meter);
1115  } else {
1116   vmeter_x = mwindow->session->vwindow_w + widget_border;
1117  }
1118  vcanvas_x = 0;
1119  vcanvas_y = 0;
1120  vcanvas_w = vmeter_x - vcanvas_x - widget_border;
1121  if (edit_w +
1122   widget_border * 2 +
1123   transport_w + widget_border +
1124   vtime_w + division_w +
1125   vtime_border > vmeter_x) {
1126   buttons_h = get_image("vbuttons_left")->get_h();
1127   vedit_x = widget_border;
1128   vedit_y = mwindow->session->vwindow_h -
1129    buttons_h +
1130    vtimebar_h +
1131    widget_border;
1132   vtransport_x = widget_border;
1133   vtransport_y = mwindow->session->vwindow_h -
1134    get_image_set("autokeyframe")[0]->get_h() -
1135    widget_border;
1136   vdivision_x = xS(280);
1137   vtime_x = vedit_x + xS(85);
1138   vtime_y = vedit_y + yS(28);
1139  } else {
1140   buttons_h = vtimebar_h +
1141    widget_border +
1142    EditPanel::calculate_h(mwindow) +
1143    widget_border;
1144   vtransport_x = widget_border;
1145   vtransport_y = mwindow->session->vwindow_h -
1146    buttons_h +
1147    vtimebar_h +
1148    widget_border;
1149   vedit_x = vtransport_x + transport_w + widget_border;
1150   vedit_y = vtransport_y;
1151   vdivision_x = vedit_x + edit_w + division_w;
1152   vtime_x = vdivision_x + vtime_border;
1153   vtime_y = vedit_y + widget_border;
1154  }
1155  vcanvas_h = mwindow->session->vwindow_h - buttons_h;
1156  vtimebar_x = 0;
1157  vtimebar_y = vcanvas_y + vcanvas_h;
1158  vtimebar_w = vmeter_x - widget_border;
1159 }
1160 void CAKEWALKTHEME::build_bg_data()
1161 {
1162  channel_position_data = new VFramePng(get_image_data("channel_position.png"));
1163  new_image1("resource1024", "resource1024.png");
1164  new_image1("resource512", "resource512.png");
1165  new_image1("resource256", "resource256.png");
1166  new_image1("resource128", "resource128.png");
1167  new_image1("resource64", "resource64.png");
1168  new_image1("resource32", "resource32.png");
1169  new_image("plugin_bg_data", "plugin_bg.png");
1170  new_image("title_bg_data", "title_bg.png");
1171  new_image("vtimebar_bg_data", "vwindow_timebar.png");
1172 }
1173 void CAKEWALKTHEME::build_overlays()
1174 {
1175  keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
1176  camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
1177  maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
1178  modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
1179  hardedge_data = new VFramePng(get_image_data("hardedge.png"));
1180  pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
1181  projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
1182 }
1183 void CAKEWALKTHEME::draw_rwindow_bg(RecordGUI *gui)
1184 {
1185 }
1186 void CAKEWALKTHEME::draw_rmonitor_bg(RecordMonitorGUI *gui)
1187 {
1188 }
1189 void CAKEWALKTHEME::draw_mwindow_bg(MWindowGUI *gui)
1190 {
1191  gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
1192       gui->menu_w(), get_image("mbutton_bg"));
1193  int pdw = get_image("panel_divider")->get_w();
1194  int x = mbuttons_x;
1195  x += 9 * get_image("play")->get_w();
1196  x += mtransport_margin;
1197  int xs2 = xS(2);
1198  gui->draw_vframe(get_image("panel_divider"),
1199       x - toggle_margin / 2 - pdw / 2 + xs2,
1200       mbuttons_y - 1);
1201  x += 2 * get_image("arrow")->get_w() + toggle_margin;
1202  gui->draw_vframe(get_image("panel_divider"),
1203       x - toggle_margin / 2 - pdw / 2 + xs2,
1204       mbuttons_y - 1);
1205  x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;
1206  gui->draw_vframe(get_image("panel_divider"),
1207       x - toggle_margin / 2 - pdw / 2 + xs2,
1208       mbuttons_y - 1);
1209  gui->draw_3segmenth(0,
1210       mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
1211       get_image("patchbay_bg")->get_w(),
1212       get_image("clock_bg"));
1213  gui->draw_3segmentv(patchbay_x,
1214       patchbay_y,
1215       patchbay_h,
1216       get_image("patchbay_bg"));
1217  gui->set_color(BLACK);
1218  gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
1219       mcanvas_y + mtimebar_h,
1220       mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
1221       mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
1222  gui->draw_3segmenth(mtimebar_x,
1223       mtimebar_y,
1224       mtimebar_w,
1225       get_image("timebar_bg"));
1226  gui->set_color(CwDarkGray);
1227  gui->draw_box(mzoom_x, mzoom_y,
1228       mwindow->session->mwindow_w, yS(25));
1229  gui->draw_3segmenth(mzoom_x,
1230       mzoom_y,
1231       mzoom_w,
1232       get_image("statusbar"));
1233 }
1234 void CAKEWALKTHEME::draw_cwindow_bg(CWindowGUI *gui)
1235 {
1236  gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1237  gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
1238  if(mwindow->edl->session->cwindow_meter)
1239  {
1240   gui->draw_3segmenth(cstatus_x,
1241        ccomposite_h,
1242        cmeter_x - widget_border - cstatus_x,
1243        get_image("cbuttons_right"));
1244   gui->draw_9segment(cmeter_x - widget_border,
1245          0,
1246          mwindow->session->cwindow_w - cmeter_x + widget_border,
1247          mwindow->session->cwindow_h,
1248          get_image("cmeter_bg"));
1249  } else {
1250   gui->draw_3segmenth(cstatus_x,
1251        ccomposite_h,
1252        cmeter_x - widget_border - cstatus_x + xS(100),
1253        get_image("cbuttons_right"));
1254  }
1255 }
1256 void CAKEWALKTHEME::draw_vwindow_bg(VWindowGUI *gui)
1257 {
1258  gui->draw_3segmenth(0,
1259       vcanvas_h,
1260       vdivision_x,
1261       get_image("vbuttons_left"));
1262  if(mwindow->edl->session->vwindow_meter)
1263  {
1264   gui->draw_3segmenth(vdivision_x,
1265        vcanvas_h,
1266        vmeter_x - widget_border - vdivision_x,
1267        get_image("vbuttons_right"));
1268   gui->draw_9segment(vmeter_x - widget_border,
1269          0,
1270          mwindow->session->vwindow_w - vmeter_x + widget_border,
1271          mwindow->session->vwindow_h,
1272          get_image("cmeter_bg"));
1273  } else {
1274   gui->draw_3segmenth(vdivision_x,
1275        vcanvas_h,
1276        vmeter_x - widget_border - vdivision_x + xS(100),
1277        get_image("vbuttons_right"));
1278  }
1279  gui->draw_3segmenth(vtime_x - xS(5), vtime_y + 0,
1280   vtime_w + xS(10), get_image("vclock"));
1281 }
1282 void CAKEWALKTHEME::draw_preferences_bg(PreferencesWindow *gui)
1283 {
1284  gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1285 }
1286 void CAKEWALKTHEME::draw_new_bg(NewWindow *gui)
1287 {
1288  gui->draw_vframe(get_image("new_bg"), 0, 0);
1289 }
1290 void CAKEWALKTHEME::draw_setformat_bg(SetFormatWindow *gui)
1291 {
1292  gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1293 }