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