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 __TRACKPOPUP_H__
23 #define __TRACKPOPUP_H__
26 #include "colorpicker.h"
27 #include "mwindow.inc"
28 #include "mwindowgui.inc"
29 #include "plugindialog.inc"
30 #include "resizetrackthread.inc"
32 #include "trackpopup.inc"
35 class TrackPopup : public BC_PopupMenu
38 TrackPopup(MWindow *mwindow, MWindowGUI *gui);
41 void create_objects();
42 int activate_menu(Track *track, Edit *edit,
43 PluginSet *pluginset, Plugin *plugin, double position);
47 TrackPopupResize *resize_option;
48 TrackPopupMatchSize *matchsize_option;
57 class TrackPopupMatchSize : public BC_MenuItem
60 TrackPopupMatchSize(MWindow *mwindow, TrackPopup *popup);
61 ~TrackPopupMatchSize();
67 class TrackPopupResize : public BC_MenuItem
70 TrackPopupResize(MWindow *mwindow, TrackPopup *popup);
75 ResizeTrackThread *dialog_thread;
78 class TrackPopupDeleteTrack : public BC_MenuItem
81 TrackPopupDeleteTrack(MWindow *mwindow, TrackPopup *popup);
87 class TrackPopupAddTrack : public BC_MenuItem
90 TrackPopupAddTrack(MWindow *mwindow, TrackPopup *popup);
96 class TrackAttachEffect : public BC_MenuItem
99 TrackAttachEffect(MWindow *mwindow, TrackPopup *popup);
100 ~TrackAttachEffect();
106 PluginDialogThread *dialog_thread;
109 class TrackMoveUp : public BC_MenuItem
112 TrackMoveUp(MWindow *mwindow, TrackPopup *popup);
121 class TrackMoveDown : public BC_MenuItem
124 TrackMoveDown(MWindow *mwindow, TrackPopup *popup);
133 class TrackRollUp : public BC_MenuItem
136 TrackRollUp(MWindow *mwindow, TrackPopup *popup);
145 class TrackRollDown : public BC_MenuItem
148 TrackRollDown(MWindow *mwindow, TrackPopup *popup);
157 class TrackPopupFindAsset : public BC_MenuItem
160 TrackPopupFindAsset(MWindow *mwindow, TrackPopup *popup);
166 class TrackPopupUserTitle : public BC_MenuItem
169 TrackPopupUserTitle(MWindow *mwindow, TrackPopup *popup);
170 ~TrackPopupUserTitle();
176 TrackUserTitleDialogThread *dialog_thread;
179 class TrackPopupUserTitleText : public BC_TextBox
182 TrackPopupUserTitleText(TrackPopupUserTitleWindow *window,
183 MWindow *mwindow, int x, int y, const char *text);
184 ~TrackPopupUserTitleText();
188 TrackPopupUserTitleWindow *window;
191 class TrackPopupUserTitleWindow : public BC_Window
194 TrackPopupUserTitleWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
195 ~TrackPopupUserTitleWindow();
197 void create_objects();
198 void handle_close_event(int result);
200 TrackPopupUserTitleText *title_text;
203 char new_text[BCTEXTLEN];
206 class TrackUserTitleDialogThread : public BC_DialogThread
209 TrackUserTitleDialogThread(TrackPopupUserTitle *edit_title);
210 ~TrackUserTitleDialogThread();
212 void handle_close_event(int result);
213 void handle_done_event(int result);
214 BC_Window* new_gui();
215 void start(int wx, int wy);
218 TrackPopupUserTitle *edit_title;
219 TrackPopupUserTitleWindow *window;
223 class TrackPopupTitleColor : public BC_MenuItem
226 TrackPopupTitleColor(MWindow *mwindow, TrackPopup *popup);
227 ~TrackPopupTitleColor();
233 TrackTitleColorPicker *color_picker;
236 class TrackTitleColorDefault : public BC_GenericButton
239 TrackTitleColorDefault(TrackTitleColorPicker *color_picker, int x, int y);
242 TrackTitleColorPicker *color_picker;
245 class TrackTitleColorPicker : public ColorPicker
248 TrackTitleColorPicker(TrackPopup *popup, int color);
249 ~TrackTitleColorPicker();
250 void create_objects(ColorWindow *gui);
251 int handle_new_color(int color, int alpha);
252 void handle_done_event(int result);
259 class TrackPopupShow : public BC_MenuItem
262 TrackPopupShow(MWindow *mwindow, TrackPopup *popup);
269 TrackShowDialogThread *dialog_thread;
272 class TrackShowDialogThread : public BC_DialogThread
275 TrackShowDialogThread(TrackPopupShow *edit_show);
276 ~TrackShowDialogThread();
277 BC_Window* new_gui();
278 void start(int wx, int wy);
279 void handle_close_event(int result);
282 TrackPopupShow *edit_show;
283 TrackPopupShowWindow *window;
286 class TrackPopupShowText : public BC_TextBox
289 TrackPopupShowText(TrackPopupShowWindow *window,
290 MWindow *mwindow, int x, int y, const char *text);
291 ~TrackPopupShowText();
293 TrackPopupShowWindow *window;
297 class TrackPopupShowWindow : public BC_Window
300 TrackPopupShowWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
301 ~TrackPopupShowWindow();
303 void create_objects();
305 TrackPopupShowText *show_text;