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
);
44 // Events for the fullscreen canvas fall through to here.
45 int button_press_event();
46 int cursor_leave_event();
47 int cursor_enter_event();
48 int button_release_event();
49 int cursor_motion_event();
52 void zoom_canvas(int do_auto
, double value
, int update_menu
);
56 int translation_event();
57 void set_operation(int value
);
62 // Zero out pointers to affected auto
63 void reset_affected();
64 void keyboard_zoomin();
65 void keyboard_zoomout();
69 CWindowEditing
*edit_panel
;
70 // APanel *automation_panel;
71 CPanel
*composite_panel
;
72 CWindowZoom
*zoom_panel
;
73 CWindowSlider
*slider
;
75 CWindowTransport
*transport
;
76 CWindowCanvas
*canvas
;
83 CWindowMeters
*meters
;
86 CWindowTool
*tool_panel
;
88 // Cursor motion modification being done
89 int current_operation
;
90 // The pointers are only used for dragging. Information for tool windows
91 // must be integers and recalculted for every keypress.
92 // Track being modified in canvas
93 Track
*affected_track
;
94 // Transformation keyframe being modified
95 FloatAuto
*affected_x
;
96 FloatAuto
*affected_y
;
97 FloatAuto
*affected_z
;
98 // Keyfrom not affecting transformation being affected
99 Auto
*affected_keyframe
;
100 // Mask point being modified
102 // Scrollbar offsets during last button press relative to output
103 float x_offset
, y_offset
;
104 // Cursor location during the last button press relative to output
105 // and offset by scroll bars
106 float x_origin
, y_origin
;
107 // Crop handle being dragged
109 // If dragging crop translation
111 // Origin of crop handle during last button press
112 float crop_origin_x
, crop_origin_y
;
113 // Origin of all 4 crop points during last button press
114 float crop_origin_x1
, crop_origin_y1
;
115 float crop_origin_x2
, crop_origin_y2
;
117 // Origin for camera and projector operations during last button press
118 float center_x
, center_y
, center_z
;
119 float control_in_x
, control_in_y
, control_out_x
, control_out_y
;
121 // Must recalculate the origin when pressing shift.
122 // Switch toggle on and off to recalculate origin.
123 int translating_zoom
;
127 class CWindowEditing
: public EditPanel
130 CWindowEditing(MWindow
*mwindow
, CWindow
*cwindow
);
140 class CWindowMeters
: public MeterPanel
143 CWindowMeters(MWindow
*mwindow
, CWindowGUI
*gui
, int x
, int y
, int h
);
146 int change_status_event();
152 class CWindowZoom
: public ZoomPanel
155 CWindowZoom(MWindow
*mwindow
, CWindowGUI
*gui
, int x
, int y
);
163 class CWindowSlider
: public BC_PercentageSlider
166 CWindowSlider(MWindow
*mwindow
, CWindow
*cwindow
, int x
, int y
, int pixels
);
171 int increase_value();
172 int decrease_value();
178 class CWindowReset
: public BC_Button
181 CWindowReset(MWindow
*mwindow
, CWindowGUI
*cwindow
, int x
, int y
);
188 // class CWindowDestination : public BC_PopupTextBox
191 // CWindowDestination(MWindow *mwindow, CWindowGUI *cwindow, int x, int y);
192 // ~CWindowDestination();
193 // int handle_event();
194 // CWindowGUI *cwindow;
198 class CWindowTransport
: public PlayTransport
201 CWindowTransport(MWindow
*mwindow
,
213 class CWindowCanvas
: public Canvas
216 CWindowCanvas(MWindow
*mwindow
, CWindowGUI
*gui
);
219 void zoom_resize_window(float percentage
);
220 void update_zoom(int x
, int y
, float zoom
);
224 int do_eyedrop(int &rerender
, int button_press
);
225 int do_mask(int &redraw
,
231 void draw_overlays();
232 void draw_safe_regions();
233 // Cursor may have to be drawn
234 int cursor_leave_event();
235 int cursor_enter_event();
236 int cursor_motion_event();
237 int button_press_event();
238 int button_release_event();
239 int get_fullscreen();
240 void set_fullscreen(int value
);
241 int test_crop(int button_press
, int &redraw
);
242 int test_bezier(int button_press
,
247 int test_zoom(int &redraw
);
249 void reset_projector();
250 void reset_keyframe(int do_camera
);
251 void draw_crophandle(int x
, int y
);
254 // Draw the projector overlay in different colors.
255 void draw_bezier(int do_camera
);
257 void calculate_origin();
258 void toggle_controls();
259 int get_cwindow_controls();