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 RESIZETRACKTHREAD_H
23 #define RESIZETRACKTHREAD_H
30 #include "assetedit.inc"
33 #include "mwindow.inc"
38 class ResizeVTrackWindow;
40 class ResizeVTrackThread : public Thread
43 ResizeVTrackThread(MWindow *mwindow);
44 ~ResizeVTrackThread();
46 void start_window(int w, int h, int w1, int h1);
48 virtual void update() {}
50 ResizeVTrackWindow *window;
54 double w_scale, h_scale;
59 class ResizeVTrackWindow;
62 class ResizeVTrackWidth : public BC_TextBox
65 ResizeVTrackWidth(ResizeVTrackWindow *gui,
66 ResizeVTrackThread *thread,
70 ResizeVTrackWindow *gui;
71 ResizeVTrackThread *thread;
74 class ResizeVTrackSwap : public BC_Button
77 ResizeVTrackSwap(ResizeVTrackWindow *gui,
78 ResizeVTrackThread *thread,
82 ResizeVTrackWindow *gui;
83 ResizeVTrackThread *thread;
86 class ResizeVTrackHeight : public BC_TextBox
89 ResizeVTrackHeight(ResizeVTrackWindow *gui,
90 ResizeVTrackThread *thread,
94 ResizeVTrackWindow *gui;
95 ResizeVTrackThread *thread;
99 class ResizeVTrackScaleW : public BC_TextBox
102 ResizeVTrackScaleW(ResizeVTrackWindow *gui,
103 ResizeVTrackThread *thread,
107 ResizeVTrackWindow *gui;
108 ResizeVTrackThread *thread;
111 class ResizeVTrackScaleH : public BC_TextBox
114 ResizeVTrackScaleH(ResizeVTrackWindow *gui,
115 ResizeVTrackThread *thread,
119 ResizeVTrackWindow *gui;
120 ResizeVTrackThread *thread;
123 class ResizeReset : public BC_Button
126 ResizeReset(ResizeVTrackWindow *gui,
127 ResizeVTrackThread *thread, int x, int y);
129 ResizeVTrackWindow *gui;
130 ResizeVTrackThread *thread;
134 class ResizeVTrackWindow : public BC_Window
137 ResizeVTrackWindow(MWindow *mwindow,
138 ResizeVTrackThread *thread,
141 ~ResizeVTrackWindow();
143 void create_objects();
144 void update(int changed_scale, int changed_size);
147 ResizeVTrackThread *thread;
148 ResizeVTrackWidth *w;
149 ResizeVTrackHeight *h;
150 ResizeVTrackScaleW *w_scale;
151 ResizeVTrackScaleH *h_scale;
156 class ResizeTrackThread : public ResizeVTrackThread
159 ResizeTrackThread(MWindow *mwindow);
160 ~ResizeTrackThread();
162 void start_window(Track *track);
168 class ResizeAssetThread : public ResizeVTrackThread
171 ResizeAssetThread(AssetEditWindow *fwindow);
172 ~ResizeAssetThread();
174 void start_window(Asset *asset);
177 AssetEditWindow *fwindow;
181 class ResizeAssetButton : public BC_GenericButton
184 ResizeAssetButton(AssetEditWindow *fwindow, int x, int y);
185 ~ResizeAssetButton();
189 ResizeAssetThread *resize_asset_thread;
190 AssetEditWindow *fwindow;