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 TRANSITIONPOPUP_H
23 #define TRANSITIONPOPUP_H
27 #include "mwindowgui.inc"
29 #include "transition.inc"
30 #include "transitionpopup.inc"
32 class TransitionUnitsItem : public BC_MenuItem
35 TransitionUnitsItem(TransitionUnitsPopup *popup, const char *text, int id);
36 ~TransitionUnitsItem();
40 TransitionUnitsPopup *popup;
44 class TransitionUnitsPopup : public BC_PopupMenu
47 TransitionUnitsPopup(TransitionLengthDialog *gui, int x, int y);
48 ~TransitionUnitsPopup();
50 void create_objects();
52 TransitionLengthDialog *gui;
57 class TransitionLengthThread : public BC_DialogThread
60 TransitionLengthThread(MWindow *mwindow);
61 ~TransitionLengthThread();
63 void start(Transition *transition,
66 void handle_close_event(int result);
67 int update(double length);
71 Transition *transition;
76 class TransitionLengthDialog : public BC_Window
79 TransitionLengthDialog(MWindow *mwindow,
80 TransitionLengthThread *thread,
83 ~TransitionLengthDialog();
85 void create_objects();
89 TransitionLengthThread *thread;
90 TransitionUnitsPopup *units_popup;
91 TransitionLengthText *text;
95 class TransitionLengthText : public BC_TumbleTextBox
98 TransitionLengthText(MWindow *mwindow,
99 TransitionLengthDialog *gui,
103 int handle_up_down(int dir);
104 int handle_up_event();
105 int handle_down_event();
108 TransitionLengthDialog *gui;
112 class TransitionPopup : public BC_PopupMenu
115 TransitionPopup(MWindow *mwindow, MWindowGUI *gui);
118 void create_objects();
119 int update(Transition *transition);
121 // Acquired through the update command as the plugin currently being operated on
122 // Can't be dereferenced.
123 Transition *transition;
125 // Set when the user clicks a transition.
129 // Needed for loading updates
130 TransitionPopupOn *on;
131 TransitionPopupShow *show;
132 TransitionPopupAttach *attach;
133 TransitionPopupDetach *detach;
134 TransitionPopupLength *length_item;
135 TransitionLengthThread *length_thread;
139 class TransitionPopupAttach : public BC_MenuItem
142 TransitionPopupAttach(MWindow *mwindow, TransitionPopup *popup);
143 ~TransitionPopupAttach();
147 TransitionPopup *popup;
150 class TransitionPopupDetach : public BC_MenuItem
153 TransitionPopupDetach(MWindow *mwindow, TransitionPopup *popup);
154 ~TransitionPopupDetach();
158 TransitionPopup *popup;
161 class TransitionPopupShow : public BC_MenuItem
164 TransitionPopupShow(MWindow *mwindow, TransitionPopup *popup);
165 ~TransitionPopupShow();
169 TransitionPopup *popup;
172 class TransitionPopupOn : public BC_MenuItem
175 TransitionPopupOn(MWindow *mwindow, TransitionPopup *popup);
176 ~TransitionPopupOn();
180 TransitionPopup *popup;
183 class TransitionPopupLength : public BC_MenuItem
186 TransitionPopupLength(MWindow *mwindow, TransitionPopup *popup);
187 ~TransitionPopupLength();
191 TransitionPopup *popup;