add bluray dv, misc fixes
[goodguy/history.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 TransitionPopupOn;
33 class TransitionPopupShow;
34 class TransitionPopupAttach;
35 class TransitionPopupDetach;
36 class TransitionPopupLength;
37 class TransitionLengthText;
38
39 class TransitionLengthThread : public BC_DialogThread
40 {
41 public:
42         TransitionLengthThread(MWindow *mwindow);
43         ~TransitionLengthThread();
44
45         void start(Transition *transition,
46                 double length);
47         BC_Window* new_gui();
48         void handle_close_event(int result);
49
50         MWindow *mwindow;
51
52         Transition *transition;
53         double length;
54         double orig_length;
55 };
56
57
58 class TransitionLengthDialog : public BC_Window
59 {
60 public:
61         TransitionLengthDialog(MWindow *mwindow,
62                 TransitionLengthThread *thread,
63                 int x,
64                 int y);
65         ~TransitionLengthDialog();
66
67         void create_objects();
68         int close_event();
69
70         MWindow *mwindow;
71         TransitionLengthThread *thread;
72         TransitionLengthText *text;
73         double length;
74 };
75
76 class TransitionLengthText : public BC_TumbleTextBox
77 {
78 public:
79         TransitionLengthText(MWindow *mwindow,
80                 TransitionLengthDialog *gui,
81                 int x,
82                 int y);
83         int handle_event();
84         MWindow *mwindow;
85         TransitionLengthDialog *gui;
86 };
87
88
89 class TransitionPopup : public BC_PopupMenu
90 {
91 public:
92         TransitionPopup(MWindow *mwindow, MWindowGUI *gui);
93         ~TransitionPopup();
94
95         void create_objects();
96         int update(Transition *transition);
97
98 // Acquired through the update command as the plugin currently being operated on
99 // Can't be dereferenced.
100         Transition *transition;
101         double length;
102
103 // Set when the user clicks a transition.
104         MWindow *mwindow;
105         MWindowGUI *gui;
106
107 // Needed for loading updates
108         TransitionPopupOn *on;
109         TransitionPopupShow *show;
110         TransitionPopupAttach *attach;
111         TransitionPopupDetach *detach;
112         TransitionPopupLength *length_item;
113         TransitionLengthThread *length_thread;
114 };
115
116
117 class TransitionPopupAttach : public BC_MenuItem
118 {
119 public:
120         TransitionPopupAttach(MWindow *mwindow, TransitionPopup *popup);
121         ~TransitionPopupAttach();
122
123         int handle_event();
124         MWindow *mwindow;
125         TransitionPopup *popup;
126 };
127
128 class TransitionPopupDetach : public BC_MenuItem
129 {
130 public:
131         TransitionPopupDetach(MWindow *mwindow, TransitionPopup *popup);
132         ~TransitionPopupDetach();
133
134         int handle_event();
135         MWindow *mwindow;
136         TransitionPopup *popup;
137 };
138
139 class TransitionPopupShow : public BC_MenuItem
140 {
141 public:
142         TransitionPopupShow(MWindow *mwindow, TransitionPopup *popup);
143         ~TransitionPopupShow();
144
145         int handle_event();
146         MWindow *mwindow;
147         TransitionPopup *popup;
148 };
149
150 class TransitionPopupOn : public BC_MenuItem
151 {
152 public:
153         TransitionPopupOn(MWindow *mwindow, TransitionPopup *popup);
154         ~TransitionPopupOn();
155
156         int handle_event();
157         MWindow *mwindow;
158         TransitionPopup *popup;
159 };
160
161 class TransitionPopupLength : public BC_MenuItem
162 {
163 public:
164         TransitionPopupLength(MWindow *mwindow, TransitionPopup *popup);
165         ~TransitionPopupLength();
166
167         int handle_event();
168         MWindow *mwindow;
169         TransitionPopup *popup;
170 };
171
172 #endif