3 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
21 #ifndef __PLUGINLV2GUI_H__
22 #define __PLUGINLV2GUI_H__
26 #include "pluginlv2gui.inc"
27 #include "pluginlv2ui.h"
28 #include "pluginaclient.h"
30 class PluginLV2ClientUI : public BC_GenericButton {
32 PluginLV2ClientWindow *gui;
34 PluginLV2ClientUI(PluginLV2ClientWindow *gui, int x, int y);
39 class PluginLV2ClientReset : public BC_GenericButton
42 PluginLV2ClientWindow *gui;
44 PluginLV2ClientReset(PluginLV2ClientWindow *gui, int x, int y);
45 ~PluginLV2ClientReset();
49 class PluginLV2ClientText : public BC_TextBox {
51 PluginLV2ClientWindow *gui;
53 PluginLV2ClientText(PluginLV2ClientWindow *gui, int x, int y, int w);
54 ~PluginLV2ClientText();
58 class PluginLV2ClientApply : public BC_GenericButton {
60 PluginLV2ClientWindow *gui;
62 PluginLV2ClientApply(PluginLV2ClientWindow *gui, int x, int y);
63 ~PluginLV2ClientApply();
67 class PluginLV2Client_OptPanel : public BC_ListBox
70 PluginLV2Client_OptPanel(PluginLV2ClientWindow *gui, int x, int y, int w, int h);
71 ~PluginLV2Client_OptPanel();
73 PluginLV2ClientWindow *gui;
74 ArrayList<BC_ListBoxItem*> items[2];
75 ArrayList<BC_ListBoxItem*> &opts;
76 ArrayList<BC_ListBoxItem*> &vals;
78 int selection_changed();
82 class PluginLV2ClientPot : public BC_FPot
85 PluginLV2ClientPot(PluginLV2ClientWindow *gui, int x, int y);
87 PluginLV2ClientWindow *gui;
90 class PluginLV2ClientSlider : public BC_FSlider
93 PluginLV2ClientSlider(PluginLV2ClientWindow *gui, int x, int y);
95 PluginLV2ClientWindow *gui;
98 class PluginLV2ClientWindow : public PluginClientWindow
101 PluginLV2ClientWindow(PluginLV2Client *client);
102 ~PluginLV2ClientWindow();
103 void done_event(int result);
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);
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();
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;