add libdav1d codec, add remap_a/v_codec option keywords
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / resizetrackthread.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 RESIZETRACKTHREAD_H
23 #define RESIZETRACKTHREAD_H
24
25
26
27
28
29 #include "asset.inc"
30 #include "assetedit.inc"
31 #include "guicast.h"
32 #include "mutex.inc"
33 #include "mwindow.inc"
34 #include "thread.h"
35 #include "track.inc"
36
37
38 class ResizeVTrackWindow;
39
40 class ResizeVTrackThread : public Thread
41 {
42 public:
43         ResizeVTrackThread(MWindow *mwindow);
44         ~ResizeVTrackThread();
45
46         void start_window(int w, int h, int w1, int h1);
47         void run();
48         virtual void update() {}
49
50         ResizeVTrackWindow *window;
51         MWindow *mwindow;
52         int w, h;
53         int w1, h1;
54         double w_scale, h_scale;
55 };
56
57
58
59 class ResizeVTrackWindow;
60
61
62 class ResizeVTrackWidth : public BC_TextBox
63 {
64 public:
65         ResizeVTrackWidth(ResizeVTrackWindow *gui,
66                 ResizeVTrackThread *thread,
67                 int x,
68                 int y);
69         int handle_event();
70         ResizeVTrackWindow *gui;
71         ResizeVTrackThread *thread;
72 };
73
74 class ResizeVTrackSwap : public BC_Button
75 {
76 public:
77         ResizeVTrackSwap(ResizeVTrackWindow *gui,
78                 ResizeVTrackThread *thread,
79                 int x,
80                 int y);
81         int handle_event();
82         ResizeVTrackWindow *gui;
83         ResizeVTrackThread *thread;
84 };
85
86 class ResizeVTrackHeight : public BC_TextBox
87 {
88 public:
89         ResizeVTrackHeight(ResizeVTrackWindow *gui,
90                 ResizeVTrackThread *thread,
91                 int x,
92                 int y);
93         int handle_event();
94         ResizeVTrackWindow *gui;
95         ResizeVTrackThread *thread;
96 };
97
98
99 class ResizeVTrackScaleW : public BC_TextBox
100 {
101 public:
102         ResizeVTrackScaleW(ResizeVTrackWindow *gui,
103                 ResizeVTrackThread *thread,
104                 int x,
105                 int y);
106         int handle_event();
107         ResizeVTrackWindow *gui;
108         ResizeVTrackThread *thread;
109 };
110
111 class ResizeVTrackScaleH : public BC_TextBox
112 {
113 public:
114         ResizeVTrackScaleH(ResizeVTrackWindow *gui,
115                 ResizeVTrackThread *thread,
116                 int x,
117                 int y);
118         int handle_event();
119         ResizeVTrackWindow *gui;
120         ResizeVTrackThread *thread;
121 };
122
123
124 class ResizeVTrackWindow : public BC_Window
125 {
126 public:
127         ResizeVTrackWindow(MWindow *mwindow,
128                 ResizeVTrackThread *thread,
129                 int x,
130                 int y);
131         ~ResizeVTrackWindow();
132
133         void create_objects();
134         void update(int changed_scale,
135                 int changed_size,
136                 int changed_all);
137
138         MWindow *mwindow;
139         ResizeVTrackThread *thread;
140         ResizeVTrackWidth *w;
141         ResizeVTrackHeight *h;
142         ResizeVTrackScaleW *w_scale;
143         ResizeVTrackScaleH *h_scale;
144 };
145
146
147 class ResizeTrackThread : public ResizeVTrackThread
148 {
149 public:
150         ResizeTrackThread(MWindow *mwindow);
151         ~ResizeTrackThread();
152
153         void start_window(Track *track);
154         void update();
155
156         Track *track;
157 };
158
159 class ResizeAssetThread : public ResizeVTrackThread
160 {
161 public:
162         ResizeAssetThread(AssetEditWindow *fwindow);
163         ~ResizeAssetThread();
164
165         void start_window(Asset *asset);
166         void update();
167
168         AssetEditWindow *fwindow;
169         Asset *asset;
170 };
171
172 class ResizeAssetButton : public BC_GenericButton
173 {
174 public:
175         ResizeAssetButton(AssetEditWindow *fwindow, int x, int y);
176         ~ResizeAssetButton();
177
178         int handle_event();
179
180         ResizeAssetThread *resize_asset_thread;
181         AssetEditWindow *fwindow;
182 };
183
184 #endif