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();
87 void update_text(double length);
90 TransitionLengthThread *thread;
91 TransitionUnitsPopup *units_popup;
92 TransitionLengthText *text;
96 class TransitionLengthText : public BC_TumbleTextBox
99 TransitionLengthText(MWindow *mwindow,
100 TransitionLengthDialog *gui,
104 int handle_up_down(int dir);
105 int handle_up_event();
106 int handle_down_event();
109 TransitionLengthDialog *gui;
113 class TransitionPopup : public BC_PopupMenu
116 TransitionPopup(MWindow *mwindow, MWindowGUI *gui);
119 void create_objects();
120 int update(Transition *transition);
122 // Acquired through the update command as the plugin currently being operated on
123 // Can't be dereferenced.
124 Transition *transition;
126 // Set when the user clicks a transition.
130 // Needed for loading updates
131 TransitionPopupOn *on;
132 TransitionPopupShow *show;
133 TransitionPopupAttach *attach;
134 TransitionPopupDetach *detach;
135 TransitionPopupLength *length_item;
136 TransitionLengthThread *length_thread;
140 class TransitionPopupAttach : public BC_MenuItem
143 TransitionPopupAttach(MWindow *mwindow, TransitionPopup *popup);
144 ~TransitionPopupAttach();
148 TransitionPopup *popup;
151 class TransitionPopupDetach : public BC_MenuItem
154 TransitionPopupDetach(MWindow *mwindow, TransitionPopup *popup);
155 ~TransitionPopupDetach();
159 TransitionPopup *popup;
162 class TransitionPopupShow : public BC_MenuItem
165 TransitionPopupShow(MWindow *mwindow, TransitionPopup *popup);
166 ~TransitionPopupShow();
170 TransitionPopup *popup;
173 class TransitionPopupOn : public BC_MenuItem
176 TransitionPopupOn(MWindow *mwindow, TransitionPopup *popup);
177 ~TransitionPopupOn();
181 TransitionPopup *popup;
184 class TransitionPopupLength : public BC_MenuItem
187 TransitionPopupLength(MWindow *mwindow, TransitionPopup *popup);
188 ~TransitionPopupLength();
192 TransitionPopup *popup;