7 #include "ctimebar.inc"
9 #include "cwindowtool.inc"
10 #include "editpanel.h"
11 #include "floatauto.inc"
12 #include "floatautos.inc"
14 #include "mainclock.inc"
15 #include "maskauto.inc"
16 #include "meterpanel.h"
17 #include "mwindow.inc"
18 #include "playtransport.h"
21 #include "zoompanel.h"
26 class CWindowDestination
;
28 class CWindowTransport
;
33 #define AUTO_ZOOM "Auto"
35 class CWindowGUI
: public BC_Window
38 CWindowGUI(MWindow
*mwindow
, CWindow
*cwindow
);
42 int resize_event(int w
, int h
);
45 int translation_event();
46 void set_operation(int value
);
51 // Zero out pointers to affected auto
52 void reset_affected();
53 void keyboard_zoomin();
54 void keyboard_zoomout();
58 CWindowEditing
*edit_panel
;
59 // APanel *automation_panel;
60 CPanel
*composite_panel
;
61 CWindowZoom
*zoom_panel
;
62 CWindowSlider
*slider
;
64 CWindowTransport
*transport
;
65 CWindowCanvas
*canvas
;
72 CWindowMeters
*meters
;
75 CWindowTool
*tool_panel
;
77 // Cursor motion modification being done
78 int current_operation
;
79 // The pointers are only used for dragging. Information for tool windows
80 // must be integers and recalculted for every keypress.
81 // Track being modified in canvas
82 Track
*affected_track
;
83 // Transformation keyframe being modified
84 FloatAuto
*affected_x
;
85 FloatAuto
*affected_y
;
86 FloatAuto
*affected_z
;
87 // Keyfrom not affecting transformation being affected
88 Auto
*affected_keyframe
;
89 // Mask point being modified
91 // Scrollbar offsets during last button press relative to output
92 float x_offset
, y_offset
;
93 // Cursor location during the last button press relative to output
94 // and offset by scroll bars
95 float x_origin
, y_origin
;
96 // Crop handle being dragged
98 // If dragging crop translation
100 // Origin of crop handle during last button press
101 float crop_origin_x
, crop_origin_y
;
102 // Origin of all 4 crop points during last button press
103 float crop_origin_x1
, crop_origin_y1
;
104 float crop_origin_x2
, crop_origin_y2
;
106 // Origin for camera and projector operations during last button press
107 float center_x
, center_y
, center_z
;
108 float control_in_x
, control_in_y
, control_out_x
, control_out_y
;
110 // Must recalculate the origin when pressing shift.
111 // Switch toggle on and off to recalculate origin.
112 int translating_zoom
;
116 class CWindowEditing
: public EditPanel
119 CWindowEditing(MWindow
*mwindow
, CWindow
*cwindow
);
129 class CWindowMeters
: public MeterPanel
132 CWindowMeters(MWindow
*mwindow
, CWindowGUI
*gui
, int x
, int y
, int h
);
135 int change_status_event();
141 class CWindowZoom
: public ZoomPanel
144 CWindowZoom(MWindow
*mwindow
, CWindowGUI
*gui
, int x
, int y
);
152 class CWindowSlider
: public BC_PercentageSlider
155 CWindowSlider(MWindow
*mwindow
, CWindow
*cwindow
, int x
, int y
, int pixels
);
160 int increase_value();
161 int decrease_value();
167 class CWindowReset
: public BC_Button
170 CWindowReset(MWindow
*mwindow
, CWindowGUI
*cwindow
, int x
, int y
);
177 // class CWindowDestination : public BC_PopupTextBox
180 // CWindowDestination(MWindow *mwindow, CWindowGUI *cwindow, int x, int y);
181 // ~CWindowDestination();
182 // int handle_event();
183 // CWindowGUI *cwindow;
187 class CWindowTransport
: public PlayTransport
190 CWindowTransport(MWindow
*mwindow
,
202 class CWindowCanvas
: public Canvas
205 CWindowCanvas(MWindow
*mwindow
, CWindowGUI
*gui
);
208 void zoom_resize_window(float percentage
);
209 void update_zoom(int x
, int y
, float zoom
);
213 int do_eyedrop(int &rerender
, int button_press
);
214 int do_mask(int &redraw
,
220 void draw_overlays();
221 void draw_safe_regions();
222 // Cursor may have to be drawn
223 int cursor_leave_event();
224 int cursor_enter_event();
225 int cursor_motion_event();
226 int button_press_event();
227 int button_release_event();
228 int test_crop(int button_press
, int &redraw
);
229 int test_bezier(int button_press
,
234 int test_zoom(int &redraw
);
236 void reset_projector();
237 void reset_keyframe(int do_camera
);
238 void draw_crophandle(int x
, int y
);
240 // Draw the projector overlay in different colors.
241 void draw_bezier(int do_camera
);
243 void calculate_origin();
244 void toggle_controls();
245 int get_cwindow_controls();