Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / pluginlv2gui.h
1 /*
2  * CINELERRA
3  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  */
20
21 #ifndef __PLUGINLV2GUI_H__
22 #define __PLUGINLV2GUI_H__
23
24 #include "guicast.h"
25 #include "forkbase.h"
26 #include "pluginlv2gui.inc"
27 #include "pluginlv2ui.h"
28 #include "pluginaclient.h"
29
30 class PluginLV2ClientUI : public BC_GenericButton {
31 public:
32         PluginLV2ClientWindow *gui;
33
34         PluginLV2ClientUI(PluginLV2ClientWindow *gui, int x, int y);
35         ~PluginLV2ClientUI();
36         int handle_event();
37 };
38
39 class PluginLV2ClientReset : public BC_GenericButton
40 {
41 public:
42         PluginLV2ClientWindow *gui;
43
44         PluginLV2ClientReset(PluginLV2ClientWindow *gui, int x, int y);
45         ~PluginLV2ClientReset();
46         int handle_event();
47 };
48
49 class PluginLV2ClientText : public BC_TextBox {
50 public:
51         PluginLV2ClientWindow *gui;
52
53         PluginLV2ClientText(PluginLV2ClientWindow *gui, int x, int y, int w);
54         ~PluginLV2ClientText();
55         int handle_event();
56 };
57
58 class PluginLV2ClientApply : public BC_GenericButton {
59 public:
60         PluginLV2ClientWindow *gui;
61
62         PluginLV2ClientApply(PluginLV2ClientWindow *gui, int x, int y);
63         ~PluginLV2ClientApply();
64         int handle_event();
65 };
66
67 class PluginLV2Client_OptPanel : public BC_ListBox
68 {
69 public:
70         PluginLV2Client_OptPanel(PluginLV2ClientWindow *gui, int x, int y, int w, int h);
71         ~PluginLV2Client_OptPanel();
72
73         PluginLV2ClientWindow *gui;
74         ArrayList<BC_ListBoxItem*> items[2];
75         ArrayList<BC_ListBoxItem*> &opts;
76         ArrayList<BC_ListBoxItem*> &vals;
77
78         int selection_changed();
79         void update();
80 };
81
82 class PluginLV2ClientPot : public BC_FPot
83 {
84 public:
85         PluginLV2ClientPot(PluginLV2ClientWindow *gui, int x, int y);
86         int handle_event();
87         PluginLV2ClientWindow *gui;
88 };
89
90 class PluginLV2ClientSlider : public BC_FSlider
91 {
92 public:
93         PluginLV2ClientSlider(PluginLV2ClientWindow *gui, int x, int y);
94         int handle_event();
95         PluginLV2ClientWindow *gui;
96 };
97
98 class PluginLV2ClientWindow : public PluginClientWindow
99 {
100 public:
101         PluginLV2ClientWindow(PluginLV2Client *client);
102         ~PluginLV2ClientWindow();
103         void done_event(int result);
104
105         void create_objects();
106         int resize_event(int w, int h);
107         void update_selected();
108         void update_selected(float v);
109         int scalar(float f, char *rp);
110         void update(PluginLV2Client_Opt *opt);
111         void lv2_update();
112         void lv2_update(float *vals);
113         void lv2_ui_enable();
114         void lv2_set(int idx, float val);
115         PluginLV2ParentUI *find_ui();
116         PluginLV2ParentUI *get_ui();
117
118         PluginLV2Client *client;
119         PluginLV2ClientUI *client_ui;
120         PluginLV2ClientReset *reset;
121         PluginLV2ClientApply *apply;
122         PluginLV2ClientPot *pot;
123         PluginLV2ClientSlider *slider;
124         PluginLV2ClientText *text;
125         BC_Title *varbl, *range;
126         PluginLV2Client_OptPanel *panel;
127         PluginLV2Client_Opt *selected;
128
129 };
130
131 #endif