r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / defaulttheme / defaulttheme.C
bloba9e10f4e4069af2440a016d7e1a822d4da0fba35
1 #include "clip.h"
2 #include "cwindowgui.h"
3 #include "defaulttheme.h"
4 #include "edl.h"
5 #include "edlsession.h"
6 #include "mainmenu.h"
7 #include "mainsession.h"
8 #include "mbuttons.h"
9 #include "meterpanel.h"
10 #include "mwindow.h"
11 #include "mwindowgui.h"
12 #include "new.h"
13 #include "patchbay.h"
14 #include "preferencesthread.h"
15 #include "recordgui.h"
16 #include "recordmonitor.h"
17 #include "setformat.h"
18 #include "statusbar.h"
19 #include "timebar.h"
20 #include "trackcanvas.h"
21 #include "vframe.h"
22 #include "vwindowgui.h"
23 #include "zoombar.h"
28 PluginClient* new_plugin(PluginServer *server)
30         return new DefaultThemeMain(server);
39 DefaultThemeMain::DefaultThemeMain(PluginServer *server)
40  : PluginTClient(server)
44 DefaultThemeMain::~DefaultThemeMain()
48 char* DefaultThemeMain::plugin_title()
50         return "Blond";
53 Theme* DefaultThemeMain::new_theme()
55         theme = new DefaultTheme;
56         theme->set_path(PluginClient::get_path());
57         return theme;
67 DefaultTheme::DefaultTheme()
68  : Theme()
72 DefaultTheme::~DefaultTheme()
76 void DefaultTheme::initialize()
78         BC_WindowBase::get_resources()->generic_button_images = new_image_set(3, 
79                         "generic_up.png", 
80                         "generic_hi.png", 
81                         "generic_dn.png");
82         BC_WindowBase::get_resources()->horizontal_slider_data = new_image_set(6,
83                         "hslider_fg_up.png",
84                         "hslider_fg_hi.png",
85                         "hslider_fg_dn.png",
86                         "hslider_bg_up.png",
87                         "hslider_bg_hi.png",
88                         "hslider_bg_dn.png");
89         BC_WindowBase::get_resources()->progress_images = new_image_set(2,
90                         "progress_bg.png",
91                         "progress_hi.png");
92         BC_WindowBase::get_resources()->tumble_data = new_image_set(4,
93                 "tumble_up.png",
94                 "tumble_hi.png",
95                 "tumble_botdn.png",
96                 "tumble_topdn.png");
97         BC_WindowBase::get_resources()->listbox_button = new_image_set(3,
98                 "listbox_button_up.png",
99                 "listbox_button_hi.png",
100                 "listbox_button_dn.png");
101         BC_WindowBase::get_resources()->pan_data = new_image_set(7,
102                         "pan_up.png", 
103                         "pan_hi.png", 
104                         "pan_popup.png", 
105                         "pan_channel.png", 
106                         "pan_stick.png", 
107                         "pan_channel_small.png", 
108                         "pan_stick_small.png");
109         BC_WindowBase::get_resources()->pan_text_color = WHITE;
111         BC_WindowBase::get_resources()->hscroll_data = new_image_set(10,
112                         "hscroll_center_up.png",
113                         "hscroll_center_hi.png",
114                         "hscroll_center_dn.png",
115                         "hscroll_bg.png",
116                         "hscroll_back_up.png",
117                         "hscroll_back_hi.png",
118                         "hscroll_back_dn.png",
119                         "hscroll_fwd_up.png",
120                         "hscroll_fwd_hi.png",
121                         "hscroll_fwd_dn.png");
123         BC_WindowBase::get_resources()->vscroll_data = new_image_set(10,
124                         "vscroll_center_up.png",
125                         "vscroll_center_hi.png",
126                         "vscroll_center_dn.png",
127                         "vscroll_bg.png",
128                         "vscroll_back_up.png",
129                         "vscroll_back_hi.png",
130                         "vscroll_back_dn.png",
131                         "vscroll_fwd_up.png",
132                         "vscroll_fwd_hi.png",
133                         "vscroll_fwd_dn.png");
135         BC_WindowBase::get_resources()->ok_images = new_button("ok.png", 
136                         "generic_up.png",
137                         "generic_hi.png",
138                         "generic_dn.png");
140         BC_WindowBase::get_resources()->cancel_images = new_button("cancel.png", 
141                         "generic_up.png",
142                         "generic_hi.png",
143                         "generic_dn.png");
146 // Record windows
147         rgui_batch = new_image("recordgui_batch.png");
148         rgui_controls = new_image("recordgui_controls.png");
149         rgui_list = new_image("recordgui_list.png");
150         rmonitor_panel = new_image("recordmonitor_panel.png");
151         rmonitor_meters = new_image("recordmonitor_meters.png");
154 // MWindow
155         mbutton_left = new_image("mbutton_left.png");
156         mbutton_right = new_image("mbutton_right.png");
157         timebar_bg_data = new_image("timebar_bg.png");
158         timebar_brender_data = new_image("timebar_brender.png");
159         clock_bg = new_image("mclock.png");
160         patchbay_bg = new_image("patchbay_bg.png");
161         tracks_bg = new_image("tracks_bg.png");
162         zoombar_left = new_image("zoombar_left.png");
163         zoombar_right = new_image("zoombar_right.png");
164         statusbar_left = new_image("statusbar_left.png");
165         statusbar_right = new_image("statusbar_right.png");
167 // CWindow
168         cpanel_bg = new_image("cpanel_bg.png");
169         cbuttons_left = new_image("cbuttons_left.png");
170         cbuttons_right = new_image("cbuttons_right.png");
171         cmeter_bg = new_image("cmeter_bg.png");
173 // VWindow
174         vbuttons_left = new_image("vbuttons_left.png");
175         vbuttons_right = new_image("vbuttons_right.png");
176         vmeter_bg = new_image("vmeter_bg.png");
178         preferences_bg = new_image("preferences_bg.png");
181         new_bg = new_image("new_bg.png");
182         setformat_bg = new_image("setformat_bg.png");
185         timebar_view_data = new_image("timebar_view.png");
187         setformat_x1 = 15;
188         setformat_x2 = 100;
190         setformat_x3 = 315;
191         setformat_x4 = 415;
192         setformat_y1 = 20;
193         setformat_margin = 30;
194         setformat_w = 600;
195         setformat_h = 480;
196         setformat_channels_x = 25;
197         setformat_channels_y = 173;
198         setformat_channels_w = 250;
199         setformat_channels_h = 250;
201         loadfile_pad = 70;
202         browse_pad = 20;
208         build_icons();
209         build_bg_data();
210         build_patches();
211         build_overlays();
215         out_point = new_image_set(5,
216                 "out_up.png", 
217                 "out_hi.png", 
218                 "out_checked.png", 
219                 "out_dn.png", 
220                 "out_checkedhi.png");
221         in_point = new_image_set(5,
222                 "in_up.png", 
223                 "in_hi.png", 
224                 "in_checked.png", 
225                 "in_dn.png", 
226                 "in_checkedhi.png");
228         label_toggle = new_image_set(5,
229                 "labeltoggle_up.png", 
230                 "labeltoggle_uphi.png", 
231                 "label_checked.png", 
232                 "labeltoggle_dn.png", 
233                 "label_checkedhi.png");
236         statusbar_cancel_data = new_image_set(3,
237                 "statusbar_cancel_up.png",
238                 "statusbar_cancel_hi.png",
239                 "statusbar_cancel_dn.png");
242         VFrame *editpanel_up = new_image("editpanel_up.png");
243         VFrame *editpanel_hi = new_image("editpanel_hi.png");
244         VFrame *editpanel_dn = new_image("editpanel_dn.png");
245         VFrame *editpanel_checked = new_image("editpanel_checked.png");
246         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
248         bottom_justify = new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
249         center_justify = new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
250         channel_data = new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn);
251         copy_data = new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn);
252         cut_data = new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn);
253         fit_data = new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn);
254         in_data = new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn);
255         indelete_data = new_button("clearinpoint.png", editpanel_up, editpanel_hi, editpanel_dn);
256         labelbutton_data = new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn);
257         left_justify = new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
258         magnify_button_data = new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn);
259         middle_justify = new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
260         nextlabel_data = new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn);
261         out_data = new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn);
262         outdelete_data = new_button("clearoutpoint.png", editpanel_up, editpanel_hi, editpanel_dn);
263         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
264         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
265         paste_data = new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn);
266         prevlabel_data = new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn);
267         redo_data = new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn);
268         right_justify = new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
269         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
270         toclip_data = new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn);
271         top_justify = new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn);
272         undo_data = new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn);
273         wrench_data = new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn);
276         arrow_data = new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
277         autokeyframe_data = new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
278         camera_data = new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
279         crop_data = new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
280         ibeam_data = new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
281         magnify_data = new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
282         mask_data = new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
283         proj_data = new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
284         protect_data = new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
285         show_meters = new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
286         titlesafe_data = new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
287         tool_data = new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
292         static VFrame **transport_bg = new_image_set(3,
293                 "transportup.png", 
294                 "transporthi.png", 
295                 "transportdn.png");
296         build_transport(duplex_data, get_image("duplex.png"), transport_bg, 1);
297         build_transport(end_data, get_image("end.png"), transport_bg, 2);
298         build_transport(fastfwd_data, get_image("fastfwd.png"), transport_bg, 1);
299         build_transport(fastrev_data, get_image("fastrev.png"), transport_bg, 1);
300         build_transport(forward_data, get_image("play.png"), transport_bg, 1);
301         build_transport(framefwd_data, get_image("framefwd.png"), transport_bg, 1);
302         build_transport(framefwd_data, get_image("framefwd.png"), transport_bg, 1);
303         build_transport(framerev_data, get_image("framerev.png"), transport_bg, 1);
304         build_transport(rec_data, get_image("record.png"), transport_bg, 1);
305         build_transport(recframe_data, get_image("singleframe.png"), transport_bg, 1);
306         build_transport(reverse_data, get_image("reverse.png"), transport_bg, 1);
307         build_transport(rewind_data, get_image("rewind.png"), transport_bg, 0);
308         build_transport(stop_data, get_image("stop.png"), transport_bg, 1);
309         build_transport(stoprec_data, get_image("stoprec.png"), transport_bg, 2);
310         flush_images();
312         title_font = MEDIUMFONT_3D;
313         title_color = WHITE;
314         recordgui_fixed_color = YELLOW;
315         recordgui_variable_color = RED;
317         channel_position_color = MEYELLOW;
318         BC_WindowBase::get_resources()->meter_title_w = 25;
321 #define CWINDOW_METER_MARGIN 5
322 #define VWINDOW_METER_MARGIN 5
324 void DefaultTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
326         mbuttons_x = 0;
327         mbuttons_y = gui->mainmenu->get_h();
328         mbuttons_w = w;
329         mbuttons_h = mbutton_left->get_h();
330         mclock_x = 10;
331         mclock_y = mbuttons_y + mbuttons_h + CWINDOW_METER_MARGIN;
332         mclock_w = clock_bg->get_w() - 40;
333         mclock_h = clock_bg->get_h();
334         mtimebar_x = patchbay_bg->get_w();
335         mtimebar_y = mbuttons_y + mbuttons_h;
336         mtimebar_w = w - mtimebar_x;
337         mtimebar_h = timebar_bg_data->get_h();
338         mstatus_x = 0;
339         mstatus_y = h - statusbar_left->get_h();
340         mstatus_w = w;
341         mstatus_h = statusbar_left->get_h();
342         mstatus_message_x = 10;
343         mstatus_message_y = 5;
344         mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 240;
345         mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
346         mstatus_progress_w = 230;
347         mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
348         mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
349         mzoom_x = 0;
350         mzoom_y = mstatus_y - zoombar_left->get_h();
351         mzoom_h = zoombar_left->get_h();
352         mzoom_w = w;
353         patchbay_x = 0;
354         patchbay_y = mtimebar_y + mtimebar_h;
355         patchbay_w = patchbay_bg->get_w();
356         patchbay_h = mzoom_y - patchbay_y;
357         mcanvas_x = patchbay_x + patchbay_w;
358         mcanvas_y = mtimebar_y + mtimebar_h;
359         mcanvas_w = w - patchbay_w;
360         mcanvas_h = patchbay_h;
363 void DefaultTheme::get_cwindow_sizes(CWindowGUI *gui)
365         ccomposite_x = 0;
366         ccomposite_y = 5;
367         ccomposite_w = cpanel_bg->get_w();
368         ccomposite_h = mwindow->session->cwindow_h - cbuttons_left->get_h();
369         cslider_x = 5;
370         cslider_y = ccomposite_h + 23;
371         cedit_x = 10;
372         cedit_y = cslider_y + 17;
373         ctransport_x = 10;
374         ctransport_y = mwindow->session->cwindow_h - autokeyframe_data[0]->get_h();
375         czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
376         czoom_y = ctransport_y + 5;
377         ccanvas_x = ccomposite_x + ccomposite_w;
378         ccanvas_y = 0;
379         ccanvas_h = ccomposite_h;
382         if(mwindow->edl->session->cwindow_meter)
383         {
384                 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(mwindow->edl->session->audio_channels, 
385                         mwindow->edl->session->cwindow_meter);
386                 ccanvas_w = cmeter_x - ccanvas_x - 5;
387         }
388         else
389         {
390                 cmeter_x = mwindow->session->cwindow_w;
391                 ccanvas_w = cmeter_x - ccanvas_x;
392         }
393         cmeter_y = 5;
394         cmeter_h = mwindow->session->cwindow_h - cmeter_y;
396         cslider_w = ccanvas_x + ccanvas_w - cslider_x;
397         ctimebar_x = ccanvas_x;
398         ctimebar_y = ccanvas_y + ccanvas_h;
399         ctimebar_w = ccanvas_w;
400         ctimebar_h = 16;
402         ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
403         ctime_y = ctransport_y;
404         cdest_x = czoom_x;
405         cdest_y = czoom_y + 30;
410 void DefaultTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
412         recordgui_status_x = 10;
413         recordgui_status_y = 10;
414         recordgui_status_x2 = 160;
415         recordgui_batch_x = 310;
416         recordgui_batch_y = 10;
417         recordgui_batchcaption_x = recordgui_batch_x + 110;
420         recordgui_transport_x = recordgui_batch_x;
421         recordgui_transport_y = recordgui_batch_y + 150;
423         recordgui_buttons_x = recordgui_batch_x - 50;
424         recordgui_buttons_y = recordgui_transport_y + 40;
425         recordgui_options_x = recordgui_buttons_x;
426         recordgui_options_y = recordgui_buttons_y + 35;
428         recordgui_batches_x = 10;
429         recordgui_batches_y = 270;
430         recordgui_batches_w = w - 20;
431         recordgui_batches_h = h - recordgui_batches_y - 70;
432         recordgui_loadmode_x = w / 2 - loadmode_w / 2;
433         recordgui_loadmode_y = h - 60;
435         recordgui_controls_x = 10;
436         recordgui_controls_y = h - 40;
441 void DefaultTheme::get_vwindow_sizes(VWindowGUI *gui)
443         vmeter_y = 5;
444         vmeter_h = mwindow->session->vwindow_h - cmeter_y;
445         vcanvas_x = 0;
446         vcanvas_y = 0;
447         vcanvas_h = mwindow->session->vwindow_h - vbuttons_left->get_h();
449         if(mwindow->edl->session->vwindow_meter)
450         {
451                 vmeter_x = mwindow->session->vwindow_w - 
452                         VWINDOW_METER_MARGIN - 
453                         MeterPanel::get_meters_width(mwindow->edl->session->audio_channels, 
454                         mwindow->edl->session->vwindow_meter);
455                 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
456         }
457         else
458         {
459                 vmeter_x = mwindow->session->vwindow_w;
460                 vcanvas_w = mwindow->session->vwindow_w;
461         }
463         vtimebar_x = vcanvas_x;
464         vtimebar_y = vcanvas_y + vcanvas_h;
465         vtimebar_w = vcanvas_w;
466         vtimebar_h = 16;
468         vslider_x = 10;
469         vslider_y = vtimebar_y + 25;
470         vslider_w = vtimebar_w - vslider_x;
471         vedit_x = 10;
472         vedit_y = vslider_y + 17;
473         vtransport_x = 10;
474         vtransport_y = mwindow->session->vwindow_h - autokeyframe_data[0]->get_h();
475         vtime_x = 370;
476         vtime_y = vedit_y + 10;
477         vtime_w = 150;
482         vzoom_x = vtime_x + 150;
483         vzoom_y = vtime_y;
484         vsource_x = vtime_x + 50;
485         vsource_y = vtransport_y + 5;
492 void DefaultTheme::build_icons()
494         mwindow_icon = new VFrame(get_image("heroine_icon.png"));
495         vwindow_icon = new VFrame(get_image("heroine_icon.png"));
496         cwindow_icon = new VFrame(get_image("heroine_icon.png"));
497         awindow_icon = new VFrame(get_image("heroine_icon.png"));
498         record_icon = new VFrame(get_image("heroine_icon.png"));
499         clip_icon = new VFrame(get_image("clip_icon.png"));
504 void DefaultTheme::build_bg_data()
506 // Audio settings
507         channel_bg_data = new VFrame(get_image("channel_bg.png"));
508         channel_position_data = new VFrame(get_image("channel_position.png"));
510 // Track bitmaps
511         resource1024_bg_data = new VFrame(get_image("resource1024.png"));
512         resource512_bg_data = new VFrame(get_image("resource512.png"));
513         resource256_bg_data = new VFrame(get_image("resource256.png"));
514         resource128_bg_data = new VFrame(get_image("resource128.png"));
515         resource64_bg_data = new VFrame(get_image("resource64.png"));
516         resource32_bg_data = new VFrame(get_image("resource32.png"));
517         plugin_bg_data = new VFrame(get_image("plugin_bg.png"));
518         title_bg_data = new VFrame(get_image("title_bg.png"));
519         vtimebar_bg_data = new VFrame(get_image("vwindow_timebar.png"));
523 void DefaultTheme::build_patches()
525         static VFrame *default_drawpatch_data[] = { new VFrame(get_image("drawpatch_up.png")), new VFrame(get_image("drawpatch_hi.png")), new VFrame(get_image("drawpatch_checked.png")), new VFrame(get_image("drawpatch_dn.png")), new VFrame(get_image("drawpatch_checkedhi.png")) };
526         static VFrame *default_expandpatch_data[] = { new VFrame(get_image("expandpatch_up.png")), new VFrame(get_image("expandpatch_hi.png")), new VFrame(get_image("expandpatch_checked.png")), new VFrame(get_image("expandpatch_dn.png")), new VFrame(get_image("expandpatch_checkedhi.png")) };
527         static VFrame *default_gangpatch_data[] = { new VFrame(get_image("gangpatch_up.png")), new VFrame(get_image("gangpatch_hi.png")), new VFrame(get_image("gangpatch_checked.png")), new VFrame(get_image("gangpatch_dn.png")), new VFrame(get_image("gangpatch_checkedhi.png")) };
528         static VFrame *default_mutepatch_data[] = { new VFrame(get_image("mutepatch_up.png")), new VFrame(get_image("mutepatch_hi.png")), new VFrame(get_image("mutepatch_checked.png")), new VFrame(get_image("mutepatch_dn.png")), new VFrame(get_image("mutepatch_checkedhi.png")) };
529         static VFrame *default_patchbay_bg = new VFrame(get_image("patchbay_bg.png"));
530         static VFrame *default_playpatch_data[] = { new VFrame(get_image("playpatch_up.png")), new VFrame(get_image("playpatch_hi.png")), new VFrame(get_image("playpatch_checked.png")), new VFrame(get_image("playpatch_dn.png")), new VFrame(get_image("playpatch_checkedhi.png")) };
531         static VFrame *default_recordpatch_data[] = { new VFrame(get_image("recordpatch_up.png")), new VFrame(get_image("recordpatch_hi.png")), new VFrame(get_image("recordpatch_checked.png")), new VFrame(get_image("recordpatch_dn.png")), new VFrame(get_image("recordpatch_checkedhi.png")) };
534         drawpatch_data = default_drawpatch_data;
535         expandpatch_data = default_expandpatch_data;
536         gangpatch_data = default_gangpatch_data;
537         mutepatch_data = default_mutepatch_data;
538         patchbay_bg = default_patchbay_bg;
539         playpatch_data = default_playpatch_data;
540         recordpatch_data = default_recordpatch_data;
543 void DefaultTheme::build_overlays()
545         keyframe_data = new VFrame(get_image("keyframe3.png"));
546         camerakeyframe_data = new VFrame(get_image("camerakeyframe.png"));
547         maskkeyframe_data = new VFrame(get_image("maskkeyframe.png"));
548         modekeyframe_data = new VFrame(get_image("modekeyframe.png"));
549         pankeyframe_data = new VFrame(get_image("pankeyframe.png"));
550         projectorkeyframe_data = new VFrame(get_image("projectorkeyframe.png"));
561 void DefaultTheme::draw_rwindow_bg(RecordGUI *gui)
563         int y;
564         int margin = 50;
565         int margin2 = 80;
566         gui->draw_9segment(recordgui_batch_x - margin,
567                 0,
568                 mwindow->session->rwindow_w - recordgui_status_x + margin,
569                 recordgui_buttons_y,
570                 rgui_batch);
571         gui->draw_3segmenth(recordgui_options_x - margin2,
572                 recordgui_buttons_y - 5,
573                 mwindow->session->rwindow_w - recordgui_options_x + margin2,
574                 rgui_controls);
575         y = recordgui_buttons_y - 5 + rgui_controls->get_h();
576         gui->draw_9segment(0,
577                 y,
578                 mwindow->session->rwindow_w,
579                 mwindow->session->rwindow_h - y,
580                 rgui_list);
583 void DefaultTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
585         int margin = 45;
586         int panel_w = 300;
587         int x = rmonitor_meter_x - margin;
588         int w = mwindow->session->rmonitor_w - x;
589         if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
590         gui->clear_box(0, 
591                 0, 
592                 mwindow->session->rmonitor_w, 
593                 mwindow->session->rmonitor_h);
594         gui->draw_9segment(x,
595                 0,
596                 w,
597                 mwindow->session->rmonitor_h,
598                 rmonitor_meters);
606 void DefaultTheme::draw_mwindow_bg(MWindowGUI *gui)
608 // Button bar
609         gui->draw_3segmenth(mbuttons_x, 
610                 mbuttons_y, 
611                 750, 
612                 mbutton_left);
613         gui->draw_3segmenth(mbuttons_x + 750, 
614                 mbuttons_y, 
615                 mbuttons_w - 500, 
616                 mbutton_right);
618 // Clock
619         gui->draw_3segmenth(0, 
620                 mbuttons_y + mbutton_left->get_h(),
621                 patchbay_bg->get_w(), 
622                 clock_bg);
624 // Patchbay
625         gui->draw_3segmentv(patchbay_x, 
626                 patchbay_y, 
627                 patchbay_h + 10, 
628                 patchbay_bg);
630 // Track canvas
631         gui->draw_9segment(mcanvas_x, 
632                 mcanvas_y, 
633                 mcanvas_w, 
634                 patchbay_h + 10, 
635                 tracks_bg);
637 // Timebar
638         gui->draw_3segmenth(mtimebar_x, 
639                 mtimebar_y, 
640                 mtimebar_w, 
641                 timebar_bg_data);
643 // Zoombar
644         int zoombar_center = 710;
645         gui->draw_3segmenth(mzoom_x, 
646                 mzoom_y,
647                 zoombar_center, 
648                 zoombar_left);
649         if(mzoom_w > zoombar_center)
650                 gui->draw_3segmenth(mzoom_x + zoombar_center, 
651                         mzoom_y, 
652                         mzoom_w - zoombar_center, 
653                         zoombar_right);
655 // Status
656         gui->draw_3segmenth(mstatus_x, 
657                 mstatus_y,
658                 zoombar_center, 
659                 statusbar_left);
661         if(mstatus_w > zoombar_center)
662                 gui->draw_3segmenth(mstatus_x + zoombar_center, 
663                         mstatus_y,
664                         mstatus_w - zoombar_center, 
665                         statusbar_right);
668 void DefaultTheme::draw_cwindow_bg(CWindowGUI *gui)
670         const int button_division = 530;
671         gui->draw_3segmentv(0, 0, ccomposite_h, cpanel_bg);
672         gui->draw_3segmenth(0, ccomposite_h, button_division, cbuttons_left);
673         if(mwindow->edl->session->cwindow_meter)
674         {
675                 gui->draw_3segmenth(button_division, 
676                         ccomposite_h, 
677                         cmeter_x - CWINDOW_METER_MARGIN - button_division, 
678                         cbuttons_right);
679                 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN, 
680                         0, 
681                         mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN, 
682                         mwindow->session->cwindow_h, 
683                         cmeter_bg);
684         }
685         else
686         {
687                 gui->draw_3segmenth(button_division, 
688                         ccomposite_h, 
689                         cmeter_x - CWINDOW_METER_MARGIN - button_division + 100, 
690                         cbuttons_right);
691         }
694 void DefaultTheme::draw_vwindow_bg(VWindowGUI *gui)
696         const int button_division = 400;
697         gui->draw_3segmenth(0, vcanvas_h, button_division, vbuttons_left);
698         if(mwindow->edl->session->vwindow_meter)
699         {
700                 gui->draw_3segmenth(button_division, 
701                         vcanvas_h, 
702                         vmeter_x - VWINDOW_METER_MARGIN - button_division, 
703                         vbuttons_right);
704                 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
705                         0,
706                         mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN, 
707                         mwindow->session->vwindow_h, 
708                         vmeter_bg);
709         }
710         else
711         {
712                 gui->draw_3segmenth(button_division, 
713                         vcanvas_h, 
714                         vmeter_x - VWINDOW_METER_MARGIN - button_division + 100, 
715                         vbuttons_right);
716         }
719 void DefaultTheme::get_preferences_sizes()
724 void DefaultTheme::draw_preferences_bg(PreferencesWindow *gui)
726         gui->draw_9segment(0, 0, gui->get_w(), gui->get_h() - 40, preferences_bg);
729 void DefaultTheme::get_new_sizes(NewWindow *gui)
733 void DefaultTheme::draw_new_bg(NewWindow *gui)
735         gui->draw_vframe(new_bg, 0, 0);
738 void DefaultTheme::draw_setformat_bg(SetFormatWindow *gui)
740         gui->draw_vframe(setformat_bg, 0, 0);