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
26 // Presets for effects & transitions
31 #include "mwindow.inc"
33 #include "presets.inc"
41 class PresetsThread : public BC_DialogThread
44 PresetsThread(MWindow *mwindow);
47 void calculate_list();
48 void start_window(Plugin *plugin);
50 void handle_done_event(int result);
51 void handle_close_event(int result);
52 void save_preset(char *title);
53 void delete_preset(char *title);
54 void apply_preset(char *title);
56 char window_title[BCTEXTLEN];
57 char plugin_title[BCTEXTLEN];
60 ArrayList<BC_ListBoxItem*> *data;
61 PresetsDB *presets_db;
64 class PresetsList : public BC_ListBox
67 PresetsList(PresetsThread *thread,
68 PresetsWindow *window,
73 int selection_changed();
75 PresetsThread *thread;
76 PresetsWindow *window;
79 class PresetsText : public BC_TextBox
82 PresetsText(PresetsThread *thread,
83 PresetsWindow *window,
88 PresetsThread *thread;
89 PresetsWindow *window;
93 class PresetsDelete : public BC_GenericButton
96 PresetsDelete(PresetsThread *thread,
97 PresetsWindow *window,
101 PresetsThread *thread;
102 PresetsWindow *window;
105 class PresetsSave : public BC_GenericButton
108 PresetsSave(PresetsThread *thread,
109 PresetsWindow *window,
113 PresetsThread *thread;
114 PresetsWindow *window;
117 class PresetsApply : public BC_GenericButton
120 PresetsApply(PresetsThread *thread,
121 PresetsWindow *window,
125 PresetsThread *thread;
126 PresetsWindow *window;
129 class PresetsOK : public BC_OKButton
132 PresetsOK(PresetsThread *thread,
133 PresetsWindow *window);
134 int keypress_event();
135 PresetsThread *thread;
136 PresetsWindow *window;
140 class PresetsWindow : public BC_Window
143 PresetsWindow(MWindow *mwindow,
144 PresetsThread *thread,
149 void create_objects();
150 int resize_event(int w, int h);
153 PresetsText *title_text;
154 PresetsDelete *delete_button;
155 PresetsSave *save_button;
156 PresetsApply *apply_button;
160 PresetsThread *thread;