fullscreen segv fix, popup for 4opts preview, renderfarm print fix, pan widget upgrad...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / transitionpopup.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef TRANSITIONPOPUP_H
23 #define TRANSITIONPOPUP_H
24
25 #include "bcdialog.h"
26 #include "guicast.h"
27 #include "mwindowgui.inc"
28 #include "plugin.inc"
29 #include "transition.inc"
30 #include "transitionpopup.inc"
31
32 class TransitionUnitsItem : public BC_MenuItem
33 {
34 public:
35         TransitionUnitsItem(TransitionUnitsPopup *popup, const char *text, int id);
36         ~TransitionUnitsItem();
37
38         int handle_event();
39
40         TransitionUnitsPopup *popup;
41         int id;
42 };
43
44 class TransitionUnitsPopup : public BC_PopupMenu
45 {
46 public:
47         TransitionUnitsPopup(TransitionLengthDialog *gui, int x, int y);
48         ~TransitionUnitsPopup();
49
50         void create_objects();
51
52         TransitionLengthDialog *gui;
53         int units;
54 };
55
56
57 class TransitionLengthThread : public BC_DialogThread
58 {
59 public:
60         TransitionLengthThread(MWindow *mwindow);
61         ~TransitionLengthThread();
62
63         void start(Transition *transition,
64                 double length);
65         BC_Window* new_gui();
66         void handle_close_event(int result);
67         int update(double length);
68
69         MWindow *mwindow;
70
71         Transition *transition;
72         double orig_length;
73         double new_length;
74 };
75
76 class TransitionLengthDialog : public BC_Window
77 {
78 public:
79         TransitionLengthDialog(MWindow *mwindow,
80                 TransitionLengthThread *thread,
81                 int x,
82                 int y);
83         ~TransitionLengthDialog();
84
85         void create_objects();
86         int close_event();
87
88         MWindow *mwindow;
89         TransitionLengthThread *thread;
90         TransitionUnitsPopup *units_popup;
91         TransitionLengthText *text;
92         double length;
93 };
94
95 class TransitionLengthText : public BC_TumbleTextBox
96 {
97 public:
98         TransitionLengthText(MWindow *mwindow,
99                 TransitionLengthDialog *gui,
100                 int x,
101                 int y);
102         int handle_event();
103         int handle_up_down(int dir);
104         int handle_up_event();
105         int handle_down_event();
106
107         MWindow *mwindow;
108         TransitionLengthDialog *gui;
109 };
110
111
112 class TransitionPopup : public BC_PopupMenu
113 {
114 public:
115         TransitionPopup(MWindow *mwindow, MWindowGUI *gui);
116         ~TransitionPopup();
117
118         void create_objects();
119         int update(Transition *transition);
120
121 // Acquired through the update command as the plugin currently being operated on
122 // Can't be dereferenced.
123         Transition *transition;
124
125 // Set when the user clicks a transition.
126         MWindow *mwindow;
127         MWindowGUI *gui;
128
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;
136 };
137
138
139 class TransitionPopupAttach : public BC_MenuItem
140 {
141 public:
142         TransitionPopupAttach(MWindow *mwindow, TransitionPopup *popup);
143         ~TransitionPopupAttach();
144
145         int handle_event();
146         MWindow *mwindow;
147         TransitionPopup *popup;
148 };
149
150 class TransitionPopupDetach : public BC_MenuItem
151 {
152 public:
153         TransitionPopupDetach(MWindow *mwindow, TransitionPopup *popup);
154         ~TransitionPopupDetach();
155
156         int handle_event();
157         MWindow *mwindow;
158         TransitionPopup *popup;
159 };
160
161 class TransitionPopupShow : public BC_MenuItem
162 {
163 public:
164         TransitionPopupShow(MWindow *mwindow, TransitionPopup *popup);
165         ~TransitionPopupShow();
166
167         int handle_event();
168         MWindow *mwindow;
169         TransitionPopup *popup;
170 };
171
172 class TransitionPopupOn : public BC_MenuItem
173 {
174 public:
175         TransitionPopupOn(MWindow *mwindow, TransitionPopup *popup);
176         ~TransitionPopupOn();
177
178         int handle_event();
179         MWindow *mwindow;
180         TransitionPopup *popup;
181 };
182
183 class TransitionPopupLength : public BC_MenuItem
184 {
185 public:
186         TransitionPopupLength(MWindow *mwindow, TransitionPopup *popup);
187         ~TransitionPopupLength();
188
189         int handle_event();
190         MWindow *mwindow;
191         TransitionPopup *popup;
192 };
193
194 #endif