6 #include "formatpresets.h"
10 #include "setformat.inc"
14 class SetFormatPresets
;
18 class SetFormat
: public BC_MenuItem
21 SetFormat(MWindow
*mwindow
);
23 SetFormatThread
*thread
;
28 class SetFormatThread
: public Thread
31 SetFormatThread(MWindow
*mwindow
);
36 // Update image size based on ratio of dimensions to original.
38 // Update automatic aspect ratio based in image size
40 // Update all parameters from preset menu
45 SetFormatWindow
*window
;
50 int orig_dimension
[2];
56 class SetSampleRateTextBox
: public BC_TextBox
59 SetSampleRateTextBox(SetFormatThread
*thread
, int x
, int y
);
61 SetFormatThread
*thread
;
64 class SetChannelsTextBox
: public BC_TextBox
67 SetChannelsTextBox(SetFormatThread
*thread
, int x
, int y
);
71 SetFormatThread
*thread
;
76 class SetChannelsCanvas
: public BC_SubWindow
79 SetChannelsCanvas(MWindow
*mwindow
,
80 SetFormatThread
*thread
,
87 int draw(int angle
= -1);
88 int get_dimensions(int channel_position
, int &x
, int &y
, int &w
, int &h
);
89 int button_press_event();
90 int button_release_event();
91 int cursor_motion_event();
94 int active_channel
; // for selection
98 int poltoxy(int &x
, int &y
, int r
, int d
);
99 int xytopol(int &d
, int x
, int y
);
101 SetFormatThread
*thread
;
103 RotateFrame
*rotater
;
107 class SetFrameRateTextBox
: public BC_TextBox
110 SetFrameRateTextBox(SetFormatThread
*thread
, int x
, int y
);
112 SetFormatThread
*thread
;
115 class ScaleSizeText
: public BC_TextBox
118 ScaleSizeText(int x
, int y
, SetFormatThread
*thread
, int *output
);
121 SetFormatThread
*thread
;
126 class ScaleRatioText
: public BC_TextBox
129 ScaleRatioText(int x
, int y
, SetFormatThread
*thread
, float *output
);
132 SetFormatThread
*thread
;
136 class ScaleAspectAuto
: public BC_CheckBox
139 ScaleAspectAuto(int x
, int y
, SetFormatThread
*thread
);
142 SetFormatThread
*thread
;
145 class ScaleAspectText
: public BC_TextBox
148 ScaleAspectText(int x
, int y
, SetFormatThread
*thread
, float *output
);
151 SetFormatThread
*thread
;
155 class SetFormatApply
: public BC_GenericButton
158 SetFormatApply(int x
, int y
, SetFormatThread
*thread
);
160 SetFormatThread
*thread
;
163 class SetFormatPresets
: public FormatPresets
166 SetFormatPresets(MWindow
*mwindow
, SetFormatWindow
*gui
, int x
, int y
);
172 class FormatSwapExtents
: public BC_Button
175 FormatSwapExtents(MWindow
*mwindow
,
176 SetFormatThread
*thread
,
177 SetFormatWindow
*gui
,
182 SetFormatThread
*thread
;
183 SetFormatWindow
*gui
;
186 class SetFormatWindow
: public BC_Window
189 SetFormatWindow(MWindow
*mwindow
,
190 SetFormatThread
*thread
,
194 void create_objects();
195 char* get_preset_text();
198 SetFormatThread
*thread
;
199 SetChannelsCanvas
*canvas
;
200 // Screen size width, height
201 ScaleSizeText
* dimension
[2];
202 SetFormatPresets
*presets
;
203 // Size ratio width, height
204 ScaleRatioText
* ratio
[2];
206 ScaleAspectText
*aspect_w
;
207 ScaleAspectText
*aspect_h
;
208 SetSampleRateTextBox
*sample_rate
;
209 SetChannelsTextBox
*channels
;
210 SetFrameRateTextBox
*frame_rate
;
211 BC_TextBox
*color_model
;
212 ScaleAspectAuto
*auto_aspect
;