00001 #include "bcsignals.h"
00002 #include "clip.h"
00003 #include "cwindowgui.h"
00004 #include "suv.h"
00005 #include "edl.h"
00006 #include "edlsession.h"
00007 #include "mainmenu.h"
00008 #include "mainsession.h"
00009 #include "mbuttons.h"
00010 #include "meterpanel.h"
00011 #include "mwindow.h"
00012 #include "mwindowgui.h"
00013 #include "new.h"
00014 #include "patchbay.h"
00015 #include "preferencesthread.h"
00016 #include "recordgui.h"
00017 #include "recordmonitor.h"
00018 #include "setformat.h"
00019 #include "statusbar.h"
00020 #include "timebar.h"
00021 #include "trackcanvas.h"
00022 #include "vframe.h"
00023 #include "vwindowgui.h"
00024
00025
00026
00027
00028 PluginClient* new_plugin(PluginServer *server)
00029 {
00030 return new SUVMain(server);
00031 }
00032
00033
00034
00035
00036
00037
00038
00039 SUVMain::SUVMain(PluginServer *server)
00040 : PluginTClient(server)
00041 {
00042 }
00043
00044 SUVMain::~SUVMain()
00045 {
00046 }
00047
00048 char* SUVMain::plugin_title()
00049 {
00050 return "S.U.V.";
00051 }
00052
00053 Theme* SUVMain::new_theme()
00054 {
00055 theme = new SUV;
00056 extern unsigned char _binary_suv_data_start[];
00057 theme->set_data(_binary_suv_data_start);
00058 return theme;
00059 }
00060
00061
00062
00063
00064
00065
00066
00067
00068 SUV::SUV()
00069 : Theme()
00070 {
00071 }
00072
00073 SUV::~SUV()
00074 {
00075 }
00076
00077 void SUV::initialize()
00078 {
00079 BC_Resources *resources = BC_WindowBase::get_resources();
00080
00081
00082 resources->text_default = 0xbfbfbf;
00083 resources->text_background = 0x373737;
00084 resources->text_border1 = 0x202020;
00085 resources->text_border2 = 0x373737;
00086 resources->text_border3 = 0x373737;
00087 resources->text_border4 = 0x969696;
00088 resources->text_inactive_highlight = 0x707070;
00089
00090 resources->bg_color = 0x484848;
00091 resources->default_text_color = 0xbfbfbf;
00092 resources->menu_title_text = 0xbfbfbf;
00093 resources->popup_title_text = 0xbfbfbf;
00094 resources->menu_item_text = 0xbfbfbf;
00095 resources->menu_highlighted_fontcolor = WHITE;
00096 resources->generic_button_margin = 30;
00097 resources->pot_needle_color = resources->text_default;
00098 resources->pot_offset = 1;
00099 resources->progress_text = resources->text_default;
00100 resources->meter_font_color = resources->default_text_color;
00101
00102 resources->menu_light = 0xababab;
00103 resources->menu_highlighted = 0x6f6f6f;
00104 resources->menu_down = 0x4b4b4b;
00105 resources->menu_up = 0x4b4b4b;
00106 resources->menu_shadow = 0x202020;
00107 resources->popupmenu_margin = 10;
00108 resources->popupmenu_triangle_margin = 15;
00109
00110 resources->listbox_title_color = 0xbfbfbf;
00111
00112 resources->listbox_title_margin = 20;
00113 resources->listbox_title_hotspot = 20;
00114 resources->listbox_border1 = 0x1a1a1a;
00115 resources->listbox_border2 = 0x373737;
00116 resources->listbox_border3 = 0x373737;
00117 resources->listbox_border4 = 0x646464;
00118 resources->listbox_highlighted = 0x505050;
00119 resources->listbox_inactive = 0x373737;
00120 resources->listbox_bg = 0;
00121 resources->listbox_text = 0xbfbfbf;
00122
00123 resources->filebox_margin = 130;
00124 resources->file_color = 0xbfbfbf;
00125 resources->directory_color = 0xa0a0ff;
00126
00127
00128
00129
00130 resources->filebox_icons_images = new_button("icons.png",
00131 "fileboxbutton_up.png",
00132 "fileboxbutton_hi.png",
00133 "fileboxbutton_dn.png");
00134
00135 resources->filebox_text_images = new_button("text.png",
00136 "fileboxbutton_up.png",
00137 "fileboxbutton_hi.png",
00138 "fileboxbutton_dn.png");
00139
00140 resources->filebox_newfolder_images = new_button("folder.png",
00141 "fileboxbutton_up.png",
00142 "fileboxbutton_hi.png",
00143 "fileboxbutton_dn.png");
00144
00145 resources->filebox_updir_images = new_button("updir.png",
00146 "fileboxbutton_up.png",
00147 "fileboxbutton_hi.png",
00148 "fileboxbutton_dn.png");
00149
00150 resources->filebox_delete_images = new_button("delete.png",
00151 "fileboxbutton_up.png",
00152 "fileboxbutton_hi.png",
00153 "fileboxbutton_dn.png");
00154
00155 resources->filebox_reload_images = new_button("reload.png",
00156 "fileboxbutton_up.png",
00157 "fileboxbutton_hi.png",
00158 "fileboxbutton_dn.png");
00159
00160
00161 resources->filebox_descend_images = new_button("openfolder.png",
00162 "filebox_bigbutton_up.png",
00163 "filebox_bigbutton_hi.png",
00164 "filebox_bigbutton_dn.png");
00165
00166 resources->usethis_button_images =
00167 resources->ok_images = new_button("ok.png",
00168 "filebox_bigbutton_up.png",
00169 "filebox_bigbutton_hi.png",
00170 "filebox_bigbutton_dn.png");
00171
00172 new_button("ok.png",
00173 "new_bigbutton_up.png",
00174 "new_bigbutton_hi.png",
00175 "new_bigbutton_dn.png",
00176 "new_ok_images");
00177
00178 resources->cancel_images = new_button("cancel.png",
00179 "filebox_bigbutton_up.png",
00180 "filebox_bigbutton_hi.png",
00181 "filebox_bigbutton_dn.png");
00182
00183 new_button("cancel.png",
00184 "new_bigbutton_up.png",
00185 "new_bigbutton_hi.png",
00186 "new_bigbutton_dn.png",
00187 "new_cancel_images");
00188
00189 resources->bar_data = new_image("bar", "bar.png");
00190
00191
00192 resources->min_menu_w = 96;
00193 resources->menu_popup_bg = new_image("menu_popup_bg.png");
00194 resources->menu_item_bg = new_image_set(3,
00195 "menuitem_up.png",
00196 "menuitem_hi.png",
00197 "menuitem_dn.png");
00198 resources->menu_bar_bg = new_image("menubar_bg.png");
00199 resources->menu_title_bg = new_image_set(3,
00200 "menubar_up.png",
00201 "menubar_hi.png",
00202 "menubar_dn.png");
00203
00204
00205 resources->popupmenu_images = 0;
00206
00207
00208
00209
00210
00211 resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
00212 "text_highlight.png");
00213
00214 resources->generic_button_images = new_image_set(3,
00215 "generic_up.png",
00216 "generic_hi.png",
00217 "generic_dn.png");
00218 resources->horizontal_slider_data = new_image_set(6,
00219 "hslider_fg_up.png",
00220 "hslider_fg_hi.png",
00221 "hslider_fg_dn.png",
00222 "hslider_bg_up.png",
00223 "hslider_bg_hi.png",
00224 "hslider_bg_dn.png");
00225 resources->progress_images = new_image_set(2,
00226 "progress_bg.png",
00227 "progress_hi.png");
00228 resources->tumble_data = new_image_set(4,
00229 "tumble_up.png",
00230 "tumble_hi.png",
00231 "tumble_bottom.png",
00232 "tumble_top.png");
00233 resources->listbox_button = new_button4("listbox_button.png",
00234 "editpanel_up.png",
00235 "editpanel_hi.png",
00236 "editpanel_dn.png",
00237 "editpanel_hi.png");
00238 resources->listbox_column = new_image_set(3,
00239 "column_up.png",
00240 "column_hi.png",
00241 "column_dn.png");
00242 resources->listbox_up = new_image("listbox_up.png");
00243 resources->listbox_dn = new_image("listbox_dn.png");
00244 resources->pan_data = new_image_set(7,
00245 "pan_up.png",
00246 "pan_hi.png",
00247 "pan_popup.png",
00248 "pan_channel.png",
00249 "pan_stick.png",
00250 "pan_channel_small.png",
00251 "pan_stick_small.png");
00252 resources->pan_text_color = WHITE;
00253
00254 resources->pot_images = new_image_set(3,
00255 "pot_up.png",
00256 "pot_hi.png",
00257 "pot_dn.png");
00258
00259 resources->checkbox_images = new_image_set(5,
00260 "checkbox_up.png",
00261 "checkbox_hi.png",
00262 "checkbox_checked.png",
00263 "checkbox_dn.png",
00264 "checkbox_checkedhi.png");
00265
00266 resources->radial_images = new_image_set(5,
00267 "radial_up.png",
00268 "radial_hi.png",
00269 "radial_checked.png",
00270 "radial_dn.png",
00271 "radial_checkedhi.png");
00272
00273 resources->xmeter_images = new_image_set(6,
00274 "xmeter_normal.png",
00275 "xmeter_green.png",
00276 "xmeter_red.png",
00277 "xmeter_yellow.png",
00278 "xmeter_white.png",
00279 "xmeter_over.png");
00280 resources->ymeter_images = new_image_set(6,
00281 "ymeter_normal.png",
00282 "ymeter_green.png",
00283 "ymeter_red.png",
00284 "ymeter_yellow.png",
00285 "ymeter_white.png",
00286 "ymeter_over.png");
00287
00288 resources->hscroll_data = new_image_set(10,
00289 "hscroll_handle_up.png",
00290 "hscroll_handle_hi.png",
00291 "hscroll_handle_dn.png",
00292 "hscroll_handle_bg.png",
00293 "hscroll_left_up.png",
00294 "hscroll_left_hi.png",
00295 "hscroll_left_dn.png",
00296 "hscroll_right_up.png",
00297 "hscroll_right_hi.png",
00298 "hscroll_right_dn.png");
00299
00300 resources->vscroll_data = new_image_set(10,
00301 "vscroll_handle_up.png",
00302 "vscroll_handle_hi.png",
00303 "vscroll_handle_dn.png",
00304 "vscroll_handle_bg.png",
00305 "vscroll_left_up.png",
00306 "vscroll_left_hi.png",
00307 "vscroll_left_dn.png",
00308 "vscroll_right_up.png",
00309 "vscroll_right_hi.png",
00310 "vscroll_right_dn.png");
00311
00312
00313 new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
00314 new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
00315 new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
00316 new_button("swap_extents.png",
00317 "editpanel_up.png",
00318 "editpanel_hi.png",
00319 "editpanel_dn.png",
00320 "swap_extents");
00321
00322
00323
00324 rgui_batch = new_image("recordgui_batch.png");
00325 rgui_controls = new_image("recordgui_controls.png");
00326 rgui_list = new_image("recordgui_list.png");
00327 rmonitor_panel = new_image("recordmonitor_panel.png");
00328 rmonitor_meters = new_image("recordmonitor_meters.png");
00329
00330
00331 preferences_category_overlap = 0;
00332 preferencescategory_x = 0;
00333 preferencescategory_y = 5;
00334 preferencestitle_x = 5;
00335 preferencestitle_y = 10;
00336 preferencesoptions_x = 5;
00337 preferencesoptions_y = 0;
00338
00339
00340 message_normal = resources->text_default;
00341 audio_color = GREEN;
00342 mtransport_margin = 10;
00343 toggle_margin = 10;
00344
00345 new_image("mbutton_bg", "mbutton_bg.png");
00346 new_image("timebar_bg", "timebar_bg_flat.png");
00347 new_image("timebar_brender", "timebar_brender.png");
00348 new_image("clock_bg", "mclock_flat.png");
00349 new_image("patchbay_bg", "patchbay_bg.png");
00350 new_image("statusbar", "statusbar.png");
00351 new_image("mscroll_filler", "mscroll_filler.png");
00352
00353 new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
00354 new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
00355
00356 new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
00357 new_image("mode_add", "mode_add.png");
00358 new_image("mode_divide", "mode_divide.png");
00359 new_image("mode_multiply", "mode_multiply.png");
00360 new_image("mode_normal", "mode_normal.png");
00361 new_image("mode_replace", "mode_replace.png");
00362 new_image("mode_subtract", "mode_subtract.png");
00363 new_image("mode_max", "mode_max.png");
00364
00365 new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
00366 new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
00367
00368
00369 new_image("cpanel_bg", "cpanel_bg.png");
00370 new_image("cbuttons_left", "cbuttons_left.png");
00371 new_image("cbuttons_right", "cbuttons_right.png");
00372 new_image("cmeter_bg", "cmeter_bg.png");
00373
00374
00375 new_image("vbuttons_left", "vbuttons_left.png");
00376 new_image("vclock", "vclock.png");
00377
00378 new_image("preferences_bg", "preferences_bg.png");
00379
00380
00381 new_image("new_bg", "new_bg.png");
00382 new_image("setformat_bg", "setformat_bg.png");
00383
00384
00385 timebar_view_data = new_image("timebar_view.png");
00386
00387 setformat_w = get_image("setformat_bg")->get_w();
00388 setformat_h = get_image("setformat_bg")->get_h();
00389 setformat_x1 = 15;
00390 setformat_x2 = 100;
00391
00392 setformat_x3 = 315;
00393 setformat_x4 = 415;
00394 setformat_y1 = 20;
00395 setformat_y2 = 85;
00396 setformat_y3 = 125;
00397 setformat_margin = 30;
00398 setformat_channels_x = 25;
00399 setformat_channels_y = 242;
00400 setformat_channels_w = 250;
00401 setformat_channels_h = 250;
00402
00403 loadfile_pad = 50;
00404 browse_pad = 20;
00405
00406
00407 new_toggle("playpatch.png",
00408 "patch_up.png",
00409 "patch_hi.png",
00410 "patch_checked.png",
00411 "patch_dn.png",
00412 "patch_checkedhi.png",
00413 "playpatch_data");
00414
00415 new_toggle("recordpatch.png",
00416 "patch_up.png",
00417 "patch_hi.png",
00418 "patch_checked.png",
00419 "patch_dn.png",
00420 "patch_checkedhi.png",
00421 "recordpatch_data");
00422
00423 new_toggle("gangpatch.png",
00424 "patch_up.png",
00425 "patch_hi.png",
00426 "patch_checked.png",
00427 "patch_dn.png",
00428 "patch_checkedhi.png",
00429 "gangpatch_data");
00430
00431 new_toggle("drawpatch.png",
00432 "patch_up.png",
00433 "patch_hi.png",
00434 "patch_checked.png",
00435 "patch_dn.png",
00436 "patch_checkedhi.png",
00437 "drawpatch_data");
00438
00439
00440 new_image_set("mutepatch_data",
00441 5,
00442 "mutepatch_up.png",
00443 "mutepatch_hi.png",
00444 "mutepatch_checked.png",
00445 "mutepatch_dn.png",
00446 "mutepatch_checkedhi.png");
00447
00448 new_image_set("expandpatch_data",
00449 5,
00450 "expandpatch_up.png",
00451 "expandpatch_hi.png",
00452 "expandpatch_checked.png",
00453 "expandpatch_dn.png",
00454 "expandpatch_checkedhi.png");
00455
00456 build_icons();
00457 build_bg_data();
00458 build_overlays();
00459
00460
00461
00462
00463 out_point = new_image_set(5,
00464 "out_up.png",
00465 "out_hi.png",
00466 "out_checked.png",
00467 "out_dn.png",
00468 "out_checkedhi.png");
00469 in_point = new_image_set(5,
00470 "in_up.png",
00471 "in_hi.png",
00472 "in_checked.png",
00473 "in_dn.png",
00474 "in_checkedhi.png");
00475
00476 label_toggle = new_image_set(5,
00477 "labeltoggle_up.png",
00478 "labeltoggle_uphi.png",
00479 "label_checked.png",
00480 "labeltoggle_dn.png",
00481 "label_checkedhi.png");
00482
00483
00484 statusbar_cancel_data = new_image_set(3,
00485 "statusbar_cancel_up.png",
00486 "statusbar_cancel_hi.png",
00487 "statusbar_cancel_dn.png");
00488
00489
00490 VFrame *editpanel_up = new_image("editpanel_up.png");
00491 VFrame *editpanel_hi = new_image("editpanel_hi.png");
00492 VFrame *editpanel_dn = new_image("editpanel_dn.png");
00493 VFrame *editpanel_checked = new_image("editpanel_checked.png");
00494 VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
00495
00496 new_image("panel_divider", "panel_divider.png");
00497 new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
00498 new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
00499 new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
00500
00501
00502 new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
00503 new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
00504 new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
00505 new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
00506 new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
00507 new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
00508 new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
00509 new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
00510 new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
00511 new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
00512 new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
00513 over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
00514 overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
00515 new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
00516 new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
00517 new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
00518 new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
00519 splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
00520 new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
00521 new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
00522 new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
00523 new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
00524 new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
00525
00526
00527 VFrame *transport_up = new_image("transportup.png");
00528 VFrame *transport_hi = new_image("transporthi.png");
00529 VFrame *transport_dn = new_image("transportdn.png");
00530
00531 new_button("end.png", transport_up, transport_hi, transport_dn, "end");
00532 new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd");
00533 new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev");
00534 new_button("play.png", transport_up, transport_hi, transport_dn, "play");
00535 new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd");
00536 new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev");
00537 new_button("pause.png", transport_up, transport_hi, transport_dn, "pause");
00538 new_button("record.png", transport_up, transport_hi, transport_dn, "record");
00539 new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe");
00540 new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse");
00541 new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind");
00542 new_button("stop.png", transport_up, transport_hi, transport_dn, "stop");
00543 new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec");
00544
00545
00546
00547
00548 new_image("cwindow_inactive", "cwindow_inactive.png");
00549 new_image("cwindow_active", "cwindow_active.png");
00550
00551
00552 new_image_set("batch_render_start",
00553 3,
00554 "batchstart_up.png",
00555 "batchstart_hi.png",
00556 "batchstart_dn.png");
00557 new_image_set("batch_render_stop",
00558 3,
00559 "batchstop_up.png",
00560 "batchstop_hi.png",
00561 "batchstop_dn.png");
00562 new_image_set("batch_render_cancel",
00563 3,
00564 "batchcancel_up.png",
00565 "batchcancel_hi.png",
00566 "batchcancel_dn.png");
00567
00568 new_image_set("category_button",
00569 3,
00570 "preferencesbutton_dn.png",
00571 "preferencesbutton_dnhi.png",
00572 "preferencesbutton_dnlo.png");
00573
00574 new_image_set("category_button_checked",
00575 3,
00576 "preferencesbutton_up.png",
00577 "preferencesbutton_uphi.png",
00578 "preferencesbutton_dnlo.png");
00579
00580
00581
00582
00583
00584
00585 new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
00586 new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
00587 new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
00588 new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
00589 new_toggle("blank30x30.png",
00590 new_image("locklabels_locked.png"),
00591 new_image("locklabels_lockedhi.png"),
00592 new_image("locklabels_unlocked.png"),
00593 new_image("locklabels_dn.png"),
00594 new_image("locklabels_unlockedhi.png"),
00595 "locklabels");
00596
00597 VFrame *cpanel_up = new_image("cpanel_up.png");
00598 VFrame *cpanel_hi = new_image("cpanel_hi.png");
00599 VFrame *cpanel_dn = new_image("cpanel_dn.png");
00600 VFrame *cpanel_checked = new_image("cpanel_checked.png");
00601 VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
00602
00603
00604 new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
00605 new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
00606 new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
00607 new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
00608 new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
00609 new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
00610 new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
00611 new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
00612 new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
00613
00614
00615
00616 flush_images();
00617
00618 title_font = MEDIUMFONT_3D;
00619 title_color = 0xbfbfbf;
00620 recordgui_fixed_color = YELLOW;
00621 recordgui_variable_color = RED;
00622
00623 channel_position_color = MEYELLOW;
00624 resources->meter_title_w = 25;
00625 }
00626
00627 #define CWINDOW_METER_MARGIN 5
00628 #define VWINDOW_METER_MARGIN 5
00629
00630 void SUV::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
00631 {
00632 mbuttons_x = 0;
00633 mbuttons_y = gui->mainmenu->get_h() + 1;
00634 mbuttons_w = w;
00635 mbuttons_h = get_image("mbutton_bg")->get_h();
00636 mclock_x = 10;
00637 mclock_y = mbuttons_y - 1 + mbuttons_h + CWINDOW_METER_MARGIN;
00638 mclock_w = get_image("clock_bg")->get_w() - 40;
00639 mclock_h = get_image("clock_bg")->get_h();
00640 mtimebar_x = get_image("patchbay_bg")->get_w();
00641 mtimebar_y = mbuttons_y - 1 + mbuttons_h;
00642 mtimebar_w = w - mtimebar_x;
00643 mtimebar_h = get_image("timebar_bg")->get_h();
00644 mzoom_h = 25;
00645 mzoom_x = 0;
00646 mzoom_y = h - get_image("statusbar")->get_h();
00647 mzoom_w = w;
00648 mstatus_x = 0;
00649 mstatus_y = mzoom_y + mzoom_h;
00650 mstatus_w = w;
00651 mstatus_h = h - mstatus_y;
00652 mstatus_message_x = 10;
00653 mstatus_message_y = 5;
00654 mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 240;
00655 mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h() - 3;
00656 mstatus_progress_w = 230;
00657 mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
00658 mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
00659 patchbay_x = 0;
00660 patchbay_y = mtimebar_y + mtimebar_h;
00661 patchbay_w = get_image("patchbay_bg")->get_w();
00662 patchbay_h = mzoom_y - patchbay_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
00663 mcanvas_x = patchbay_x + patchbay_w;
00664 mcanvas_y = mtimebar_y + mtimebar_h;
00665 mcanvas_w = w - patchbay_w - BC_ScrollBar::get_span(SCROLL_VERT);
00666 mcanvas_h = patchbay_h;
00667 mhscroll_x = 0;
00668 mhscroll_y = mcanvas_y + mcanvas_h;
00669 mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT);
00670 mvscroll_x = mcanvas_x + mcanvas_w;
00671 mvscroll_y = mcanvas_y;
00672 mvscroll_h = mcanvas_h;
00673 }
00674
00675 void SUV::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
00676 {
00677 if(cwindow_controls)
00678 {
00679 SET_TRACE
00680 ccomposite_x = 0;
00681 ccomposite_y = 5;
00682 ccomposite_w = get_image("cpanel_bg")->get_w();
00683 ccomposite_h = mwindow->session->cwindow_h -
00684 get_image("cbuttons_left")->get_h();
00685 cslider_x = 5;
00686 cslider_y = ccomposite_h + 20;
00687 cedit_x = 10;
00688 cedit_y = cslider_y + BC_Slider::get_span(0);
00689 ctransport_x = 10;
00690 ctransport_y = mwindow->session->cwindow_h -
00691 get_image_set("autokeyframe")[0]->get_h() - 5;
00692 ccanvas_x = ccomposite_x + ccomposite_w;
00693 ccanvas_y = 0;
00694 ccanvas_h = ccomposite_h;
00695 cstatus_x = 420;
00696 cstatus_y = mwindow->session->cwindow_h -
00697 get_image("cwindow_active")->get_h() - 30;
00698 if(mwindow->edl->session->cwindow_meter)
00699 {
00700 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
00701 mwindow->edl->session->cwindow_meter);
00702 ccanvas_w = cmeter_x - ccanvas_x - 5;
00703 }
00704 else
00705 {
00706 cmeter_x = mwindow->session->cwindow_w;
00707 ccanvas_w = cmeter_x - ccanvas_x;
00708 }
00709 SET_TRACE
00710 }
00711 else
00712 {
00713 SET_TRACE
00714 ccomposite_x = -get_image("cpanel_bg")->get_w();
00715 ccomposite_y = 0;
00716 ccomposite_w = get_image("cpanel_bg")->get_w();
00717 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
00718
00719 cslider_x = 5;
00720 cslider_y = mwindow->session->cwindow_h;
00721 cedit_x = 10;
00722 cedit_y = cslider_y + 17;
00723 ctransport_x = 10;
00724 ctransport_y = cedit_y + 40;
00725 ccanvas_x = 0;
00726 ccanvas_y = 0;
00727 ccanvas_w = mwindow->session->cwindow_w;
00728 ccanvas_h = mwindow->session->cwindow_h;
00729 cmeter_x = mwindow->session->cwindow_w;
00730 cstatus_x = mwindow->session->cwindow_w;
00731 cstatus_y = mwindow->session->cwindow_h;
00732 SET_TRACE
00733 }
00734
00735 SET_TRACE
00736
00737 czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
00738 czoom_y = ctransport_y + 5;
00739
00740
00741 cmeter_y = 5;
00742 cmeter_h = mwindow->session->cwindow_h - cmeter_y;
00743
00744 cslider_w = ccanvas_x + ccanvas_w - cslider_x - 5;
00745 ctimebar_x = ccanvas_x;
00746 ctimebar_y = ccanvas_y + ccanvas_h;
00747 ctimebar_w = ccanvas_w;
00748 ctimebar_h = 16;
00749
00750
00751
00752 ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
00753 ctime_y = ctransport_y;
00754 cdest_x = czoom_x;
00755 cdest_y = czoom_y + 30;
00756 SET_TRACE
00757 }
00758
00759
00760
00761 void SUV::get_recordgui_sizes(RecordGUI *gui, int w, int h)
00762 {
00763
00764 }
00765
00766 void SUV::get_rmonitor_sizes(int do_audio,
00767 int do_video,
00768 int do_channel,
00769 int do_interlace,
00770 int do_avc,
00771 int audio_channels)
00772 {
00773 Theme::get_rmonitor_sizes(do_audio,
00774 do_video,
00775 do_channel,
00776 do_interlace,
00777 do_avc,
00778 audio_channels);
00779 if(!do_video && do_audio)
00780 {
00781 rmonitor_meter_y -= 30;
00782 rmonitor_meter_h += 30;
00783 }
00784 }
00785
00786
00787 void SUV::get_vwindow_sizes(VWindowGUI *gui)
00788 {
00789 vmeter_y = 5;
00790 vmeter_h = mwindow->session->vwindow_h - cmeter_y;
00791 vcanvas_x = 0;
00792 vcanvas_y = 0;
00793 vcanvas_h = mwindow->session->vwindow_h - get_image("vbuttons_left")->get_h();
00794
00795 if(mwindow->edl->session->vwindow_meter)
00796 {
00797 vmeter_x = mwindow->session->vwindow_w -
00798 VWINDOW_METER_MARGIN -
00799 MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
00800 mwindow->edl->session->vwindow_meter);
00801 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
00802 }
00803 else
00804 {
00805 vmeter_x = mwindow->session->vwindow_w;
00806 vcanvas_w = mwindow->session->vwindow_w;
00807 }
00808
00809 vtimebar_x = vcanvas_x;
00810 vtimebar_y = vcanvas_y + vcanvas_h;
00811 vtimebar_w = vcanvas_w;
00812 vtimebar_h = 16;
00813
00814 vslider_x = 10;
00815 vslider_y = vtimebar_y + 20;
00816 vslider_w = vtimebar_w - vslider_x;
00817 vedit_x = 10;
00818 vedit_y = vslider_y + BC_Slider::get_span(0);
00819 vtransport_x = 10;
00820 vtransport_y = mwindow->session->vwindow_h -
00821 get_image_set("autokeyframe")[0]->get_h() - 5;
00822 vtime_x = 303;
00823 vtime_y = vedit_y + 20;
00824 vtime_w = 150;
00825
00826
00827
00828
00829 vzoom_x = vtime_x + 150;
00830 vzoom_y = vtime_y;
00831 vsource_x = vtime_x + 50;
00832 vsource_y = vtransport_y + 5;
00833 }
00834
00835
00836
00837
00838
00839 void SUV::build_icons()
00840 {
00841 new_image("mwindow_icon", "heroine_icon.png");
00842 new_image("vwindow_icon", "heroine_icon.png");
00843 new_image("cwindow_icon", "heroine_icon.png");
00844 new_image("awindow_icon", "heroine_icon.png");
00845 new_image("record_icon", "heroine_icon.png");
00846 new_image("clip_icon", "clip_icon.png");
00847 }
00848
00849
00850
00851 void SUV::build_bg_data()
00852 {
00853
00854 channel_bg_data = new VFrame(get_image_data("channel_bg.png"));
00855 channel_position_data = new VFrame(get_image_data("channel_position.png"));
00856
00857
00858 new_image("resource1024", "resource1024.png");
00859 new_image("resource512", "resource512.png");
00860 new_image("resource256", "resource256.png");
00861 new_image("resource128", "resource128.png");
00862 new_image("resource64", "resource64.png");
00863 new_image("resource32", "resource32.png");
00864 new_image("plugin_bg_data", "plugin_bg.png");
00865 new_image("title_bg_data", "title_bg.png");
00866 new_image("vtimebar_bg_data", "vwindow_timebar.png");
00867 }
00868
00869
00870
00871 void SUV::build_overlays()
00872 {
00873 keyframe_data = new VFrame(get_image_data("keyframe3.png"));
00874 camerakeyframe_data = new VFrame(get_image_data("camerakeyframe.png"));
00875 maskkeyframe_data = new VFrame(get_image_data("maskkeyframe.png"));
00876 modekeyframe_data = new VFrame(get_image_data("modekeyframe.png"));
00877 pankeyframe_data = new VFrame(get_image_data("pankeyframe.png"));
00878 projectorkeyframe_data = new VFrame(get_image_data("projectorkeyframe.png"));
00879 }
00880
00881
00882
00883
00884
00885
00886
00887
00888
00889 void SUV::draw_rwindow_bg(RecordGUI *gui)
00890 {
00891
00892
00893
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909 }
00910
00911 void SUV::draw_rmonitor_bg(RecordMonitorGUI *gui)
00912 {
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926
00927 }
00928
00929
00930
00931
00932
00933
00934 void SUV::draw_mwindow_bg(MWindowGUI *gui)
00935 {
00936
00937 gui->draw_3segmenth(mbuttons_x,
00938 mbuttons_y - 1,
00939 mwindow->session->mwindow_w,
00940 get_image("mbutton_bg"));
00941
00942 int pdw = get_image("panel_divider")->get_w();
00943 int x = mbuttons_x;
00944 x += 9 * get_image("play")->get_w();
00945 x += mtransport_margin;
00946
00947 gui->draw_vframe(get_image("panel_divider"),
00948 x - toggle_margin / 2 - pdw / 2 + 2,
00949 mbuttons_y - 1);
00950 x += 2 * get_image("arrow")->get_w() + toggle_margin;
00951
00952 gui->draw_vframe(get_image("panel_divider"),
00953 x - toggle_margin / 2 - pdw / 2 + 2,
00954 mbuttons_y - 1);
00955
00956 x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;
00957 gui->draw_vframe(get_image("panel_divider"),
00958 x - toggle_margin / 2 - pdw / 2 + 2,
00959 mbuttons_y - 1);
00960
00961
00962 gui->draw_3segmenth(0,
00963 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
00964 get_image("patchbay_bg")->get_w(),
00965 get_image("clock_bg"));
00966
00967
00968 gui->draw_3segmentv(patchbay_x,
00969 patchbay_y,
00970 patchbay_h,
00971 get_image("patchbay_bg"));
00972
00973
00974 gui->set_color(BLACK);
00975 gui->draw_box(mcanvas_x,
00976 mcanvas_y,
00977 mcanvas_w,
00978 patchbay_h);
00979
00980
00981 gui->draw_3segmenth(mtimebar_x,
00982 mtimebar_y,
00983 mtimebar_w,
00984 get_image("timebar_bg"));
00985
00986
00987 gui->set_color(0x373737);
00988 gui->draw_box(mzoom_x,
00989 mzoom_y,
00990 mwindow->session->mwindow_w,
00991 25);
00992
00993
00994 gui->draw_vframe(get_image("mscroll_filler"),
00995 mhscroll_x + mhscroll_w,
00996 mvscroll_y + mvscroll_h);
00997
00998
00999 gui->draw_3segmenth(mzoom_x,
01000 mzoom_y,
01001 mzoom_w,
01002 get_image("statusbar"));
01003
01004
01005 }
01006
01007 void SUV::draw_cwindow_bg(CWindowGUI *gui)
01008 {
01009 const int button_division = 450;
01010 gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
01011 gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
01012 if(mwindow->edl->session->cwindow_meter)
01013 {
01014 gui->draw_3segmenth(button_division,
01015 ccomposite_h,
01016 cmeter_x - CWINDOW_METER_MARGIN - button_division,
01017 get_image("cbuttons_right"));
01018 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
01019 0,
01020 mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
01021 mwindow->session->cwindow_h,
01022 get_image("cmeter_bg"));
01023 }
01024 else
01025 {
01026 gui->draw_3segmenth(button_division,
01027 ccomposite_h,
01028 cmeter_x - CWINDOW_METER_MARGIN - button_division + 100,
01029 get_image("cbuttons_right"));
01030 }
01031 }
01032
01033 void SUV::draw_vwindow_bg(VWindowGUI *gui)
01034 {
01035 const int button_division = 325;
01036 gui->draw_3segmenth(0,
01037 vcanvas_h,
01038 button_division,
01039 get_image("vbuttons_left"));
01040 if(mwindow->edl->session->vwindow_meter)
01041 {
01042 gui->draw_3segmenth(button_division,
01043 vcanvas_h,
01044 vmeter_x - VWINDOW_METER_MARGIN - button_division,
01045 get_image("cbuttons_right"));
01046 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
01047 0,
01048 mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
01049 mwindow->session->vwindow_h,
01050 get_image("cmeter_bg"));
01051 }
01052 else
01053 {
01054 gui->draw_3segmenth(button_division,
01055 vcanvas_h,
01056 vmeter_x - VWINDOW_METER_MARGIN - button_division + 100,
01057 get_image("cbuttons_right"));
01058 }
01059
01060
01061 gui->draw_3segmenth(vtime_x - 20,
01062 vtime_y - 1,
01063 vtime_w + 40,
01064 get_image("vclock"));
01065 }
01066
01067 void SUV::get_preferences_sizes()
01068 {
01069 }
01070
01071
01072 void SUV::draw_preferences_bg(PreferencesWindow *gui)
01073 {
01074 gui->draw_vframe(get_image("preferences_bg"), 0, 0);
01075 }
01076
01077 void SUV::get_new_sizes(NewWindow *gui)
01078 {
01079 }
01080
01081 void SUV::draw_new_bg(NewWindow *gui)
01082 {
01083 gui->draw_vframe(get_image("new_bg"), 0, 0);
01084 }
01085
01086 void SUV::draw_setformat_bg(SetFormatWindow *gui)
01087 {
01088 gui->draw_vframe(get_image("setformat_bg"), 0, 0);
01089 }
01090
01091
01092 void SUV::get_plugindialog_sizes()
01093 {
01094 int x = 10, y = 30;
01095 plugindialog_new_x = x;
01096 plugindialog_new_y = y;
01097 plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
01098 plugindialog_shared_y = y;
01099 plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
01100 plugindialog_module_y = y;
01101
01102 plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - 10;
01103 plugindialog_new_h = mwindow->session->plugindialog_h - 100;
01104 plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - 10;
01105 plugindialog_shared_h = mwindow->session->plugindialog_h - 100;
01106 plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - 10;
01107 plugindialog_module_h = mwindow->session->plugindialog_h - 100;
01108
01109 plugindialog_newattach_x = plugindialog_new_x + 20;
01110 plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + 10;
01111 plugindialog_sharedattach_x = plugindialog_shared_x + 20;
01112 plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + 10;
01113 plugindialog_moduleattach_x = plugindialog_module_x + 20;
01114 plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + 10;
01115 }
01116
01117
01118
01119
01120