4 //#include "apanel.inc"
6 #include "bezierauto.inc"
7 #include "bezierautos.inc"
10 #include "ctimebar.inc"
11 #include "cwindow.inc"
12 #include "cwindowtool.inc"
13 #include "editpanel.h"
14 #include "floatautos.inc"
16 #include "mainclock.inc"
17 #include "maskauto.inc"
18 #include "meterpanel.h"
19 #include "mwindow.inc"
20 #include "playtransport.h"
23 #include "zoompanel.h"
28 class CWindowDestination
;
30 class CWindowTransport
;
35 #define AUTO_ZOOM "Auto"
37 class CWindowGUI
: public BC_Window
40 CWindowGUI(MWindow
*mwindow
, CWindow
*cwindow
);
44 int resize_event(int w
, int h
);
47 int translation_event();
48 void set_operation(int value
);
56 CWindowEditing
*edit_panel
;
57 // APanel *automation_panel;
58 CPanel
*composite_panel
;
59 CWindowZoom
*zoom_panel
;
60 CWindowSlider
*slider
;
62 CWindowTransport
*transport
;
63 CWindowCanvas
*canvas
;
70 CWindowMeters
*meters
;
73 CWindowTool
*tool_panel
;
75 // Cursor motion modification being done
76 int current_operation
;
77 // The pointers are only used for dragging. Information for tool windows
78 // must be integers and recalculted for every keypress.
79 // Track being modified in canvas
80 Track
*affected_track
;
81 // Keyframe being modified
83 // Mask point being modified
85 // Scrollbar offsets during last button press relative to output
86 float x_offset
, y_offset
;
87 // Cursor location during the last button press relative to output
88 // and offset by scroll bars
89 float x_origin
, y_origin
;
90 // Crop handle being dragged
92 // Origin of crop handle during last button press
93 float crop_origin_x
, crop_origin_y
;
94 // Origin for camera and projector operations during last button press
95 float center_x
, center_y
, center_z
;
96 float control_in_x
, control_in_y
, control_out_x
, control_out_y
;
98 // Must recalculate the origin when pressing shift.
99 // Switch toggle on and off to recalculate origin.
100 int translating_zoom
;
104 class CWindowEditing
: public EditPanel
107 CWindowEditing(MWindow
*mwindow
, CWindow
*cwindow
);
117 class CWindowMeters
: public MeterPanel
120 CWindowMeters(MWindow
*mwindow
, CWindowGUI
*gui
, int x
, int y
, int h
);
123 int change_status_event();
129 class CWindowZoom
: public ZoomPanel
132 CWindowZoom(MWindow
*mwindow
, CWindowGUI
*gui
, int x
, int y
);
140 class CWindowSlider
: public BC_PercentageSlider
143 CWindowSlider(MWindow
*mwindow
, CWindow
*cwindow
, int x
, int y
, int pixels
);
148 int increase_value();
149 int decrease_value();
155 class CWindowReset
: public BC_Button
158 CWindowReset(MWindow
*mwindow
, CWindowGUI
*cwindow
, int x
, int y
);
165 // class CWindowDestination : public BC_PopupTextBox
168 // CWindowDestination(MWindow *mwindow, CWindowGUI *cwindow, int x, int y);
169 // ~CWindowDestination();
170 // int handle_event();
171 // CWindowGUI *cwindow;
175 class CWindowTransport
: public PlayTransport
178 CWindowTransport(MWindow
*mwindow
,
190 class CWindowCanvas
: public Canvas
193 CWindowCanvas(MWindow
*mwindow
, CWindowGUI
*gui
);
196 void zoom_resize_window(float percentage
);
197 void update_zoom(int x
, int y
, float zoom
);
201 int do_mask(int &redraw
,
207 void draw_overlays();
208 void draw_safe_regions();
209 // Cursor may have to be drawn
210 int cursor_leave_event();
211 int cursor_enter_event();
212 int cursor_motion_event();
213 int button_press_event();
214 int button_release_event();
215 int test_crop(int button_press
, int &redraw
);
216 int test_bezier(int button_press
,
221 int test_zoom(int &redraw
);
223 void reset_projector();
224 void reset_keyframe(int do_camera
);
225 void draw_crophandle(int x
, int y
);
226 int do_bezier_center(BezierAuto
*current
,
227 BezierAutos
*camera_autos
,
228 BezierAutos
*projector_autos
,
229 FloatAutos
*czoom_autos
,
230 FloatAutos
*pzoom_autos
,
233 void draw_bezier_joining(BezierAuto
*first
,
235 BezierAutos
*camera_autos
,
236 BezierAutos
*projector_autos
,
237 FloatAutos
*czoom_autos
,
238 FloatAutos
*pzoom_autos
,
240 void draw_bezier(int do_camera
);
242 void calculate_origin();
243 void toggle_controls();
244 int get_cwindow_controls();