4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef PLUGINDIALOG_H
23 #define PLUGINDIALOG_H
25 class PluginDialogTextBox;
26 class PluginDialogDetach;
27 class PluginDialogNew;
28 class PluginDialogShared;
29 class PluginDialogModules;
30 class PluginDialogAttachNew;
31 class PluginDialogChangeNew;
33 class PluginDialogOut;
34 class PluginDialogThru;
35 class PluginDialogSingle;
39 #include "condition.inc"
42 #include "mwindow.inc"
44 #include "pluginserver.inc"
45 #include "sharedlocation.h"
48 #include "transition.inc"
50 class PluginDialogThread : public BC_DialogThread
53 PluginDialogThread(MWindow *mwindow);
54 ~PluginDialogThread();
56 // Set up parameters for a transition menu.
57 void start_window(Track *track,
63 void handle_done_event(int result);
64 void handle_close_event(int result);
71 Transition *transition;
72 // Plugin being modified if there is one
74 char window_title[BCTEXTLEN];
75 // If attaching from main menu
79 // type of attached plugin
80 int plugin_type; // 0: none 1: plugin 2: shared plugin 3: module
82 // location of attached plugin if shared
83 SharedLocation shared_location;
85 // Title of attached plugin if new
86 char plugin_title[BCTEXTLEN];
87 // For the main menu invocation,
88 // attach 1 standalone on the first track and share it with other tracks
89 int single_standalone;
92 class PluginDialog : public BC_Window
95 PluginDialog(MWindow *mwindow,
96 PluginDialogThread *thread,
102 void create_objects();
104 int attach_new(int number);
105 int attach_shared(int number);
106 int attach_module(int number);
108 int resize_event(int w, int h);
110 BC_Title *standalone_title;
111 PluginDialogNew *standalone_list;
112 BC_Title *shared_title;
113 PluginDialogShared *shared_list;
114 BC_Title *module_title;
115 PluginDialogModules *module_list;
116 PluginDialogSingle *single_standalone;
119 PluginDialogThru *thru;
121 PluginDialogThread *thread;
123 ArrayList<BC_ListBoxItem*> standalone_data;
124 ArrayList<BC_ListBoxItem*> shared_data;
125 ArrayList<BC_ListBoxItem*> module_data;
126 ArrayList<SharedLocation*> plugin_locations; // locations of all shared plugins
127 ArrayList<SharedLocation*> module_locations; // locations of all shared modules
128 ArrayList<PluginServer*> plugindb; // locations of all simple plugins, no need for memory freeing!
130 int selected_available;
132 int selected_modules;
139 * class PluginDialogTextBox : public BC_TextBox
142 * PluginDialogTextBox(PluginDialog *dialog, char *text, int x, int y);
143 * ~PluginDialogTextBox();
145 * int handle_event();
146 * PluginDialog *dialog;
151 * class PluginDialogDetach : public BC_GenericButton
154 * PluginDialogDetach(MWindow *mwindow, PluginDialog *dialog, int x, int y);
155 * ~PluginDialogDetach();
157 * int handle_event();
158 * PluginDialog *dialog;
163 * class PluginDialogAttachNew : public BC_GenericButton
166 * PluginDialogAttachNew(MWindow *mwindow, PluginDialog *dialog, int x, int y);
167 * ~PluginDialogAttachNew();
169 * int handle_event();
170 * PluginDialog *dialog;
173 * class PluginDialogChangeNew : public BC_GenericButton
176 * PluginDialogChangeNew(MWindow *mwindow, PluginDialog *dialog, int x, int y);
177 * ~PluginDialogChangeNew();
179 * int handle_event();
180 * PluginDialog *dialog;
185 class PluginDialogNew : public BC_ListBox
188 PluginDialogNew(PluginDialog *dialog,
189 ArrayList<BC_ListBoxItem*> *standalone_data,
197 int selection_changed();
198 PluginDialog *dialog;
201 class PluginDialogShared : public BC_ListBox
204 PluginDialogShared(PluginDialog *dialog,
205 ArrayList<BC_ListBoxItem*> *shared_data,
210 ~PluginDialogShared();
213 int selection_changed();
214 PluginDialog *dialog;
217 class PluginDialogModules : public BC_ListBox
220 PluginDialogModules(PluginDialog *dialog,
221 ArrayList<BC_ListBoxItem*> *module_data,
226 ~PluginDialogModules();
229 int selection_changed();
230 PluginDialog *dialog;
233 class PluginDialogSingle : public BC_CheckBox
236 PluginDialogSingle(PluginDialog *dialog, int x, int y);
238 PluginDialog *dialog;
243 * class PluginDialogAttachShared : public BC_GenericButton
246 * PluginDialogAttachShared(MWindow *mwindow, PluginDialog *dialog, int x, int y);
247 * ~PluginDialogAttachShared();
249 * int handle_event();
250 * PluginDialog *dialog;
253 * class PluginDialogChangeShared : public BC_GenericButton
256 * PluginDialogChangeShared(MWindow *mwindow, PluginDialog *dialog, int x, int y);
257 * ~PluginDialogChangeShared();
259 * int handle_event();
260 * PluginDialog *dialog;
264 * class PluginDialogAttachModule : public BC_GenericButton
267 * PluginDialogAttachModule(MWindow *mwindow, PluginDialog *dialog, int x, int y);
268 * ~PluginDialogAttachModule();
270 * int handle_event();
271 * PluginDialog *dialog;
274 * class PluginDialogChangeModule : public BC_GenericButton
277 * PluginDialogChangeModule(MWindow *mwindow, PluginDialog *dialog, int x, int y);
278 * ~PluginDialogChangeModule();
280 * int handle_event();
281 * PluginDialog *dialog;