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