opengl dot() fix, add file dates, sort file name/time, fix icon image lookup, sync...
[goodguy/history.git] / cinelerra-5.1 / plugins / theme_pinklady / pinkladytheme.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6  * by Paolo Rampino <akir4d at gmail dot com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  *
22  */
23
24 #include "bcsignals.h"
25 #include "clip.h"
26 #include "cwindowgui.h"
27 #include "pinkladytheme.h"
28 #include "edl.h"
29 #include "edlsession.h"
30 #include "mainmenu.h"
31 #include "mainsession.h"
32 #include "mbuttons.h"
33 #include "meterpanel.h"
34 #include "mwindow.h"
35 #include "mwindowgui.h"
36 #include "new.h"
37 #include "patchbay.h"
38 #include "preferencesthread.h"
39 #include "recordgui.h"
40 #include "recordmonitor.h"
41 #include "setformat.h"
42 #include "statusbar.h"
43 #include "timebar.h"
44 #include "trackcanvas.h"
45 #include "vframe.h"
46 #include "vwindowgui.h"
47
48
49 PluginClient* new_plugin(PluginServer *server)
50 {
51         return new PINKLADYMain(server);
52 }
53
54 PINKLADYMain::PINKLADYMain(PluginServer *server)
55  : PluginTClient(server)
56 {
57 }
58
59 PINKLADYMain::~PINKLADYMain()
60 {
61 }
62
63 const char* PINKLADYMain::plugin_title()
64 {
65         return _("PinkLady");
66 }
67
68 Theme* PINKLADYMain::new_theme()
69 {
70         theme = new PINKLADY;
71         extern unsigned char _binary_theme_pinklady_data_start[];
72         theme->set_data(_binary_theme_pinklady_data_start);
73         return theme;
74 }
75
76
77 PINKLADY::PINKLADY()
78  : Theme()
79 {
80 }
81
82 PINKLADY::~PINKLADY()
83 {
84         delete camerakeyframe_data;
85         delete channel_position_data;
86         delete keyframe_data;
87         delete maskkeyframe_data;
88         delete modekeyframe_data;
89         delete pankeyframe_data;
90         delete projectorkeyframe_data;
91 }
92
93 void PINKLADY::initialize()
94 {
95         BC_Resources *resources = BC_WindowBase::get_resources();
96
97
98         resources->text_default = 0x1b0f11;
99         resources->text_background = 0xffb1d0;
100         resources->text_border1 = 0x202020;
101         resources->text_border2 = 0xffb1d0;
102         resources->text_border3 = 0xffb1d0;
103         resources->text_border4 = 0x969696;
104         resources->text_inactive_highlight = 0x707070;
105
106         resources->bg_color = 0xd46a95;
107         resources->border_light2 = resources->bg_color;
108         resources->border_shadow2 = resources->bg_color;
109         resources->default_text_color = 0x1b0f11;
110         resources->menu_title_text = 0x1b0f11;
111         resources->popup_title_text = 0x1b0f11;
112         resources->menu_item_text = 0x1b0f11;
113         resources->menu_highlighted_fontcolor = WHITE;
114         resources->generic_button_margin = 30;
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 = resources->default_text_color;
119
120         resources->menu_light = 0xababab;
121         resources->menu_highlighted = 0x6f6f6f;
122         resources->menu_down = 0x4b4b4b;
123         resources->menu_up = 0x4b4b4b;
124         resources->menu_shadow = 0x202020;
125         resources->popupmenu_margin = 15;
126         resources->popupmenu_triangle_margin = 15;
127
128         resources->listbox_title_color = 0x1b0f11;
129
130         resources->listbox_title_margin = 20;
131         resources->listbox_title_hotspot = 20;
132         resources->listbox_border1 = 0x1a1a1a;
133         resources->listbox_border2 = 0xffb1d0;
134         resources->listbox_border3 = 0xffb1d0;
135         resources->listbox_border4 = 0x646464;
136         resources->listbox_highlighted = 0x505050;
137         resources->listbox_inactive = 0xffb1d0;
138         resources->listbox_bg = 0;
139         resources->listbox_text = 0x1b0f11;
140
141         resources->filebox_margin = 130;
142         resources->file_color = 0x1b0f11;
143         resources->directory_color = 0xa0a0ff;
144
145
146         new_toggle("loadmode_new.png",
147                 "loadmode_up.png",
148                 "loadmode_hi.png",
149                 "loadmode_checked.png",
150                 "loadmode_dn.png",
151                 "loadmode_checkedhi.png",
152                 "loadmode_new");
153         new_toggle("loadmode_none.png",
154                 "loadmode_up.png",
155                 "loadmode_hi.png",
156                 "loadmode_checked.png",
157                 "loadmode_dn.png",
158                 "loadmode_checkedhi.png",
159                 "loadmode_none");
160         new_toggle("loadmode_newcat.png",
161                 "loadmode_up.png",
162                 "loadmode_hi.png",
163                 "loadmode_checked.png",
164                 "loadmode_dn.png",
165                 "loadmode_checkedhi.png",
166                 "loadmode_newcat");
167         new_toggle("loadmode_cat.png",
168                 "loadmode_up.png",
169                 "loadmode_hi.png",
170                 "loadmode_checked.png",
171                 "loadmode_dn.png",
172                 "loadmode_checkedhi.png",
173                 "loadmode_cat");
174         new_toggle("loadmode_newtracks.png",
175                 "loadmode_up.png",
176                 "loadmode_hi.png",
177                 "loadmode_checked.png",
178                 "loadmode_dn.png",
179                 "loadmode_checkedhi.png",
180                 "loadmode_newtracks");
181         new_toggle("loadmode_paste.png",
182                 "loadmode_up.png",
183                 "loadmode_hi.png",
184                 "loadmode_checked.png",
185                 "loadmode_dn.png",
186                 "loadmode_checkedhi.png",
187                 "loadmode_paste");
188         new_toggle("loadmode_resource.png",
189                 "loadmode_up.png",
190                 "loadmode_hi.png",
191                 "loadmode_checked.png",
192                 "loadmode_dn.png",
193                 "loadmode_checkedhi.png",
194                 "loadmode_resource");
195         new_toggle("loadmode_nested.png",
196                 "loadmode_up.png",
197                 "loadmode_hi.png",
198                 "loadmode_checked.png",
199                 "loadmode_dn.png",
200                 "loadmode_checkedhi.png",
201                 "loadmode_nested");
202
203
204         resources->filebox_icons_images = new_button("icons.png",
205                 "fileboxbutton_up.png",
206                 "fileboxbutton_hi.png",
207                 "fileboxbutton_dn.png",
208                 "filebox_icons");
209
210         resources->filebox_text_images = new_button("text.png",
211                 "fileboxbutton_up.png",
212                 "fileboxbutton_hi.png",
213                 "fileboxbutton_dn.png",
214                 "filebox_text");
215
216         resources->filebox_newfolder_images = new_button("folder.png",
217                 "fileboxbutton_up.png",
218                 "fileboxbutton_hi.png",
219                 "fileboxbutton_dn.png",
220                 "filebox_newfolder");
221
222         resources->filebox_rename_images = new_button("rename.png",
223                 "fileboxbutton_up.png",
224                 "fileboxbutton_hi.png",
225                 "fileboxbutton_dn.png",
226                 "filebox_rename");
227
228         resources->filebox_updir_images = new_button("updir.png",
229                 "fileboxbutton_up.png",
230                 "fileboxbutton_hi.png",
231                 "fileboxbutton_dn.png",
232                 "filebox_updir");
233
234         resources->filebox_delete_images = new_button("delete.png",
235                 "fileboxbutton_up.png",
236                 "fileboxbutton_hi.png",
237                 "fileboxbutton_dn.png",
238                 "filebox_delete");
239
240         resources->filebox_reload_images = new_button("reload.png",
241                 "fileboxbutton_up.png",
242                 "fileboxbutton_hi.png",
243                 "fileboxbutton_dn.png",
244                 "filebox_reload");
245
246
247         resources->filebox_descend_images = new_button("openfolder.png",
248                 "filebox_bigbutton_up.png",
249                 "filebox_bigbutton_hi.png",
250                 "filebox_bigbutton_dn.png",
251                 "filebox_descend");
252
253         resources->usethis_button_images =
254                 resources->ok_images = new_button("ok.png",
255                 "filebox_bigbutton_up.png",
256                 "filebox_bigbutton_hi.png",
257                 "filebox_bigbutton_dn.png",
258                 "ok_button");
259
260         new_button("ok.png",
261                 "new_bigbutton_up.png",
262                 "new_bigbutton_hi.png",
263                 "new_bigbutton_dn.png",
264                 "new_ok_images");
265
266         resources->cancel_images = new_button("cancel.png",
267                 "filebox_bigbutton_up.png",
268                 "filebox_bigbutton_hi.png",
269                 "filebox_bigbutton_dn.png",
270                 "cancel_button");
271
272         new_button("cancel.png",
273                 "new_bigbutton_up.png",
274                 "new_bigbutton_hi.png",
275                 "new_bigbutton_dn.png",
276                 "new_cancel_images");
277
278         resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
279                 "0.png",
280                 "1.png",
281                 "2.png",
282                 "3.png",
283                 "4.png",
284                 "5.png",
285                 "6.png",
286                 "7.png",
287                 "8.png",
288                 "9.png",
289                 "colon.png",
290                 "period.png",
291                 "a.png",
292                 "b.png",
293                 "c.png",
294                 "d.png",
295                 "e.png",
296                 "f.png",
297                 "space.png",
298                 "dash.png");
299
300         resources->bar_data = new_image("bar", "bar.png");
301         resources->check = new_image("check", "check.png");
302
303         resources->min_menu_w = 96;
304         resources->menu_popup_bg = new_image("menu_popup_bg.png");
305         resources->menu_item_bg = new_image_set(3,
306                 "menuitem_up.png",
307                 "menuitem_hi.png",
308                 "menuitem_dn.png");
309         resources->menu_bar_bg = new_image("menubar_bg.png");
310         resources->menu_title_bg = new_image_set(3,
311                 "menubar_up.png",
312                 "menubar_hi.png",
313                 "menubar_dn.png");
314
315
316         resources->popupmenu_images = 0;
317 //              new_image_set(3,
318 //              "menupopup_up.png",
319 //              "menupopup_hi.png",
320 //              "menupopup_dn.png");
321
322         resources->toggle_highlight_bg = new_image("toggle_highlight_bg",
323                 "text_highlight.png");
324
325         resources->generic_button_images = new_image_set(3,
326                         "generic_up.png",
327                         "generic_hi.png",
328                         "generic_dn.png");
329         resources->horizontal_slider_data = new_image_set(6,
330                         "hslider_fg_up.png",
331                         "hslider_fg_hi.png",
332                         "hslider_fg_dn.png",
333                         "hslider_bg_up.png",
334                         "hslider_bg_hi.png",
335                         "hslider_bg_dn.png");
336         resources->vertical_slider_data = new_image_set(6,
337                         "hslider_fg_up.png",
338                         "hslider_fg_hi.png",
339                         "hslider_fg_dn.png",
340                         "hslider_bg_up.png",
341                         "hslider_bg_hi.png",
342                         "hslider_bg_dn.png");
343         for( int i=0; i<6; ++i )
344                 resources->vertical_slider_data[i]->rotate90();
345
346         resources->progress_images = new_image_set(2,
347                         "progress_bg.png",
348                         "progress_hi.png");
349         resources->tumble_data = new_image_set(4,
350                 "tumble_up.png",
351                 "tumble_hi.png",
352                 "tumble_bottom.png",
353                 "tumble_top.png");
354         resources->listbox_button = new_button4("listbox_button.png",
355                 "editpanel_up.png",
356                 "editpanel_hi.png",
357                 "editpanel_dn.png",
358                 "editpanel_hi.png",
359                 "listbox_button");
360         resources->listbox_column = new_image_set(3,
361                 "column_up.png",
362                 "column_hi.png",
363                 "column_dn.png");
364         resources->listbox_up = new_image("listbox_up.png");
365         resources->listbox_dn = new_image("listbox_dn.png");
366         resources->pan_data = new_image_set(7,
367                         "pan_up.png",
368                         "pan_hi.png",
369                         "pan_popup.png",
370                         "pan_channel.png",
371                         "pan_stick.png",
372                         "pan_channel_small.png",
373                         "pan_stick_small.png");
374         resources->pan_text_color = WHITE;
375
376         resources->pot_images = new_image_set(3,
377                 "pot_up.png",
378                 "pot_hi.png",
379                 "pot_dn.png");
380
381         resources->checkbox_images = new_image_set(5,
382                 "checkbox_up.png",
383                 "checkbox_hi.png",
384                 "checkbox_checked.png",
385                 "checkbox_dn.png",
386                 "checkbox_checkedhi.png");
387
388         resources->radial_images = new_image_set(5,
389                 "radial_up.png",
390                 "radial_hi.png",
391                 "radial_checked.png",
392                 "radial_dn.png",
393                 "radial_checkedhi.png");
394
395         resources->xmeter_images = new_image_set(7,
396                 "xmeter_normal.png",
397                 "xmeter_green.png",
398                 "xmeter_red.png",
399                 "xmeter_yellow.png",
400                 "xmeter_white.png",
401                 "xmeter_over.png",
402                 "downmix51_2.png");
403         resources->ymeter_images = new_image_set(7,
404                 "ymeter_normal.png",
405                 "ymeter_green.png",
406                 "ymeter_red.png",
407                 "ymeter_yellow.png",
408                 "ymeter_white.png",
409                 "ymeter_over.png",
410                 "downmix51_2.png");
411
412         resources->hscroll_data = new_image_set(10,
413                         "hscroll_handle_up.png",
414                         "hscroll_handle_hi.png",
415                         "hscroll_handle_dn.png",
416                         "hscroll_handle_bg.png",
417                         "hscroll_left_up.png",
418                         "hscroll_left_hi.png",
419                         "hscroll_left_dn.png",
420                         "hscroll_right_up.png",
421                         "hscroll_right_hi.png",
422                         "hscroll_right_dn.png");
423
424         resources->vscroll_data = new_image_set(10,
425                         "vscroll_handle_up.png",
426                         "vscroll_handle_hi.png",
427                         "vscroll_handle_dn.png",
428                         "vscroll_handle_bg.png",
429                         "vscroll_left_up.png",
430                         "vscroll_left_hi.png",
431                         "vscroll_left_dn.png",
432                         "vscroll_right_up.png",
433                         "vscroll_right_hi.png",
434                         "vscroll_right_dn.png");
435         resources->scroll_minhandle = 20;
436
437
438         new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
439         new_button("nexttip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "next_tip");
440         new_button("closetip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "close_tip");
441         new_button("swap_extents.png",
442                 "editpanel_up.png",
443                 "editpanel_hi.png",
444                 "editpanel_dn.png",
445                 "swap_extents");
446
447
448 // Record windows
449
450
451         preferences_category_overlap = 0;
452         preferencescategory_x = 0;
453         preferencescategory_y = 5;
454         preferencestitle_x = 5;
455         preferencestitle_y = 10;
456         preferencesoptions_x = 5;
457         preferencesoptions_y = 0;
458
459 // MWindow
460         message_normal = resources->text_default;
461         audio_color = GREEN;
462         mtransport_margin = 10;
463         toggle_margin = 10;
464
465         new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
466         new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
467         new_image_set("ypane", 3, "ypane_up.png", "ypane_hi.png", "ypane_dn.png");
468
469         new_image("mbutton_bg", "mbutton_bg.png");
470         new_image("timebar_bg", "timebar_bg_flat.png");
471         new_image("timebar_brender", "timebar_brender.png");
472         new_image("clock_bg", "mclock_flat.png");
473         new_image("patchbay_bg", "patchbay_bg.png");
474         new_image("statusbar", "statusbar.png");
475 //      new_image("mscroll_filler", "mscroll_filler.png");
476
477         new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
478         new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
479
480         new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
481         new_image("mode_add", "mode_add.png");
482         new_image("mode_divide", "mode_divide.png");
483         new_image("mode_multiply", "mode_multiply.png");
484         new_image("mode_normal", "mode_normal.png");
485         new_image("mode_replace", "mode_replace.png");
486         new_image("mode_subtract", "mode_subtract.png");
487         new_image("mode_max", "mode_max.png");
488
489         new_image_set("plugin_on", 5, "plugin_on.png", "plugin_onhi.png", "plugin_onselect.png", "plugin_ondn.png", "plugin_onselecthi.png");
490         new_image_set("plugin_show", 5, "plugin_show.png", "plugin_showhi.png", "plugin_showselect.png", "plugin_showdn.png", "plugin_showselecthi.png");
491
492 // CWindow
493         new_image("cpanel_bg", "cpanel_bg.png");
494         new_image("cbuttons_left", "cbuttons_left.png");
495         new_image("cbuttons_right", "cbuttons_right.png");
496         new_image("cmeter_bg", "cmeter_bg.png");
497
498 // VWindow
499         new_image("vbuttons_left", "vbuttons_left.png");
500         new_image("vclock", "vclock.png");
501
502         new_image("preferences_bg", "preferences_bg.png");
503
504
505         new_image("new_bg", "new_bg.png");
506         new_image("setformat_bg", "setformat_bg.png");
507
508
509         timebar_view_data = new_image("timebar_view.png");
510
511         setformat_w = get_image("setformat_bg")->get_w();
512         setformat_h = get_image("setformat_bg")->get_h();
513         setformat_x1 = 15;
514         setformat_x2 = 110;
515
516         setformat_x3 = 315;
517         setformat_x4 = 425;
518         setformat_y1 = 20;
519         setformat_y2 = 85;
520         setformat_y3 = 125;
521         setformat_margin = 30;
522         setformat_channels_x = 25;
523         setformat_channels_y = 242;
524         setformat_channels_w = 250;
525         setformat_channels_h = 250;
526
527         loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10;
528         browse_pad = 20;
529
530
531         new_toggle("playpatch.png",
532                 "playpatch_up.png",
533                 "playpatch_hi.png",
534                 "playpatch_checked.png",
535                 "playpatch_dn.png",
536                 "playpatch_checkedhi.png",
537                 "playpatch_data");
538
539         new_toggle("recordpatch.png",
540                 "recordpatch_up.png",
541                 "recordpatch_hi.png",
542                 "recordpatch_checked.png",
543                 "recordpatch_dn.png",
544                 "recordpatch_checkedhi.png",
545                 "recordpatch_data");
546
547         new_toggle("gangpatch.png",
548                 "patch_up.png",
549                 "patch_hi.png",
550                 "patch_checked.png",
551                 "patch_dn.png",
552                 "patch_checkedhi.png",
553                 "gangpatch_data");
554
555         new_toggle("drawpatch.png",
556                 "patch_up.png",
557                 "patch_hi.png",
558                 "patch_checked.png",
559                 "patch_dn.png",
560                 "patch_checkedhi.png",
561                 "drawpatch_data");
562
563
564         new_image_set("mutepatch_data",
565                 5,
566                 "mutepatch_up.png",
567                 "mutepatch_hi.png",
568                 "mutepatch_checked.png",
569                 "mutepatch_dn.png",
570                 "mutepatch_checkedhi.png");
571
572         new_image_set("expandpatch_data",
573                 5,
574                 "expandpatch_up.png",
575                 "expandpatch_hi.png",
576                 "expandpatch_checked.png",
577                 "expandpatch_dn.png",
578                 "expandpatch_checkedhi.png");
579
580         build_bg_data();
581         build_overlays();
582
583
584
585
586         out_point = new_image_set(5,
587                 "out_up.png",
588                 "out_hi.png",
589                 "out_checked.png",
590                 "out_dn.png",
591                 "out_checkedhi.png");
592         in_point = new_image_set(5,
593                 "in_up.png",
594                 "in_hi.png",
595                 "in_checked.png",
596                 "in_dn.png",
597                 "in_checkedhi.png");
598
599         label_toggle = new_image_set(5,
600                 "labeltoggle_up.png",
601                 "labeltoggle_uphi.png",
602                 "label_checked.png",
603                 "labeltoggle_dn.png",
604                 "label_checkedhi.png");
605
606         ffmpeg_toggle = new_image_set(5,
607                 "ff_up.png",
608                 "ff_hi.png",
609                 "ff_checked.png",
610                 "ff_down.png",
611                 "ff_checkedhi.png");
612
613         shbtn_data = new_image_set(3,
614                 "shbtn_up.png",
615                 "shbtn_hi.png",
616                 "shbtn_dn.png");
617
618         new_image_set("preset_edit",
619                 3,
620                 "preset_edit0.png",
621                 "preset_edit1.png",
622                 "preset_edit2.png");
623
624         new_image_set("histogram_carrot",
625                 5,
626                 "histogram_carrot_up.png",
627                 "histogram_carrot_hi.png",
628                 "histogram_carrot_checked.png",
629                 "histogram_carrot_dn.png",
630                 "histogram_carrot_checkedhi.png");
631
632
633         statusbar_cancel_data = new_image_set(3,
634                 "statusbar_cancel_up.png",
635                 "statusbar_cancel_hi.png",
636                 "statusbar_cancel_dn.png");
637
638
639         VFrame *editpanel_up = new_image("editpanel_up.png");
640         VFrame *editpanel_hi = new_image("editpanel_hi.png");
641         VFrame *editpanel_dn = new_image("editpanel_dn.png");
642         VFrame *editpanel_checked = new_image("editpanel_checked.png");
643         VFrame *editpanel_checkedhi = new_image("editpanel_checkedhi.png");
644
645         new_image("panel_divider", "panel_divider.png");
646         new_button("bottom_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "bottom_justify");
647         new_button("center_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "center_justify");
648         new_button("channel.png", editpanel_up, editpanel_hi, editpanel_dn, "channel");
649
650         new_toggle("histogram_toggle.png",
651                 editpanel_up,
652                 editpanel_hi,
653                 editpanel_checked,
654                 editpanel_dn,
655                 editpanel_checkedhi,
656                 "histogram_toggle");
657         new_toggle("histogram_rgb.png",
658                 editpanel_up,
659                 editpanel_hi,
660                 editpanel_checked,
661                 editpanel_dn,
662                 editpanel_checkedhi,
663                 "histogram_rgb_toggle");
664         new_toggle("waveform.png",
665                 editpanel_up,
666                 editpanel_hi,
667                 editpanel_checked,
668                 editpanel_dn,
669                 editpanel_checkedhi,
670                 "waveform_toggle");
671         new_toggle("waveform_rgb.png",
672                 editpanel_up,
673                 editpanel_hi,
674                 editpanel_checked,
675                 editpanel_dn,
676                 editpanel_checkedhi,
677                 "waveform_rgb_toggle");
678         new_toggle("scope.png",
679                 editpanel_up,
680                 editpanel_hi,
681                 editpanel_checked,
682                 editpanel_dn,
683                 editpanel_checkedhi,
684                 "scope_toggle");
685
686         new_button("picture.png", editpanel_up, editpanel_hi, editpanel_dn, "picture");
687         new_button("histogram_img.png", editpanel_up, editpanel_hi, editpanel_dn, "histogram_img");
688
689
690         new_button("copy.png", editpanel_up, editpanel_hi, editpanel_dn, "copy");
691         new_button("commercial.png", editpanel_up, editpanel_hi, editpanel_dn, "commercial");
692         new_button("cut.png", editpanel_up, editpanel_hi, editpanel_dn, "cut");
693         new_button("fit.png", editpanel_up, editpanel_hi, editpanel_dn, "fit");
694         new_button("fitautos.png", editpanel_up, editpanel_hi, editpanel_dn, "fitautos");
695         new_button("inpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "inbutton");
696         new_button("label.png", editpanel_up, editpanel_hi, editpanel_dn, "labelbutton");
697         new_button("left_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "left_justify");
698         new_button("magnify.png", editpanel_up, editpanel_hi, editpanel_dn, "magnify_button");
699         new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
700         new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
701         new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
702         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
703         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
704         new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
705         over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
706         overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
707         new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
708         new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
709         new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
710         splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
711         new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
712         new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
713         new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
714         new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
715         new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
716
717
718         VFrame *transport_up = new_image("transportup.png");
719         VFrame *transport_hi = new_image("transporthi.png");
720         VFrame *transport_dn = new_image("transportdn.png");
721
722         new_button("end.png", transport_up, transport_hi, transport_dn, "end");
723         new_button("fastfwd.png", transport_up, transport_hi, transport_dn, "fastfwd");
724         new_button("fastrev.png", transport_up, transport_hi, transport_dn, "fastrev");
725         new_button("play.png", transport_up, transport_hi, transport_dn, "play");
726         new_button("framefwd.png", transport_up, transport_hi, transport_dn, "framefwd");
727         new_button("framerev.png", transport_up, transport_hi, transport_dn, "framerev");
728         new_button("pause.png", transport_up, transport_hi, transport_dn, "pause");
729         new_button("record.png", transport_up, transport_hi, transport_dn, "record");
730         new_button("singleframe.png", transport_up, transport_hi, transport_dn, "recframe");
731         new_button("reverse.png", transport_up, transport_hi, transport_dn, "reverse");
732         new_button("rewind.png", transport_up, transport_hi, transport_dn, "rewind");
733         new_button("stop.png", transport_up, transport_hi, transport_dn, "stop");
734         new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec");
735
736
737
738 // CWindow icons
739         new_image("cwindow_inactive", "cwindow_inactive.png");
740         new_image("cwindow_active", "cwindow_active.png");
741
742
743
744         new_image_set("category_button",
745                 3,
746                 "preferencesbutton_dn.png",
747                 "preferencesbutton_dnhi.png",
748                 "preferencesbutton_dnlo.png");
749
750         new_image_set("category_button_checked",
751                 3,
752                 "preferencesbutton_up.png",
753                 "preferencesbutton_uphi.png",
754                 "preferencesbutton_dnlo.png");
755
756
757
758
759
760         new_image_set("color3way_point",
761                 3,
762                 "color3way_up.png",
763                 "color3way_hi.png",
764                 "color3way_dn.png");
765
766         new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
767         new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
768         new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
769         new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
770         new_toggle("blank30x30.png",
771                    new_image("locklabels_locked.png"),
772                    new_image("locklabels_lockedhi.png"),
773                    new_image("locklabels_unlocked.png"),
774                    new_image("locklabels_dn.png"), // can't have seperate down for each!!??
775                    new_image("locklabels_unlockedhi.png"),
776                    "locklabels");
777
778         VFrame *cpanel_up = new_image("cpanel_up.png");
779         VFrame *cpanel_hi = new_image("cpanel_hi.png");
780         VFrame *cpanel_dn = new_image("cpanel_dn.png");
781         VFrame *cpanel_checked = new_image("cpanel_checked.png");
782         VFrame *cpanel_checkedhi = new_image("cpanel_checkedhi.png");
783
784
785         new_toggle("camera.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "camera");
786         new_toggle("crop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "crop");
787         new_toggle("eyedrop.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "eyedrop");
788         new_toggle("magnify.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "magnify");
789         new_toggle("mask.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "mask");
790         new_toggle("ruler.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "ruler");
791         new_toggle("projector.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "projector");
792         new_toggle("protect.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "protect");
793         new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
794         new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
795
796         // toggle for tangent mode (compositor/tool window)
797         new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
798         new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
799
800
801         flush_images();
802
803         title_font = MEDIUMFONT_3D;
804         title_color = 0x1b0f11;
805         recordgui_fixed_color = YELLOW;
806         recordgui_variable_color = RED;
807
808         channel_position_color = MEYELLOW;
809         resources->meter_title_w = 25;
810
811         // (asset) edit info text color
812         edit_font_color = YELLOW;
813 }
814
815 #define VWINDOW_METER_MARGIN 5
816
817 void PINKLADY::build_bg_data()
818 {
819 // Audio settings
820         channel_position_data = new VFramePng(get_image_data("channel_position.png"));
821
822 // Track bitmaps
823         new_image("resource1024", "resource1024.png");
824         new_image("resource512", "resource512.png");
825         new_image("resource256", "resource256.png");
826         new_image("resource128", "resource128.png");
827         new_image("resource64", "resource64.png");
828         new_image("resource32", "resource32.png");
829         new_image("plugin_bg_data", "plugin_bg.png");
830         new_image("title_bg_data", "title_bg.png");
831         new_image("vtimebar_bg_data", "vwindow_timebar.png");
832 }
833
834 void PINKLADY::build_overlays()
835 {
836         keyframe_data = new VFramePng(get_image_data("keyframe3.png"));
837         camerakeyframe_data = new VFramePng(get_image_data("camerakeyframe.png"));
838         maskkeyframe_data = new VFramePng(get_image_data("maskkeyframe.png"));
839         modekeyframe_data = new VFramePng(get_image_data("modekeyframe.png"));
840         pankeyframe_data = new VFramePng(get_image_data("pankeyframe.png"));
841         projectorkeyframe_data = new VFramePng(get_image_data("projectorkeyframe.png"));
842 }
843
844 void PINKLADY::draw_rwindow_bg(RecordGUI *gui)
845 {
846 //      int y;
847 //      int margin = 50;
848 //      int margin2 = 80;
849 //      gui->draw_9segment(recordgui_batch_x - margin,
850 //              0,
851 //              mwindow->session->rwindow_w - recordgui_status_x + margin,
852 //              recordgui_buttons_y,
853 //              rgui_batch);
854 //      gui->draw_3segmenth(recordgui_options_x - margin2,
855 //              recordgui_buttons_y - 5,
856 //              mwindow->session->rwindow_w - recordgui_options_x + margin2,
857 //              rgui_controls);
858 //      y = recordgui_buttons_y - 5 + rgui_controls->get_h();
859 //      gui->draw_9segment(0,
860 //              y,
861 //              mwindow->session->rwindow_w,
862 //              mwindow->session->rwindow_h - y,
863 //              rgui_list);
864 }
865
866 void PINKLADY::draw_rmonitor_bg(RecordMonitorGUI *gui)
867 {
868 //      int margin = 45;
869 //      int panel_w = 300;
870 //      int x = rmonitor_meter_x - margin;
871 //      int w = mwindow->session->rmonitor_w - x;
872 //      if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
873 //      gui->clear_box(0,
874 //              0,
875 //              mwindow->session->rmonitor_w,
876 //              mwindow->session->rmonitor_h);
877 //      gui->draw_9segment(x,
878 //              0,
879 //              w,
880 //              mwindow->session->rmonitor_h,
881 //              rmonitor_meters);
882 }
883
884
885
886
887
888
889 void PINKLADY::draw_mwindow_bg(MWindowGUI *gui)
890 {
891 // Button bar
892         gui->draw_3segmenth(mbuttons_x, mbuttons_y - 1,
893                 gui->menu_w(), get_image("mbutton_bg"));
894
895         int pdw = get_image("panel_divider")->get_w();
896         int x = mbuttons_x;
897         x += 9 * get_image("play")->get_w();
898         x += mtransport_margin;                                       // the control buttons
899
900         gui->draw_vframe(get_image("panel_divider"),
901                 x - toggle_margin / 2 - pdw / 2 + 2,
902                 mbuttons_y - 1);
903         x += 2 * get_image("arrow")->get_w() + toggle_margin;           // the mode buttons
904
905         gui->draw_vframe(get_image("panel_divider"),
906                 x - toggle_margin / 2 - pdw / 2 + 2,
907                 mbuttons_y - 1);
908
909         x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;    // the state toggle buttons
910         gui->draw_vframe(get_image("panel_divider"),
911                 x - toggle_margin / 2 - pdw / 2 + 2,
912                 mbuttons_y - 1);
913
914 // Clock
915         gui->draw_3segmenth(0,
916                 mbuttons_y - 1 + get_image("mbutton_bg")->get_h(),
917                 get_image("patchbay_bg")->get_w(),
918                 get_image("clock_bg"));
919
920 // Patchbay
921         gui->draw_3segmentv(patchbay_x,
922                 patchbay_y,
923                 patchbay_h,
924                 get_image("patchbay_bg"));
925
926 // Track canvas
927         gui->set_color(BLACK);
928         gui->draw_box(mcanvas_x + get_image("patchbay_bg")->get_w(),
929                 mcanvas_y + mtimebar_h,
930                 mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
931                 mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
932
933 // Timebar
934         gui->draw_3segmenth(mtimebar_x,
935                 mtimebar_y,
936                 mtimebar_w,
937                 get_image("timebar_bg"));
938
939 // Zoombar
940         gui->set_color(0xffb1d0);
941         gui->draw_box(mzoom_x,
942                 mzoom_y,
943                 mwindow->session->mwindow_w,
944                 25);
945
946 // Scrollbar filler
947 //      gui->draw_vframe(get_image("mscroll_filler"),
948 //              mcanvas_x + mcanvas_w - BC_ScrollBar::get_span(SCROLL_VERT),
949 //              mcanvas_y + mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ));
950
951 // Status
952         gui->draw_3segmenth(mzoom_x,
953                 mzoom_y,
954                 mzoom_w,
955                 get_image("statusbar"));
956
957
958 }
959
960 void PINKLADY::draw_cwindow_bg(CWindowGUI *gui)
961 {
962         gui->draw_3segmentv(0, 0, ccomposite_h, get_image("cpanel_bg"));
963
964         gui->draw_3segmenth(0, ccomposite_h, cstatus_x, get_image("cbuttons_left"));
965
966         if(mwindow->edl->session->cwindow_meter)
967         {
968                 gui->draw_3segmenth(cstatus_x,
969                         ccomposite_h,
970                         cmeter_x - widget_border - cstatus_x,
971                         get_image("cbuttons_right"));
972                 gui->draw_9segment(cmeter_x - widget_border,
973                         0,
974                         mwindow->session->cwindow_w - cmeter_x + widget_border,
975                         mwindow->session->cwindow_h,
976                         get_image("cmeter_bg"));
977         }
978         else
979         {
980                 gui->draw_3segmenth(cstatus_x,
981                         ccomposite_h,
982                         cmeter_x - widget_border - cstatus_x + 100,
983                         get_image("cbuttons_right"));
984         }
985 }
986
987 void PINKLADY::draw_vwindow_bg(VWindowGUI *gui)
988 {
989         gui->draw_3segmenth(0,
990                 vcanvas_h,
991                 vdivision_x,
992                 get_image("vbuttons_left"));
993         if(mwindow->edl->session->vwindow_meter)
994         {
995                 gui->draw_3segmenth(vdivision_x,
996                         vcanvas_h,
997                         vmeter_x - widget_border - vdivision_x,
998                         get_image("cbuttons_right"));
999                 gui->draw_9segment(vmeter_x - widget_border,
1000                         0,
1001                         mwindow->session->vwindow_w - vmeter_x + widget_border,
1002                         mwindow->session->vwindow_h,
1003                         get_image("cmeter_bg"));
1004         }
1005         else
1006         {
1007                 gui->draw_3segmenth(vdivision_x,
1008                         vcanvas_h,
1009                         vmeter_x - widget_border - vdivision_x + 100,
1010                         get_image("cbuttons_right"));
1011         }
1012
1013 // Clock border
1014         gui->draw_3segmenth(vtime_x - 20,
1015                 vtime_y - 1,
1016                 vtime_w + 40,
1017                 get_image("vclock"));
1018 }
1019
1020 void PINKLADY::draw_preferences_bg(PreferencesWindow *gui)
1021 {
1022         gui->draw_vframe(get_image("preferences_bg"), 0, 0);
1023 }
1024
1025 void PINKLADY::draw_new_bg(NewWindow *gui)
1026 {
1027         gui->draw_vframe(get_image("new_bg"), 0, 0);
1028 }
1029
1030 void PINKLADY::draw_setformat_bg(SetFormatWindow *gui)
1031 {
1032         gui->draw_vframe(get_image("setformat_bg"), 0, 0);
1033 }
1034
1035