igor ru.po
[goodguy/history.git] / cinelerra-5.1 / plugins / theme_blond_cv / blondcvtheme.C.orig
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "bcsignals.h"
23 #include "clip.h"
24 #include "cwindowgui.h"
25 #include "defaulttheme.h"
26 #include "edl.h"
27 #include "edlsession.h"
28 #include "mainmenu.h"
29 #include "mainsession.h"
30 #include "mbuttons.h"
31 #include "meterpanel.h"
32 #include "mwindow.h"
33 #include "mwindowgui.h"
34 #include "new.h"
35 #include "patchbay.h"
36 #include "preferencesthread.h"
37 #include "recordgui.h"
38 #include "recordmonitor.h"
39 #include "setformat.h"
40 #include "statusbar.h"
41 #include "timebar.h"
42 #include "trackcanvas.h"
43 #include "vframe.h"
44 #include "vwindowgui.h"
45
46
47
48
49 PluginClient* new_plugin(PluginServer *server)
50 {
51         return new BlondThemeMain(server);
52 }
53
54
55
56
57
58
59
60 BlondThemeMain::BlondThemeMain(PluginServer *server)
61  : PluginTClient(server)
62 {
63 }
64
65 BlondThemeMain::~BlondThemeMain()
66 {
67 }
68
69 const char* BlondThemeMain::plugin_title()
70 {
71         return _("Blond-cv");
72 }
73
74 Theme* BlondThemeMain::new_theme()
75 {
76         theme = new BlondTheme;
77         extern unsigned char _binary_defaulttheme_data_start[];
78         theme->set_data(_binary_defaulttheme_data_start);
79         return theme;
80 }
81
82
83
84
85
86
87
88
89 BlondTheme::BlondTheme()
90  : Theme()
91 {
92 }
93
94 BlondTheme::~BlondTheme()
95 {
96 }
97
98 void BlondTheme::initialize()
99 {
100         BC_Resources *resources = BC_WindowBase::get_resources();
101
102
103         resources->text_default = 0x000000;
104         resources->text_background = 0xffffff;
105         resources->text_border1 = 0x4a484a; // (top outer)
106         resources->text_border2 = 0x000000; // (top inner)
107         resources->text_border3 = 0xacaeac; // (bottom inner)
108         resources->text_border4 = 0xffffff; // (bottom outer)
109         resources->text_inactive_highlight = 0xacacac;
110
111         resources->bg_color = BLOND;
112         resources->default_text_color = 0x000000;
113         resources->menu_title_text    = 0x000000;
114         resources->popup_title_text   = 0x000000;
115         resources->menu_item_text     = 0x000000;
116
117         resources->generic_button_margin = 15;
118         resources->pot_needle_color = resources->text_default;
119         resources->pot_offset = 1;
120         resources->progress_text = resources->text_default;
121         resources->meter_font_color = RED;
122
123         resources->menu_light = 0x00cacd;
124         resources->menu_highlighted = 0x9c95ff;
125         resources->menu_down = 0x007d7b;
126         resources->menu_up = 0x009594;
127         resources->menu_shadow = 0x004a4a;
128         resources->popupmenu_margin = 10;          // ugly
129         resources->popupmenu_triangle_margin = 15; // ugly
130
131         resources->listbox_title_color = 0x000000;
132
133         resources->listbox_title_margin = 0;
134         resources->listbox_title_hotspot = 5;  // No. of pixels around the borders to allow dragging
135         resources->listbox_border1 = 0x4a484a; // (top outer)
136         resources->listbox_border2 = 0x000000; // (top inner)
137         resources->listbox_border3 = 0xffe200; // (bottom inner)
138         resources->listbox_border4 = 0xffffff; // (bottom outer)
139         resources->listbox_highlighted = 0xeee6ee;
140         resources->listbox_inactive = 0xffffffff; // (background)
141         resources->listbox_bg = new_image("list_bg.png");
142         resources->listbox_text = 0x000000;
143
144         resources->dirbox_margin = 50;
145         resources->filebox_margin = 101;
146         resources->file_color = 0x000000;
147         resources->directory_color = 0x0000ff;
148
149
150
151
152         resources->filebox_icons_images = new_button("icons.png",
153                 "fileboxbutton_up.png",
154                 "fileboxbutton_hi.png",
155                 "fileboxbutton_dn.png");
156
157         resources->filebox_text_images = new_button("text.png",
158                 "fileboxbutton_up.png",
159                 "fileboxbutton_hi.png",
160                 "fileboxbutton_dn.png");
161
162         resources->filebox_newfolder_images = new_button("folder.png",
163                 "fileboxbutton_up.png",
164                 "fileboxbutton_hi.png",
165                 "fileboxbutton_dn.png");
166
167         resources->filebox_updir_images = new_button("updir.png",
168                 "fileboxbutton_up.png",
169                 "fileboxbutton_hi.png",
170                 "fileboxbutton_dn.png");
171
172         resources->filebox_delete_images = new_button("delete.png",
173                 "fileboxbutton_up.png",
174                 "fileboxbutton_hi.png",
175                 "fileboxbutton_dn.png");
176
177         resources->filebox_reload_images = new_button("reload.png",
178                 "fileboxbutton_up.png",
179                 "fileboxbutton_hi.png",
180                 "fileboxbutton_dn.png");
181
182
183         resources->filebox_descend_images = new_button("openfolder.png",
184                 "generic_up.png",
185                 "generic_hi.png",
186                 "generic_dn.png");
187
188         resources->usethis_button_images =
189                 resources->ok_images = new_button("ok.png",
190                 "generic_up.png",
191                 "generic_hi.png",
192                 "generic_dn.png");
193
194         new_button("ok.png",
195                 "generic_up.png",
196                 "generic_hi.png",
197                 "generic_dn.png",
198                 "new_ok_images");
199
200         resources->cancel_images = new_button("cancel.png",
201                 "generic_up.png",
202                 "generic_hi.png",
203                 "generic_dn.png");
204
205         new_button("cancel.png",
206                 "generic_up.png",
207                 "generic_hi.png",
208                 "generic_dn.png",
209                 "new_cancel_images");
210
211         resources->bar_data = new_image("bar", "bar.png");
212
213
214         resources->min_menu_w = 0;
215         resources->menu_popup_bg = 0;  // if (0) use menu_light, menu_up, menu_shadow
216         resources->menu_item_bg = 0;   // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
217         resources->menu_bar_bg = 0;    // if (0) use menu_light, menu_shadow, and height of MEDIUMFONT + 8
218         resources->menu_title_bg =  0; // if (0) use menu_light, menu_highlighted, menu_down, menu_shadow
219
220
221         resources->popupmenu_images = 0; // if (0) get_resources()->use generic_button_images
222
223         resources->toggle_highlight_bg = 0; // if (0) "Draw a plain box" as per bctoggle.C
224
225         resources->generic_button_images = new_image_set(3,
226                         "generic_up.png",
227                         "generic_hi.png",
228                         "generic_dn.png");
229         resources->horizontal_slider_data = new_image_set(6,
230                         "hslider_fg_up.png",
231                         "hslider_fg_hi.png",
232                         "hslider_fg_dn.png",
233                         "hslider_bg_up.png",
234                         "hslider_bg_hi.png",
235                         "hslider_bg_dn.png");
236         resources->vertical_slider_data = new_image_set(6,
237                         "vertical_slider_fg_up.png",
238                         "vertical_slider_fg_hi.png",
239                         "vertical_slider_fg_dn.png",
240                         "vertical_slider_bg_up.png",
241                         "vertical_slider_bg_hi.png",
242                         "vertical_slider_bg_dn.png");
243         resources->progress_images = new_image_set(2,
244                         "progress_bg.png",
245                         "progress_hi.png");
246         resources->tumble_data = new_image_set(4,
247                 "tumble_up.png",
248                 "tumble_hi.png",
249                 "tumble_bottom.png",
250                 "tumble_top.png");
251         resources->listbox_button = new_image_set(4,
252                 "listbox_button_up.png",
253                 "listbox_button_hi.png",
254                 "listbox_button_dn.png",
255                 "listbox_button_disabled.png"); // probably need to make this for the suv theme
256         resources->listbox_column = new_image_set(3,
257                 "column_up.png",
258                 "column_hi.png",
259                 "column_dn.png");
260         resources->listbox_expand = new_image_set(5,
261                 "listbox_expandup.png",
262                 "listbox_expanduphi.png",
263                 "listbox_expandchecked.png",
264                 "listbox_expanddn.png",
265                 "listbox_expandcheckedhi.png");
266         resources->listbox_up = new_image("listbox_up.png");
267         resources->listbox_dn = new_image("listbox_dn.png");
268         resources->pan_data = new_image_set(7,
269                         "pan_up.png",
270                         "pan_hi.png",
271                         "pan_popup.png",
272                         "pan_channel.png",
273                         "pan_stick.png",
274                         "pan_channel_small.png",
275                         "pan_stick_small.png");
276         resources->pan_text_color = WHITE;
277
278         resources->pot_images = new_image_set(3,
279                 "pot_up.png",
280                 "pot_hi.png",
281                 "pot_dn.png");
282
283         resources->checkbox_images = new_image_set(5,
284                 "checkbox_up.png",
285                 "checkbox_hi.png",
286                 "checkbox_checked.png",
287                 "checkbox_dn.png",
288                 "checkbox_checkedhi.png");
289
290         resources->radial_images = new_image_set(5,
291                 "radial_up.png",
292                 "radial_hi.png",
293                 "radial_checked.png",
294                 "radial_dn.png",
295                 "radial_checkedhi.png");
296
297         resources->xmeter_images = new_image_set(6,
298                 "xmeter_normal.png",
299                 "xmeter_green.png",
300                 "xmeter_red.png",
301                 "xmeter_yellow.png",
302                 "xmeter_white.png",
303                 "xmeter_over.png");
304         resources->ymeter_images = new_image_set(6,
305                 "ymeter_normal.png",
306                 "ymeter_green.png",
307                 "ymeter_red.png",
308                 "ymeter_yellow.png",
309                 "ymeter_white.png",
310                 "ymeter_over.png");
311
312         resources->hscroll_data = new_image_set(10,
313                         "hscroll_handle_up.png",
314                         "hscroll_handle_hi.png",
315                         "hscroll_handle_dn.png",
316                         "hscroll_handle_bg.png",
317                         "hscroll_left_up.png",
318                         "hscroll_left_hi.png",
319                         "hscroll_left_dn.png",
320                         "hscroll_right_up.png",
321                         "hscroll_right_hi.png",
322                         "hscroll_right_dn.png");
323
324         resources->vscroll_data = new_image_set(10,
325                         "vscroll_handle_up.png",
326                         "vscroll_handle_hi.png",
327                         "vscroll_handle_dn.png",
328                         "vscroll_handle_bg.png",
329                         "vscroll_left_up.png",
330                         "vscroll_left_hi.png",
331                         "vscroll_left_dn.png",
332                         "vscroll_right_up.png",
333                         "vscroll_right_hi.png",
334                         "vscroll_right_dn.png");
335
336
337         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
338         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
339         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
340         new_button("swap_extents.png",
341                 "editpanel_up.png",
342                 "editpanel_hi.png",
343                 "editpanel_dn.png",
344                 "swap_extents");
345
346
347 // Record windows
348         rgui_batch = new_image("recordgui_batch.png");
349         rgui_controls = new_image("recordgui_controls.png");
350         rgui_list = new_image("recordgui_list.png");
351         rmonitor_panel = new_image("recordmonitor_panel.png");
352         rmonitor_meters = new_image("recordmonitor_meters.png");
353
354
355         preferences_category_overlap = 0;
356         preferencescategory_x = 5;
357         preferencescategory_y = 5;
358         preferencestitle_x = 5;
359         preferencestitle_y = 10;
360         preferencesoptions_x = 5;
361         preferencesoptions_y = 0;
362
363 // MWindow
364         message_normal = resources->text_default;
365         audio_color = BLACK;
366         mtransport_margin = 11;
367         toggle_margin = 11;
368
369         new_image("mbutton_bg", "mbutton_bg.png");
370         new_image("mbutton_blue", "mbutton_blue.png");
371         new_image("timebar_bg", "timebar_bg.png");
372         new_image("timebar_brender", "timebar_brender.png");
373         new_image("clock_bg", "mclock.png");
374         new_image("patchbay_bg", "patchbay_bg.png");
375         new_image("tracks_bg","tracks_bg.png");
376         new_image("zoombar_left","zoombar_left.png");
377         new_image("zoombar_right","zoombar_right.png");
378         new_image("statusbar_left","statusbar_left.png");
379         new_image("statusbar_right","statusbar_right.png");
380
381         new_image_set("zoombar_menu", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
382         new_image_set("zoombar_tumbler", 4, "tumble_up.png", "tumble_hi.png", "tumble_bottom.png", "tumble_top.png");
383
384         new_image_set("mode_popup", 3, "generic_up.png", "generic_hi.png", "generic_dn.png");
385         new_image("mode_add", "mode_add.png");
386         new_image("mode_divide", "mode_divide.png");
387         new_image("mode_multiply", "mode_multiply.png");
388         new_image("mode_normal", "mode_normal.png");
389         new_image("mode_replace", "mode_replace.png");
390         new_image("mode_subtract", "mode_subtract.png");
391         new_image("mode_max", "mode_max.png");
392
393         new_toggle("plugin_on.png",
394                 "pluginbutton_hi.png",
395                 "pluginbutton_hi.png",
396                 "pluginbutton_select.png",
397                 "pluginbutton_dn.png",
398                 "pluginbutton_selecthi.png",
399                 "plugin_on");
400
401         new_toggle("plugin_show.png",
402                 "plugin_show.png",
403                 "pluginbutton_hi.png",
404                 "pluginbutton_select.png",
405                 "pluginbutton_dn.png",
406                 "pluginbutton_selecthi.png",
407                 "plugin_show");
408
409 // CWindow
410         new_image("cpanel_bg", "cpanel_bg.png");
411         new_image("cbuttons_left", "cbuttons_left.png");
412         new_image("cbuttons_right", "cbuttons_right.png");
413         new_image("cmeter_bg", "cmeter_bg.png");
414
415 // VWindow
416         new_image("vbuttons_left", "vbuttons_left.png");
417
418         new_image("preferences_bg", "preferences_bg.png");
419
420
421         new_image("new_bg", "new_bg.png");
422         new_image("setformat_bg", "setformat_bg2.png");
423
424
425         timebar_view_data = new_image("timebar_view.png");
426
427         setformat_w = get_image("setformat_bg")->get_w();
428         setformat_h = get_image("setformat_bg")->get_h();
429         setformat_x1 = 15;
430         setformat_x2 = 100;
431
432         setformat_x3 = 315;
433         setformat_x4 = 425;
434         setformat_y1 = 20;
435         setformat_y2 = 85;
436         setformat_y3 = 125;
437         setformat_margin = 30;
438         setformat_channels_x = 25;
439         setformat_channels_y = 242;
440         setformat_channels_w = 250;
441         setformat_channels_h = 250;
442
443         loadfile_pad = 52;
444         browse_pad = 20;
445
446
447         new_image_set("playpatch_data",
448                 5,
449                 "playpatch_up.png",
450                 "playpatch_hi.png",
451                 "playpatch_checked.png",
452                 "playpatch_dn.png",
453                 "playpatch_checkedhi.png");
454
455         new_image_set("recordpatch_data",
456                 5,
457                 "recordpatch_up.png",
458                 "recordpatch_hi.png",
459                 "recordpatch_checked.png",
460                 "recordpatch_dn.png",
461                 "recordpatch_checkedhi.png");
462
463         new_image_set("gangpatch_data",
464                 5,
465                 "gangpatch_up.png",
466                 "gangpatch_hi.png",
467                 "gangpatch_checked.png",
468                 "gangpatch_dn.png",
469                 "gangpatch_checkedhi.png");
470
471         new_image_set("drawpatch_data",
472                 5,
473                 "drawpatch_up.png",
474                 "drawpatch_hi.png",
475                 "drawpatch_checked.png",
476                 "drawpatch_dn.png",
477                 "drawpatch_checkedhi.png");
478
479
480         new_image_set("mutepatch_data",
481                 5,
482                 "mutepatch_up.png",
483                 "mutepatch_hi.png",
484                 "mutepatch_checked.png",
485                 "mutepatch_dn.png",
486                 "mutepatch_checkedhi.png");
487
488         new_image_set("expandpatch_data",
489                 5,
490                 "expandpatch_up.png",
491                 "expandpatch_hi.png",
492                 "expandpatch_checked.png",
493                 "expandpatch_dn.png",
494                 "expandpatch_checkedhi.png");
495
496         build_icons();
497         build_bg_data();
498         build_overlays();
499
500
501
502
503         out_point = new_image_set(5,
504                 "out_up.png",
505                 "out_hi.png",
506                 "out_checked.png",
507                 "out_dn.png",
508                 "out_checkedhi.png");
509         in_point = new_image_set(5,
510                 "in_up.png",
511                 "in_hi.png",
512                 "in_checked.png",
513                 "in_dn.png",
514                 "in_checkedhi.png");
515
516         label_toggle = new_image_set(5,
517                 "labeltoggle_up.png",
518                 "labeltoggle_uphi.png",
519                 "label_checked.png",
520                 "labeltoggle_dn.png",
521                 "label_checkedhi.png");
522
523
524         statusbar_cancel_data = new_image_set(3,
525                 "statusbar_cancel_up.png",
526                 "statusbar_cancel_hi.png",
527                 "statusbar_cancel_dn.png");
528
529
530         VFrame *editpanel_up = new_image("editpanel_up.png");
531         VFrame *editpanel_hi = new_image("editpanel_hi.png");
532         VFrame *editpanel_dn = new_image("editpanel_dn.png");
533         VFrame *editpanel_checked = new_image("editpanel_checked.png");
534         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
535
536         new_image("panel_divider", "panel_divider.png");
537         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
538         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
539         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
540
541
542         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
543         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
544         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
545         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
546         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
547         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
548         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
549         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
550         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
551         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
552         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
553         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
554         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
555         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
556         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
557         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
558         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
559         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
560         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
561         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
562         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
563         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
564         new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
565
566
567 #define TRANSPORT_LEFT_IMAGES  "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
568 #define TRANSPORT_CENTER_IMAGES  "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
569 #define TRANSPORT_RIGHT_IMAGES  "transport_right_up.png", "transport_right_hi.png", "transport_right_dn.png"
570
571         new_button("end.png", TRANSPORT_RIGHT_IMAGES, "end");
572         new_button("fastfwd.png",TRANSPORT_CENTER_IMAGES, "fastfwd");
573         new_button("fastrev.png",TRANSPORT_CENTER_IMAGES, "fastrev");
574         new_button("play.png",TRANSPORT_CENTER_IMAGES, "play");
575         new_button("framefwd.png", TRANSPORT_CENTER_IMAGES, "framefwd");
576         new_button("framerev.png", TRANSPORT_CENTER_IMAGES, "framerev");
577         new_button("pause.png", TRANSPORT_CENTER_IMAGES, "pause");
578         new_button("record.png", TRANSPORT_CENTER_IMAGES, "record");
579         new_button("singleframe.png", TRANSPORT_CENTER_IMAGES, "recframe");
580         new_button("reverse.png", TRANSPORT_CENTER_IMAGES, "reverse");
581         new_button("rewind.png", TRANSPORT_LEFT_IMAGES, "rewind");
582         new_button("stop.png", TRANSPORT_CENTER_IMAGES, "stop");
583         new_button("stop.png", TRANSPORT_RIGHT_IMAGES, "stoprec");
584
585
586
587 // CWindow icons
588         new_image("cwindow_inactive", "cwindow_inactive.png");
589         new_image("cwindow_active", "cwindow_active.png");
590
591
592         new_image_set("batch_render_start",
593                 3,
594                 "batchstart_up.png",
595                 "batchstart_hi.png",
596                 "batchstart_dn.png");
597         new_image_set("batch_render_stop",
598                 3,
599                 "batchstop_up.png",
600                 "batchstop_hi.png",
601                 "batchstop_dn.png");
602         new_image_set("batch_render_cancel",
603                 3,
604                 "batchcancel_up.png",
605                 "batchcancel_hi.png",
606                 "batchcancel_dn.png");
607
608         new_image_set("category_button",
609                 3,
610                 "preferencesbutton_dn.png",
611                 "preferencesbutton_dnhi.png",
612                 "preferencesbutton_dnlo.png");
613
614         new_image_set("category_button_checked",
615                 3,
616                 "preferencesbutton_up.png",
617                 "preferencesbutton_uphi.png",
618                 "preferencesbutton_dnlo.png");
619
620
621
622
623
624
625         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
626         new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
627         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
628         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
629
630         VFrame *cpanel_up = new_image("editpanel_up.png");
631         VFrame *cpanel_hi = new_image("editpanel_hi.png");
632         VFrame *cpanel_dn = new_image("editpanel_dn.png");
633         VFrame *cpanel_checked = new_image("editpanel_checked.png");
634         VFrame *cpanel_checkedhi = new_image("editpanel_checkedhi.png");
635         new_toggle("blank30x30.png",
636                    new_image("locklabels_locked.png"),
637                    new_image("locklabels_lockedhi.png"),
638                    new_image("locklabels_unlocked.png"),
639                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
640                    new_image("locklabels_unlockedhi.png"),
641                    "locklabels");
642
643
644         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
645         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
646         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
647         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
648         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
649         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
650         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
651         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
652         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
653         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
654
655         // toggle for tangent mode (compositor/tool window)
656         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
657         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
658
659
660         flush_images();
661
662         title_font = MEDIUMFONT_3D;
663         title_color = WHITE;
664         recordgui_fixed_color = YELLOW;
665         recordgui_variable_color = RED;
666         resources->medium_font = "-*-helvetica-bold-r-normal-*-14-*";
667
668         channel_position_color = MEYELLOW;
669         resources->meter_title_w = 25;
670
671         // (asset) edit info text color
672         edit_font_color = YELLOW;
673
674         //labels
675         resources->label_images = new_image_set(5,
676                 "radial_up.png",
677                 "radial_hi.png",
678                 "radial_checked.png",
679                 "radial_dn.png",
680                 "radial_checkedhi.png");
681
682         /*      resources->type_to_icon = new_image_set(5,
683             "file_folder.png",
684                 "file_unknown.png",
685                 "file_film.png",
686                 "file_sound.png",
687                 "file_column.png");
688    */
689 }
690
691 #define CWINDOW_METER_MARGIN 5
692 #define VWINDOW_METER_MARGIN 5
693
694 void BlondTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
695 {
696         mbuttons_x = 0;
697         mbuttons_y = gui->mainmenu->get_h() + 1;
698         mbuttons_w = w;
699         mbuttons_h = get_image("mbutton_bg")->get_h();
700         mclock_x = 10;
701         mclock_y = mbuttons_y - 1 + mbuttons_h + CWINDOW_METER_MARGIN;
702         mclock_w = get_image("clock_bg")->get_w() - 40;
703         mclock_h = get_image("clock_bg")->get_h();
704         mtimebar_x = get_image("patchbay_bg")->get_w();
705         mtimebar_y = mbuttons_y - 1 + mbuttons_h;
706         mtimebar_w = w - mtimebar_x;
707         mtimebar_h = get_image("timebar_bg")->get_h();
708         mzoom_h =  get_image("zoombar_left")->get_h();
709         mzoom_x = 0;
710         mzoom_y = h - get_image("statusbar_left")->get_h() - mzoom_h;
711         mzoom_w = w;
712         mstatus_x = 0;
713         mstatus_y = mzoom_y + mzoom_h;
714         mstatus_w = w;
715         mstatus_h = h - mstatus_y;
716         mstatus_message_x = 10;
717         mstatus_message_y = 5;
718         mstatus_progress_w = 230;
719         mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 2*3 - mstatus_progress_w;
720         mstatus_progress_y = mstatus_h/2 - BC_WindowBase::get_resources()->progress_images[0]->get_h()/2;
721
722         mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 3;
723         mstatus_cancel_y = mstatus_h/2 - statusbar_cancel_data[0]->get_h()/2;
724
725         patchbay_x = 0;
726         patchbay_y = mtimebar_y + mtimebar_h;
727         patchbay_w = get_image("patchbay_bg")->get_w();
728         patchbay_h = mzoom_y - patchbay_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
729         mcanvas_x = patchbay_x + patchbay_w;
730         mcanvas_y = patchbay_y;
731         mcanvas_w = w - patchbay_w - BC_ScrollBar::get_span(SCROLL_VERT);
732         mcanvas_h = patchbay_h;
733         mhscroll_x = 0;
734         mhscroll_y = mzoom_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
735         mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT);
736         mvscroll_x = mcanvas_x + mcanvas_w;
737         mvscroll_y = mcanvas_y;
738         mvscroll_h = mcanvas_h;
739 }
740
741 void BlondTheme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls)
742 {
743         if(cwindow_controls)
744         {
745 SET_TRACE
746                 ccomposite_x = 0;
747                 ccomposite_y = 5;
748                 ccomposite_w = get_image("cpanel_bg")->get_w();
749                 ccomposite_h = mwindow->session->cwindow_h -
750                         get_image("cbuttons_left")->get_h();
751                 cslider_x = 5;
752                 cslider_y = ccomposite_h + 23;
753                 cedit_x = 10;
754                 cedit_y = cslider_y + 17;
755                 ctransport_x = 10;
756                 ctransport_y = mwindow->session->cwindow_h -
757                         get_image_set("autokeyframe")[0]->get_h();
758                 ccanvas_x = ccomposite_x + ccomposite_w;
759                 ccanvas_y = 0;
760                 ccanvas_h = ccomposite_h;
761                 cstatus_x = 525;
762                 cstatus_y = mwindow->session->cwindow_h - 40;
763                 if(mwindow->edl->session->cwindow_meter)
764                 {
765                         cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
766                                 mwindow->edl->session->cwindow_meter);
767                         ccanvas_w = cmeter_x - ccanvas_x - 5;
768                 }
769                 else
770                 {
771                         cmeter_x = mwindow->session->cwindow_w;
772                         ccanvas_w = cmeter_x - ccanvas_x;
773                 }
774 SET_TRACE
775         }
776         else
777         {
778 SET_TRACE
779                 ccomposite_x = -get_image("cpanel_bg")->get_w();
780                 ccomposite_y = 0;
781                 ccomposite_w = get_image("cpanel_bg")->get_w();
782                 ccomposite_h = mwindow->session->cwindow_h - get_image("cbuttons_left")->get_h();
783
784                 cslider_x = 5;
785                 cslider_y = mwindow->session->cwindow_h;
786                 cedit_x = 10;
787                 cedit_y = cslider_y + 17;
788                 ctransport_x = 10;
789                 ctransport_y = cedit_y + 40;
790                 ccanvas_x = 0;
791                 ccanvas_y = 0;
792                 ccanvas_w = mwindow->session->cwindow_w;
793                 ccanvas_h = mwindow->session->cwindow_h;
794                 cmeter_x = mwindow->session->cwindow_w;
795                 cstatus_x = mwindow->session->cwindow_w;
796                 cstatus_y = mwindow->session->cwindow_h;
797 SET_TRACE
798         }
799
800 SET_TRACE
801
802         czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
803         czoom_y = ctransport_y + 5;
804
805
806         cmeter_y = 5;
807         cmeter_h = mwindow->session->cwindow_h - cmeter_y;
808
809         cslider_w = ccanvas_x + ccanvas_w - cslider_x - 5;
810         ctimebar_x = ccanvas_x;
811         ctimebar_y = ccanvas_y + ccanvas_h;
812         ctimebar_w = ccanvas_w;
813         ctimebar_h = 16;
814
815
816 // Not used
817         ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
818         ctime_y = ctransport_y;
819         cdest_x = czoom_x;
820         cdest_y = czoom_y + 30;
821 SET_TRACE
822 }
823
824
825
826 void BlondTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
827 {
828
829 }
830
831 void BlondTheme::get_rmonitor_sizes(int do_audio,
832         int do_video,
833         int do_channel,
834         int do_interlace,
835         int do_avc,
836         int audio_channels)
837 {
838         Theme::get_rmonitor_sizes(do_audio,
839                 do_video,
840                 do_channel,
841                 do_interlace,
842                 do_avc,
843                 audio_channels);
844         if(!do_video && do_audio)
845         {
846                 rmonitor_meter_y -= 30;
847                 rmonitor_meter_h += 30;
848         }
849 }
850
851
852 void BlondTheme::get_vwindow_sizes(VWindowGUI *gui)
853 {
854         vmeter_y = 5;
855         vmeter_h = mwindow->session->vwindow_h - cmeter_y;
856         vcanvas_x = 0;
857         vcanvas_y = 0;
858         vcanvas_h = mwindow->session->vwindow_h - get_image("vbuttons_left")->get_h();
859
860         if(mwindow->edl->session->vwindow_meter)
861         {
862                 vmeter_x = mwindow->session->vwindow_w -
863                         VWINDOW_METER_MARGIN -
864                         MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
865                         mwindow->edl->session->vwindow_meter);
866                 vcanvas_w = vmeter_x - vcanvas_x - VWINDOW_METER_MARGIN;
867         }
868         else
869         {
870                 vmeter_x = mwindow->session->vwindow_w;
871                 vcanvas_w = mwindow->session->vwindow_w;
872         }
873
874         vtimebar_x = vcanvas_x;
875         vtimebar_y = vcanvas_y + vcanvas_h;
876         vtimebar_w = vcanvas_w;
877         vtimebar_h = 16;
878
879         vslider_x = 10;
880         vslider_y = vtimebar_y + 25;
881         vslider_w = vtimebar_w - vslider_x;
882         vedit_x = 10;
883         vedit_y = vslider_y + BC_Slider::get_span(0);
884         vtransport_x = 10;
885         vtransport_y = mwindow->session->vwindow_h -
886                 get_image_set("autokeyframe")[0]->get_h();
887         vtime_x = 380;
888         vtime_y = vedit_y + 10;
889         vtime_w = 125;
890
891
892
893
894         vzoom_x = vtime_x + 150;
895         vzoom_y = vtime_y;
896         vsource_x = vtime_x + 50;
897         vsource_y = vtransport_y + 5;
898 }
899
900
901
902
903
904 void BlondTheme::build_icons()
905 {
906         new_image("mwindow_icon", "heroine_icon.png");
907         new_image("vwindow_icon", "heroine_icon.png");
908         new_image("cwindow_icon", "heroine_icon.png");
909         new_image("awindow_icon", "heroine_icon.png");
910         new_image("record_icon", "heroine_icon.png");
911         new_image("clip_icon", "clip_icon.png");
912 }
913
914
915
916 void BlondTheme::build_bg_data()
917 {
918 // Audio settings
919         channel_bg_data = new VFrame(get_image_data("channel_bg.png"));
920         channel_position_data = new VFrame(get_image_data("channel_position.png"));
921
922 // Track bitmaps
923         new_image("resource1024", "resource1024.png");
924         new_image("resource512", "resource512.png");
925         new_image("resource256", "resource256.png");
926         new_image("resource128", "resource128.png");
927         new_image("resource64", "resource64.png");
928         new_image("resource32", "resource32.png");
929         new_image("plugin_bg_data", "plugin_bg.png");
930         new_image("title_bg_data", "title_bg.png");
931         new_image("vtimebar_bg_data", "vwindow_timebar.png");
932 }
933
934
935
936 void BlondTheme::build_overlays()
937 {
938         keyframe_data = new VFrame(get_image_data("keyframe3.png"));
939         camerakeyframe_data = new VFrame(get_image_data("camerakeyframe.png"));
940         maskkeyframe_data = new VFrame(get_image_data("maskkeyframe.png"));
941         modekeyframe_data = new VFrame(get_image_data("modekeyframe.png"));
942         pankeyframe_data = new VFrame(get_image_data("pankeyframe.png"));
943         projectorkeyframe_data = new VFrame(get_image_data("projectorkeyframe.png"));
944 }
945
946
947
948
949
950
951
952
953
954 void BlondTheme::draw_rwindow_bg(RecordGUI *gui)
955 {
956 //      int y;
957 //      int margin = 50;
958 //      int margin2 = 80;
959 //      gui->draw_9segment(recordgui_batch_x - margin,
960 //              0,
961 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
962 //              recordgui_buttons_y,
963 //              rgui_batch);
964 //      gui->draw_3segmenth(recordgui_options_x - margin2,
965 //              recordgui_buttons_y - 5,
966 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
967 //              rgui_controls);
968 //      y = recordgui_buttons_y - 5 + rgui_controls->get_h();
969 //      gui->draw_9segment(0,
970 //              y,
971 //              mwindow->session->rwindow_w,
972 //              mwindow->session->rwindow_h - y,
973 //              rgui_list);
974 }
975
976 void BlondTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
977 {
978 //      int margin = 45;
979 //      int panel_w = 300;
980 //      int x = rmonitor_meter_x - margin;
981 //      int w = mwindow->session->rmonitor_w - x;
982 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
983 //      gui->clear_box(0,
984 //              0,
985 //              mwindow->session->rmonitor_w,
986 //              mwindow->session->rmonitor_h);
987 //      gui->draw_9segment(x,
988 //              0,
989 //              w,
990 //              mwindow->session->rmonitor_h,
991 //              rmonitor_meters);
992 }
993
994
995
996
997
998
999 void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
1000 {
1001 // Button bar
1002         int mbuttons_rightedge = mbuttons_x
1003                 + get_image("end")->get_w() + 7 * get_image("play")->get_w() + get_image("end")->get_w()
1004                 + mtransport_margin
1005                 + 2 * get_image("arrow")->get_w()
1006                 + toggle_margin
1007                 + 2 * get_image("autokeyframe")->get_w()
1008                 + toggle_margin
1009                 + (14 + 1) * get_image("goto")->get_w() + 5; // I don't know why + 1!!
1010         gui->draw_3segmenth(mbuttons_x,
1011                 mbuttons_y,
1012                 mbuttons_rightedge,
1013                 mbuttons_x,
1014                 mbuttons_rightedge,
1015                 get_image("mbutton_bg"),
1016                 0);
1017
1018         gui->draw_3segmenth(mbuttons_x + mbuttons_rightedge,
1019                 mbuttons_y,
1020                 mwindow->session->mwindow_w,
1021                 get_image("mbutton_blue"));
1022
1023         int pdw = get_image("panel_divider")->get_w();
1024         int x = mbuttons_x;
1025         x += get_image("end")->get_w() + 7 * get_image("play")->get_w() + get_image("end")->get_w();
1026         x += mtransport_margin;                                       // the control buttons
1027
1028         gui->draw_vframe(get_image("panel_divider"),
1029                 x - toggle_margin / 2 - pdw / 2 + 2,
1030                 mbuttons_y - 1);
1031         x += 2 * get_image("arrow")->get_w() + toggle_margin;           // the mode buttons
1032
1033         gui->draw_vframe(get_image("panel_divider"),
1034                 x - toggle_margin / 2 - pdw / 2 + 2,
1035                 mbuttons_y - 1);
1036
1037         x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;    // the state toggle buttons
1038         gui->draw_vframe(get_image("panel_divider"),
1039                 x - toggle_margin / 2 - pdw / 2 + 2,
1040                 mbuttons_y - 1);
1041
1042 // Clock
1043         gui->draw_3segmenth(0,
1044                 mbuttons_y + get_image("mbutton_bg")->get_h() - 1,
1045                 get_image("patchbay_bg")->get_w(),
1046                 get_image("clock_bg"));
1047
1048 // Patchbay
1049         gui->draw_3segmentv(patchbay_x,
1050                 patchbay_y,
1051                 patchbay_h,
1052                 get_image("patchbay_bg"));
1053
1054 // Track canvas
1055         gui->draw_9segment(mcanvas_x,
1056                 mcanvas_y,
1057                 mcanvas_w,
1058                 mcanvas_h,
1059                 get_image("tracks_bg"));
1060
1061 // Timebar
1062         gui->draw_3segmenth(mtimebar_x,
1063                 mtimebar_y,
1064                 mtimebar_w,
1065                 get_image("timebar_bg"));
1066
1067 // Zoombar
1068 #define ZOOMBAR_CENTER 888
1069         gui->draw_3segmenth(mzoom_x,
1070                 mzoom_y,
1071                 ZOOMBAR_CENTER,
1072                 get_image("zoombar_left"));
1073         if(mzoom_w > ZOOMBAR_CENTER)
1074                 gui->draw_3segmenth(mzoom_x + ZOOMBAR_CENTER,
1075                         mzoom_y,
1076                         mzoom_w - ZOOMBAR_CENTER,
1077                         get_image("zoombar_right"));
1078
1079
1080 // Status
1081         gui->draw_3segmenth(mstatus_x,
1082                 mstatus_y,
1083                 ZOOMBAR_CENTER,
1084                 get_image("statusbar_left"));
1085
1086         if(mstatus_w > ZOOMBAR_CENTER)
1087           gui->draw_3segmenth(mstatus_x + ZOOMBAR_CENTER,
1088                               mstatus_y,
1089                               mstatus_w - ZOOMBAR_CENTER,
1090                               get_image("statusbar_right"));
1091
1092 }
1093
1094 void BlondTheme::draw_cwindow_bg(CWindowGUI *gui)
1095 {
1096         const int button_division = 570;
1097         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
1098         gui->draw_3segmenth(0, ccomposite_h, button_division, get_image("cbuttons_left"));
1099         if(mwindow->edl->session->cwindow_meter)
1100         {
1101                 gui->draw_3segmenth(button_division,
1102                         ccomposite_h,
1103                         cmeter_x - CWINDOW_METER_MARGIN - button_division,
1104                         get_image("cbuttons_right"));
1105                 gui->draw_9segment(cmeter_x - CWINDOW_METER_MARGIN,
1106                         0,
1107                         mwindow->session->cwindow_w - cmeter_x + CWINDOW_METER_MARGIN,
1108                         mwindow->session->cwindow_h,
1109                         get_image("cmeter_bg"));
1110         }
1111         else
1112         {
1113                 gui->draw_3segmenth(button_division,
1114                         ccomposite_h,
1115                         cmeter_x - CWINDOW_METER_MARGIN - button_division + 100,
1116                         get_image("cbuttons_right"));
1117         }
1118 }
1119
1120 void BlondTheme::draw_vwindow_bg(VWindowGUI *gui)
1121 {
1122         const int button_division = 400;
1123         gui->draw_3segmenth(0,
1124                 vcanvas_h,
1125                 button_division,
1126                 get_image("vbuttons_left"));
1127         if(mwindow->edl->session->vwindow_meter)
1128         {
1129                 gui->draw_3segmenth(button_division,
1130                         vcanvas_h,
1131                         vmeter_x - VWINDOW_METER_MARGIN - button_division,
1132                         get_image("cbuttons_right"));
1133                 gui->draw_9segment(vmeter_x - VWINDOW_METER_MARGIN,
1134                         0,
1135                         mwindow->session->vwindow_w - vmeter_x + VWINDOW_METER_MARGIN,
1136                         mwindow->session->vwindow_h,
1137                         get_image("cmeter_bg"));
1138         }
1139         else
1140         {
1141                 gui->draw_3segmenth(button_division,
1142                         vcanvas_h,
1143                         vmeter_x - VWINDOW_METER_MARGIN - button_division + 100,
1144                         get_image("cbuttons_right"));
1145         }
1146 }
1147
1148 void BlondTheme::get_preferences_sizes()
1149 {
1150 }
1151
1152
1153 void BlondTheme::draw_preferences_bg(PreferencesWindow *gui)
1154 {
1155         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1156 }
1157
1158 void BlondTheme::get_new_sizes(NewWindow *gui)
1159 {
1160 }
1161
1162 void BlondTheme::draw_new_bg(NewWindow *gui)
1163 {
1164         gui->draw_vframe(get_image("new_bg"), 0, 0);
1165 }
1166
1167 void BlondTheme::draw_setformat_bg(SetFormatWindow *gui)
1168 {
1169         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1170 }
1171
1172
1173 // pmd: SUV (same), 1_2_2blond (nonexist)
1174 void BlondTheme::get_plugindialog_sizes()
1175 {
1176         int x = 10, y = 30;
1177         plugindialog_new_x = x;
1178         plugindialog_new_y = y;
1179         plugindialog_shared_x = mwindow->session->plugindialog_w / 3;
1180         plugindialog_shared_y = y;
1181         plugindialog_module_x = mwindow->session->plugindialog_w * 2 / 3;
1182         plugindialog_module_y = y;
1183
1184         plugindialog_new_w = plugindialog_shared_x - plugindialog_new_x - 10;
1185         plugindialog_new_h = mwindow->session->plugindialog_h - 120;
1186         plugindialog_shared_w = plugindialog_module_x - plugindialog_shared_x - 10;
1187         plugindialog_shared_h = mwindow->session->plugindialog_h - 120;
1188         plugindialog_module_w = mwindow->session->plugindialog_w - plugindialog_module_x - 10;
1189         plugindialog_module_h = mwindow->session->plugindialog_h - 120;
1190
1191         plugindialog_newattach_x = plugindialog_new_x + 20;
1192         plugindialog_newattach_y = plugindialog_new_y + plugindialog_new_h + 10;
1193         plugindialog_sharedattach_x = plugindialog_shared_x + 20;
1194         plugindialog_sharedattach_y = plugindialog_shared_y + plugindialog_shared_h + 10;
1195         plugindialog_moduleattach_x = plugindialog_module_x + 20;
1196         plugindialog_moduleattach_y = plugindialog_module_y + plugindialog_module_h + 10;
1197 }
1198
1199
1200
1201
1202