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