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);
69 Transition *transition;
70 // Plugin being modified if there is one
72 char window_title[BCTEXTLEN];
73 // If attaching from main menu
77 // type of attached plugin
78 int plugin_type; // 0: none 1: plugin 2: shared plugin 3: module
80 // location of attached plugin if shared
81 SharedLocation shared_location;
83 // Title of attached plugin if new
84 char plugin_title[BCTEXTLEN];
85 // For the main menu invocation,
86 // attach 1 standalone on the first track and share it with other tracks
87 int single_standalone;
90 class PluginDialog : public BC_Window
93 PluginDialog(MWindow *mwindow,
94 PluginDialogThread *thread,
100 void create_objects();
102 int attach_new(int number);
103 int attach_shared(int number);
104 int attach_module(int number);
105 void save_settings();
106 int resize_event(int w, int h);
108 BC_Title *standalone_title;
109 PluginDialogNew *standalone_list;
110 BC_Title *shared_title;
111 PluginDialogShared *shared_list;
112 BC_Title *module_title;
113 PluginDialogModules *module_list;
114 PluginDialogSingle *single_standalone;
117 PluginDialogThru *thru;
119 PluginDialogThread *thread;
121 ArrayList<BC_ListBoxItem*> standalone_data;
122 ArrayList<BC_ListBoxItem*> shared_data;
123 ArrayList<BC_ListBoxItem*> module_data;
124 ArrayList<SharedLocation*> plugin_locations; // locations of all shared plugins
125 ArrayList<SharedLocation*> module_locations; // locations of all shared modules
126 ArrayList<PluginServer*> plugindb; // locations of all simple plugins, no need for memory freeing!
128 int selected_available;
130 int selected_modules;
137 * class PluginDialogTextBox : public BC_TextBox
140 * PluginDialogTextBox(PluginDialog *dialog, char *text, int x, int y);
141 * ~PluginDialogTextBox();
143 * int handle_event();
144 * PluginDialog *dialog;
149 * class PluginDialogDetach : public BC_GenericButton
152 * PluginDialogDetach(MWindow *mwindow, PluginDialog *dialog, int x, int y);
153 * ~PluginDialogDetach();
155 * int handle_event();
156 * PluginDialog *dialog;
161 * class PluginDialogAttachNew : public BC_GenericButton
164 * PluginDialogAttachNew(MWindow *mwindow, PluginDialog *dialog, int x, int y);
165 * ~PluginDialogAttachNew();
167 * int handle_event();
168 * PluginDialog *dialog;
171 * class PluginDialogChangeNew : public BC_GenericButton
174 * PluginDialogChangeNew(MWindow *mwindow, PluginDialog *dialog, int x, int y);
175 * ~PluginDialogChangeNew();
177 * int handle_event();
178 * PluginDialog *dialog;
183 class PluginDialogNew : public BC_ListBox
186 PluginDialogNew(PluginDialog *dialog,
187 ArrayList<BC_ListBoxItem*> *standalone_data,
195 int selection_changed();
196 PluginDialog *dialog;
199 class PluginDialogShared : public BC_ListBox
202 PluginDialogShared(PluginDialog *dialog,
203 ArrayList<BC_ListBoxItem*> *shared_data,
208 ~PluginDialogShared();
211 int selection_changed();
212 PluginDialog *dialog;
215 class PluginDialogModules : public BC_ListBox
218 PluginDialogModules(PluginDialog *dialog,
219 ArrayList<BC_ListBoxItem*> *module_data,
224 ~PluginDialogModules();
227 int selection_changed();
228 PluginDialog *dialog;
231 class PluginDialogSingle : public BC_CheckBox
234 PluginDialogSingle(PluginDialog *dialog, int x, int y);
236 PluginDialog *dialog;
241 * class PluginDialogAttachShared : public BC_GenericButton
244 * PluginDialogAttachShared(MWindow *mwindow, PluginDialog *dialog, int x, int y);
245 * ~PluginDialogAttachShared();
247 * int handle_event();
248 * PluginDialog *dialog;
251 * class PluginDialogChangeShared : public BC_GenericButton
254 * PluginDialogChangeShared(MWindow *mwindow, PluginDialog *dialog, int x, int y);
255 * ~PluginDialogChangeShared();
257 * int handle_event();
258 * PluginDialog *dialog;
262 * class PluginDialogAttachModule : public BC_GenericButton
265 * PluginDialogAttachModule(MWindow *mwindow, PluginDialog *dialog, int x, int y);
266 * ~PluginDialogAttachModule();
268 * int handle_event();
269 * PluginDialog *dialog;
272 * class PluginDialogChangeModule : public BC_GenericButton
275 * PluginDialogChangeModule(MWindow *mwindow, PluginDialog *dialog, int x, int y);
276 * ~PluginDialogChangeModule();
278 * int handle_event();
279 * PluginDialog *dialog;