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 TrackPopupFindAsset : public BC_MenuItem
136 TrackPopupFindAsset(MWindow *mwindow, TrackPopup *popup);
142 class TrackPopupUserTitle : public BC_MenuItem
145 TrackPopupUserTitle(MWindow *mwindow, TrackPopup *popup);
146 ~TrackPopupUserTitle();
152 TrackUserTitleDialogThread *dialog_thread;
155 class TrackPopupUserTitleText : public BC_TextBox
158 TrackPopupUserTitleText(TrackPopupUserTitleWindow *window,
159 MWindow *mwindow, int x, int y, const char *text);
160 ~TrackPopupUserTitleText();
164 TrackPopupUserTitleWindow *window;
167 class TrackPopupUserTitleWindow : public BC_Window
170 TrackPopupUserTitleWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
171 ~TrackPopupUserTitleWindow();
173 void create_objects();
174 void handle_close_event(int result);
176 TrackPopupUserTitleText *title_text;
179 char new_text[BCTEXTLEN];
182 class TrackUserTitleDialogThread : public BC_DialogThread
185 TrackUserTitleDialogThread(TrackPopupUserTitle *edit_title);
186 ~TrackUserTitleDialogThread();
188 void handle_close_event(int result);
189 void handle_done_event(int result);
190 BC_Window* new_gui();
191 void start(int wx, int wy);
194 TrackPopupUserTitle *edit_title;
195 TrackPopupUserTitleWindow *window;
199 class TrackPopupTitleColor : public BC_MenuItem
202 TrackPopupTitleColor(MWindow *mwindow, TrackPopup *popup);
203 ~TrackPopupTitleColor();
209 TrackTitleColorPicker *color_picker;
212 class TrackTitleColorDefault : public BC_GenericButton
215 TrackTitleColorDefault(TrackTitleColorPicker *color_picker, int x, int y);
218 TrackTitleColorPicker *color_picker;
221 class TrackTitleColorPicker : public ColorPicker
224 TrackTitleColorPicker(TrackPopup *popup, int color);
225 ~TrackTitleColorPicker();
226 void create_objects(ColorWindow *gui);
227 int handle_new_color(int color, int alpha);
228 void handle_done_event(int result);
235 class TrackPopupShow : public BC_MenuItem
238 TrackPopupShow(MWindow *mwindow, TrackPopup *popup);
245 TrackShowDialogThread *dialog_thread;
248 class TrackShowDialogThread : public BC_DialogThread
251 TrackShowDialogThread(TrackPopupShow *edit_show);
252 ~TrackShowDialogThread();
253 BC_Window* new_gui();
254 void start(int wx, int wy);
255 void handle_close_event(int result);
258 TrackPopupShow *edit_show;
259 TrackPopupShowWindow *window;
262 class TrackPopupShowText : public BC_TextBox
265 TrackPopupShowText(TrackPopupShowWindow *window,
266 MWindow *mwindow, int x, int y, const char *text);
267 ~TrackPopupShowText();
269 TrackPopupShowWindow *window;
273 class TrackPopupShowWindow : public BC_Window
276 TrackPopupShowWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
277 ~TrackPopupShowWindow();
279 void create_objects();
281 TrackPopupShowText *show_text;