Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

cwindowgui.h

Go to the documentation of this file.
00001 #ifndef CWINDOWGUI_H
00002 #define CWINDOWGUI_H
00003 
00004 #include "auto.inc"
00005 #include "canvas.h"
00006 #include "cpanel.inc"
00007 #include "ctimebar.inc"
00008 #include "cwindow.inc"
00009 #include "cwindowtool.inc"
00010 #include "editpanel.h"
00011 #include "floatauto.inc"
00012 #include "floatautos.inc"
00013 #include "guicast.h"
00014 #include "mainclock.inc"
00015 #include "maskauto.inc"
00016 #include "meterpanel.h"
00017 #include "mwindow.inc"
00018 #include "playtransport.h"
00019 #include "thread.h"
00020 #include "track.inc"
00021 #include "zoompanel.h"
00022 
00023 class CWindowZoom;
00024 class CWindowSlider;
00025 class CWindowReset;
00026 class CWindowDestination;
00027 class CWindowMeters;
00028 class CWindowTransport;
00029 class CWindowCanvas;
00030 class CWindowEditing;
00031 
00032 
00033 #define AUTO_ZOOM "Auto"
00034 
00035 class CWindowGUI : public BC_Window
00036 {
00037 public:
00038         CWindowGUI(MWindow *mwindow, CWindow *cwindow);
00039         ~CWindowGUI();
00040 
00041     int create_objects();
00042         int resize_event(int w, int h);
00043         int close_event();
00044         int keypress_event();
00045         int translation_event();
00046         void set_operation(int value);
00047         void update_tool();
00048         void drag_motion();
00049         int drag_stop();
00050         void draw_status();
00051 // Zero out pointers to affected auto
00052         void reset_affected();
00053         void keyboard_zoomin();
00054         void keyboard_zoomout();
00055 
00056         MWindow *mwindow;
00057     CWindow *cwindow;
00058         CWindowEditing *edit_panel;
00059 //      APanel *automation_panel;
00060         CPanel *composite_panel;
00061         CWindowZoom *zoom_panel;
00062         CWindowSlider *slider;
00063         CWindowReset *reset;
00064         CWindowTransport *transport;
00065         CWindowCanvas *canvas;
00066         CTimeBar *timebar;
00067         BC_Pixmap *active;
00068         BC_Pixmap *inactive;
00069 //      MainClock *clock;
00070 
00071 
00072         CWindowMeters *meters;
00073 
00074 
00075         CWindowTool *tool_panel;
00076 
00077 // Cursor motion modification being done
00078         int current_operation;
00079 // The pointers are only used for dragging.  Information for tool windows
00080 // must be integers and recalculted for every keypress.
00081 // Track being modified in canvas
00082         Track *affected_track;
00083 // Transformation keyframe being modified
00084         FloatAuto *affected_x;
00085         FloatAuto *affected_y;
00086         FloatAuto *affected_z;
00087 // Keyfrom not affecting transformation being affected
00088         Auto *affected_keyframe;
00089 // Mask point being modified
00090         int affected_point;
00091 // Scrollbar offsets during last button press relative to output
00092         float x_offset, y_offset;
00093 // Cursor location during the last button press relative to output
00094 // and offset by scroll bars
00095         float x_origin, y_origin;
00096 // Crop handle being dragged
00097         int crop_handle;
00098 // If dragging crop translation
00099         int crop_translate;
00100 // Origin of crop handle during last button press
00101         float crop_origin_x, crop_origin_y;
00102 // Origin of all 4 crop points during last button press
00103         float crop_origin_x1, crop_origin_y1;
00104         float crop_origin_x2, crop_origin_y2;
00105 
00106 // Origin for camera and projector operations during last button press
00107         float center_x, center_y, center_z;
00108         float control_in_x, control_in_y, control_out_x, control_out_y;
00109         int current_tool;
00110 // Must recalculate the origin when pressing shift.
00111 // Switch toggle on and off to recalculate origin.
00112         int translating_zoom;
00113 };
00114 
00115 
00116 class CWindowEditing : public EditPanel
00117 {
00118 public:
00119         CWindowEditing(MWindow *mwindow, CWindow *cwindow);
00120         
00121         void set_inpoint();
00122         void set_outpoint();
00123 
00124         MWindow *mwindow;
00125         CWindow *cwindow;
00126 };
00127 
00128 
00129 class CWindowMeters : public MeterPanel
00130 {
00131 public:
00132         CWindowMeters(MWindow *mwindow, CWindowGUI *gui, int x, int y, int h);
00133         ~CWindowMeters();
00134         
00135         int change_status_event();
00136         
00137         MWindow *mwindow;
00138         CWindowGUI *gui;
00139 };
00140 
00141 class CWindowZoom : public ZoomPanel
00142 {
00143 public:
00144         CWindowZoom(MWindow *mwindow, CWindowGUI *gui, int x, int y);
00145         ~CWindowZoom();
00146         int handle_event();
00147         MWindow *mwindow;
00148         CWindowGUI *gui;
00149 };
00150 
00151 
00152 class CWindowSlider : public BC_PercentageSlider
00153 {
00154 public:
00155         CWindowSlider(MWindow *mwindow, CWindow *cwindow, int x, int y, int pixels);
00156         ~CWindowSlider();
00157 
00158         int handle_event();
00159         void set_position();
00160         int increase_value();
00161         int decrease_value();
00162 
00163         MWindow *mwindow;
00164         CWindow *cwindow;
00165 };
00166 
00167 class CWindowReset : public BC_Button
00168 {
00169 public:
00170         CWindowReset(MWindow *mwindow, CWindowGUI *cwindow, int x, int y);
00171         ~CWindowReset();
00172         int handle_event();
00173         CWindowGUI *cwindow;
00174         MWindow *mwindow;
00175 };
00176 
00177 // class CWindowDestination : public BC_PopupTextBox
00178 // {
00179 // public:
00180 //      CWindowDestination(MWindow *mwindow, CWindowGUI *cwindow, int x, int y);
00181 //      ~CWindowDestination();
00182 //      int handle_event();
00183 //      CWindowGUI *cwindow;
00184 //      MWindow *mwindow;
00185 // };
00186 
00187 class CWindowTransport : public PlayTransport
00188 {
00189 public:
00190         CWindowTransport(MWindow *mwindow, 
00191                 CWindowGUI *gui, 
00192                 int x, 
00193                 int y);
00194         EDL* get_edl();
00195         void goto_start();
00196         void goto_end();
00197 
00198         CWindowGUI *gui;
00199 };
00200 
00201 
00202 class CWindowCanvas : public Canvas
00203 {
00204 public:
00205         CWindowCanvas(MWindow *mwindow, CWindowGUI *gui);
00206 
00207         void status_event();
00208         void zoom_resize_window(float percentage);
00209         void update_zoom(int x, int y, float zoom);
00210         int get_xscroll();
00211         int get_yscroll();
00212         float get_zoom();
00213         int do_eyedrop(int &rerender, int button_press);
00214         int do_mask(int &redraw, 
00215                 int &rerender, 
00216                 int button_press, 
00217                 int cursor_motion,
00218                 int draw);
00219         void draw_refresh();
00220         void draw_overlays();
00221         void draw_safe_regions();
00222 // Cursor may have to be drawn
00223         int cursor_leave_event();
00224         int cursor_enter_event();
00225         int cursor_motion_event();
00226         int button_press_event();
00227         int button_release_event();
00228         int test_crop(int button_press, int &redraw);
00229         int test_bezier(int button_press, 
00230                 int &redraw, 
00231                 int &redraw_canvas, 
00232                 int &rerender,
00233                 int do_camera);
00234         int test_zoom(int &redraw);
00235         void reset_camera();
00236         void reset_projector();
00237         void reset_keyframe(int do_camera);
00238         void draw_crophandle(int x, int y);
00239 
00240 // Draw the projector overlay in different colors.
00241         void draw_bezier(int do_camera);
00242         void draw_crop();
00243         void calculate_origin();
00244         void toggle_controls();
00245         int get_cwindow_controls();
00246 
00247         MWindow *mwindow;
00248         CWindowGUI *gui;
00249 };
00250 
00251 #endif

Generated on Sun Jan 8 13:38:51 2006 for Cinelerra-svn by  doxygen 1.4.4