Canvas Class Reference

#include <canvas.h>

Inherited by CWindowCanvas, RecordMonitorCanvas, and VWindowCanvas.

Collaboration diagram for Canvas:

Collaboration graph
[legend]

Public Member Functions

 Canvas (MWindow *mwindow, BC_WindowBase *subwindow, int x, int y, int w, int h, int output_w, int output_h, int use_scrollbars, int use_cwindow=0, int use_rwindow=0, int use_vwindow=0)
virtual ~Canvas ()
void reset ()
void calculate_sizes (float aspect_ratio, int output_w, int output_h, float zoom, int &w, int &h)
void lock_canvas (char *location)
void unlock_canvas ()
int is_locked ()
int create_objects (EDL *edl)
void set_cursor (int cursor)
void start_video ()
void stop_video ()
void start_single ()
void stop_single ()
void start_fullscreen ()
void stop_fullscreen ()
void create_canvas ()
virtual void status_event ()
virtual void reset_camera ()
virtual void reset_projector ()
virtual void zoom_resize_window (float percentage)
virtual void zoom_auto ()
virtual int cursor_leave_event ()
virtual int cursor_enter_event ()
virtual int button_release_event ()
virtual int button_press_event ()
virtual int cursor_motion_event ()
virtual void draw_overlays ()
virtual void toggle_controls ()
virtual int get_cwindow_controls ()
virtual int get_fullscreen ()
virtual void set_fullscreen (int value)
int cursor_leave_event_base (BC_WindowBase *caller)
int cursor_enter_event_base (BC_WindowBase *caller)
int button_press_event_base (BC_WindowBase *caller)
int keypress_event (BC_WindowBase *caller)
void get_transfers (EDL *edl, float &output_x1, float &output_y1, float &output_x2, float &output_y2, float &canvas_x1, float &canvas_y1, float &canvas_x2, float &canvas_y2, int canvas_w=-1, int canvas_h=-1)
void reposition_window (EDL *edl, int x, int y, int w, int h)
virtual void reset_translation ()
virtual void close_source ()
virtual void update_zoom (int x, int y, float zoom)
void check_boundaries (EDL *edl, int &x, int &y, float &zoom)
void update_scrollbars ()
virtual int get_xscroll ()
virtual int get_yscroll ()
virtual float get_zoom ()
virtual void draw_refresh ()
float get_x_offset (EDL *edl, int single_channel, float zoom_x, float conformed_w, float conformed_h)
float get_y_offset (EDL *edl, int single_channel, float zoom_y, float conformed_w, float conformed_h)
void get_zooms (EDL *edl, int single_channel, float &zoom_x, float &zoom_y, float &conformed_w, float &conformed_h)
void output_to_canvas (EDL *edl, int single_channel, float &x, float &y)
void canvas_to_output (EDL *edl, int single_channel, float &x, float &y)
virtual int get_output_w (EDL *edl)
virtual int get_output_h (EDL *edl)
int scrollbars_exist ()
int get_cursor_x ()
int get_cursor_y ()
int get_buttonpress ()
BC_WindowBaseget_canvas ()

Data Fields

BC_WindowBasesubwindow
CanvasOutputcanvas_subwindow
CanvasFullScreencanvas_fullscreen
CanvasXScrollxscroll
CanvasYScrollyscroll
CanvasPopupcanvas_menu
CanvasFullScreenPopupfullscreen_menu
int x
int y
int w
int h
int use_scrollbars
int use_cwindow
int use_rwindow
int use_vwindow
int output_w
int output_h
VFramerefresh_frame
int w_needed
int h_needed
int w_visible
int h_visible
int is_processing
int cursor_inside
int view_x
int view_y
int view_w
int view_h
int root_w
int root_h
MWindowmwindow

Private Member Functions

void get_scrollbars (EDL *edl, int &canvas_x, int &canvas_y, int &canvas_w, int &canvas_h)

Private Attributes

Mutexcanvas_lock

Detailed Description

Definition at line 19 of file canvas.h.


Constructor & Destructor Documentation

Canvas::Canvas ( MWindow mwindow,
BC_WindowBase subwindow,
int  x,
int  y,
int  w,
int  h,
int  output_w,
int  output_h,
int  use_scrollbars,
int  use_cwindow = 0,
int  use_rwindow = 0,
int  use_vwindow = 0 
)

Definition at line 15 of file canvas.C.

References canvas_lock, BC_WindowBase::get_root_h(), BC_WindowBase::get_root_w(), reset(), root_h, and root_w.

Here is the call graph for this function:

Canvas::~Canvas (  )  [virtual]


Member Function Documentation

void Canvas::reset (  ) 

void Canvas::calculate_sizes ( float  aspect_ratio,
int  output_w,
int  output_h,
float  zoom,
int &  w,
int &  h 
)

void Canvas::lock_canvas ( char *  location  ) 

void Canvas::unlock_canvas (  ) 

int Canvas::is_locked (  ) 

Definition at line 84 of file canvas.C.

References canvas_lock, and Mutex::is_locked().

Here is the call graph for this function:

int Canvas::create_objects ( EDL edl  ) 

void Canvas::set_cursor ( int  cursor  ) 

void Canvas::start_video (  ) 

Definition at line 686 of file canvas.C.

References get_canvas(), BC_WindowBase::start_video(), and status_event().

Referenced by VDeviceX11::open_output(), and VDeviceX11::start_playback().

Here is the call graph for this function:

void Canvas::stop_video (  ) 

Definition at line 695 of file canvas.C.

References get_canvas(), status_event(), and BC_WindowBase::stop_video().

Referenced by VDeviceX11::close_all(), and VDeviceX11::stop_playback().

Here is the call graph for this function:

void Canvas::start_single (  ) 

Definition at line 674 of file canvas.C.

References is_processing, and status_event().

Referenced by VDeviceX11::open_output().

Here is the call graph for this function:

void Canvas::stop_single (  ) 

Definition at line 680 of file canvas.C.

References is_processing, and status_event().

Referenced by VDeviceX11::close_all().

Here is the call graph for this function:

void Canvas::start_fullscreen (  ) 

Definition at line 705 of file canvas.C.

References create_canvas(), and set_fullscreen().

Referenced by CanvasFullScreenItem::handle_event(), VWindowGUI::keypress_event(), CWindowGUI::keypress_event(), and keypress_event().

Here is the call graph for this function:

void Canvas::stop_fullscreen (  ) 

Definition at line 711 of file canvas.C.

References create_canvas(), and set_fullscreen().

Referenced by CanvasSubWindowItem::handle_event(), VWindowGUI::keypress_event(), CWindowGUI::keypress_event(), and keypress_event().

Here is the call graph for this function:

void Canvas::create_canvas (  ) 

virtual void Canvas::status_event (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 69 of file canvas.h.

Referenced by start_single(), start_video(), stop_single(), and stop_video().

virtual void Canvas::reset_camera (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 72 of file canvas.h.

Referenced by CanvasPopupResetCamera::handle_event().

virtual void Canvas::reset_projector (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 73 of file canvas.h.

Referenced by CanvasPopupResetProjector::handle_event().

virtual void Canvas::zoom_resize_window ( float  percentage  )  [inline, virtual]

Reimplemented in CWindowCanvas, RecordMonitorCanvas, and VWindowCanvas.

Definition at line 74 of file canvas.h.

Referenced by CanvasPopupSize::handle_event().

virtual void Canvas::zoom_auto (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 75 of file canvas.h.

Referenced by CanvasPopupAuto::handle_event().

virtual int Canvas::cursor_leave_event (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 76 of file canvas.h.

Referenced by cursor_leave_event_base().

virtual int Canvas::cursor_enter_event (  )  [inline, virtual]

Reimplemented in CWindowCanvas, and RecordMonitorCanvas.

Definition at line 77 of file canvas.h.

Referenced by cursor_enter_event_base().

virtual int Canvas::button_release_event (  )  [inline, virtual]

int Canvas::button_press_event (  )  [virtual]

virtual int Canvas::cursor_motion_event (  )  [inline, virtual]

virtual void Canvas::draw_overlays (  )  [inline, virtual]

Reimplemented in CWindowCanvas, and VWindowCanvas.

Definition at line 81 of file canvas.h.

virtual void Canvas::toggle_controls (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 82 of file canvas.h.

Referenced by CanvasToggleControls::handle_event().

virtual int Canvas::get_cwindow_controls (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 83 of file canvas.h.

Referenced by CanvasToggleControls::handle_event().

virtual int Canvas::get_fullscreen (  )  [inline, virtual]

Reimplemented in CWindowCanvas, RecordMonitorCanvas, and VWindowCanvas.

Definition at line 84 of file canvas.h.

Referenced by button_press_event(), create_canvas(), get_canvas(), and keypress_event().

virtual void Canvas::set_fullscreen ( int  value  )  [inline, virtual]

Reimplemented in CWindowCanvas, RecordMonitorCanvas, and VWindowCanvas.

Definition at line 85 of file canvas.h.

Referenced by start_fullscreen(), and stop_fullscreen().

int Canvas::cursor_leave_event_base ( BC_WindowBase caller  ) 

int Canvas::cursor_enter_event_base ( BC_WindowBase caller  ) 

int Canvas::button_press_event_base ( BC_WindowBase caller  ) 

int Canvas::keypress_event ( BC_WindowBase caller  ) 

void Canvas::get_transfers ( EDL edl,
float &  output_x1,
float &  output_y1,
float &  output_x2,
float &  output_y2,
float &  canvas_x1,
float &  canvas_y1,
float &  canvas_x2,
float &  canvas_y2,
int  canvas_w = -1,
int  canvas_h = -1 
)

void Canvas::reposition_window ( EDL edl,
int  x,
int  y,
int  w,
int  h 
)

virtual void Canvas::reset_translation (  )  [inline, virtual]

Reimplemented in RecordMonitorCanvas.

Definition at line 112 of file canvas.h.

Referenced by CanvasPopupResetTranslation::handle_event().

virtual void Canvas::close_source (  )  [inline, virtual]

Reimplemented in VWindowCanvas.

Definition at line 113 of file canvas.h.

Referenced by CanvasPopupRemoveSource::handle_event().

virtual void Canvas::update_zoom ( int  x,
int  y,
float  zoom 
) [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 115 of file canvas.h.

Referenced by CanvasYScroll::handle_event(), and CanvasXScroll::handle_event().

void Canvas::check_boundaries ( EDL edl,
int &  x,
int &  y,
float &  zoom 
)

Definition at line 203 of file canvas.C.

References h_needed, h_visible, w_needed, and w_visible.

void Canvas::update_scrollbars (  ) 

Definition at line 212 of file canvas.C.

References get_xscroll(), get_yscroll(), h_needed, h_visible, BC_ScrollBar::update_length(), use_scrollbars, w_needed, w_visible, xscroll, and yscroll.

Referenced by CWindowCanvas::cursor_motion_event().

Here is the call graph for this function:

virtual int Canvas::get_xscroll (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 120 of file canvas.h.

Referenced by get_scrollbars(), get_x_offset(), CanvasYScroll::handle_event(), and update_scrollbars().

virtual int Canvas::get_yscroll (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 121 of file canvas.h.

Referenced by get_scrollbars(), get_y_offset(), CanvasXScroll::handle_event(), and update_scrollbars().

virtual float Canvas::get_zoom (  )  [inline, virtual]

Reimplemented in CWindowCanvas.

Definition at line 122 of file canvas.h.

Referenced by get_zooms(), CanvasYScroll::handle_event(), and CanvasXScroll::handle_event().

virtual void Canvas::draw_refresh (  )  [inline, virtual]

float Canvas::get_x_offset ( EDL edl,
int  single_channel,
float  zoom_x,
float  conformed_w,
float  conformed_h 
)

float Canvas::get_y_offset ( EDL edl,
int  single_channel,
float  zoom_y,
float  conformed_w,
float  conformed_h 
)

void Canvas::get_zooms ( EDL edl,
int  single_channel,
float &  zoom_x,
float &  zoom_y,
float &  conformed_w,
float &  conformed_h 
)

void Canvas::output_to_canvas ( EDL edl,
int  single_channel,
float &  x,
float &  y 
)

void Canvas::canvas_to_output ( EDL edl,
int  single_channel,
float &  x,
float &  y 
)

int Canvas::get_output_w ( EDL edl  )  [virtual]

Definition at line 446 of file canvas.C.

References EDLSession::output_w, EDL::session, and use_scrollbars.

Referenced by get_transfers().

int Canvas::get_output_h ( EDL edl  )  [virtual]

Definition at line 454 of file canvas.C.

References EDLSession::output_h, EDL::session, and use_scrollbars.

Referenced by get_transfers().

int Canvas::scrollbars_exist (  ) 

Definition at line 441 of file canvas.C.

References use_scrollbars, xscroll, and yscroll.

int Canvas::get_cursor_x (  ) 

int Canvas::get_cursor_y (  ) 

int Canvas::get_buttonpress (  ) 

Definition at line 633 of file canvas.C.

References BC_WindowBase::get_buttonpress(), and get_canvas().

Referenced by CWindowCanvas::button_press_event(), button_press_event(), and CWindowCanvas::test_zoom().

Here is the call graph for this function:

BC_WindowBase * Canvas::get_canvas (  ) 

Definition at line 90 of file canvas.C.

References canvas_fullscreen, canvas_subwindow, and get_fullscreen().

Referenced by VWindowGUI::button_press_event(), RecordMonitorGUI::button_press_event(), CWindowGUI::button_press_event(), button_press_event(), VWindowGUI::button_release_event(), RecordMonitorGUI::button_release_event(), CWindowGUI::button_release_event(), Playback3D::clear_input_sync(), VDeviceX11::clear_output(), Playback3D::clear_output_sync(), VDeviceX11::close_all(), Playback3D::copy_from_sync(), create_canvas(), VWindowGUI::cursor_enter_event(), RecordMonitorGUI::cursor_enter_event(), CWindowGUI::cursor_enter_event(), VWindowGUI::cursor_leave_event(), RecordMonitorGUI::cursor_leave_event(), CWindowGUI::cursor_leave_event(), VWindowGUI::cursor_motion_event(), RecordMonitorGUI::cursor_motion_event(), CWindowGUI::cursor_motion_event(), Playback3D::do_camera_sync(), Playback3D::do_fade_sync(), CWindowCanvas::do_mask(), Playback3D::do_mask_sync(), CWindowCanvas::draw_bezier(), CWindowCanvas::draw_crop(), CWindowCanvas::draw_crophandle(), Playback3D::draw_output(), VWindowCanvas::draw_overlays(), CWindowCanvas::draw_overlays(), VWindowCanvas::draw_refresh(), CWindowCanvas::draw_refresh(), CWindowCanvas::draw_safe_regions(), CWindowGUI::draw_status(), VDeviceX11::get_best_colormodel(), get_buttonpress(), get_cursor_x(), get_cursor_y(), get_transfers(), get_x_offset(), get_y_offset(), get_zooms(), Playback3D::init_frame(), RecordMonitorCanvas::keypress_event(), keypress_event(), VDeviceX11::new_output_buffer(), VDeviceX11::open_output(), VDeviceX11::output_visible(), VDeviceX11::overlay(), Playback3D::overlay_sync(), reposition_window(), Playback3D::run_plugin_sync(), set_cursor(), start_video(), stop_video(), VDeviceX11::write_buffer(), and Playback3D::write_buffer_sync().

Here is the call graph for this function:

void Canvas::get_scrollbars ( EDL edl,
int &  canvas_x,
int &  canvas_y,
int &  canvas_w,
int &  canvas_h 
) [private]


Field Documentation

Definition at line 167 of file canvas.h.

Referenced by create_canvas(), get_canvas(), reposition_window(), reset(), and ~Canvas().

Definition at line 169 of file canvas.h.

Referenced by create_canvas(), get_canvas(), reset(), and ~Canvas().

Definition at line 172 of file canvas.h.

Referenced by button_press_event(), create_objects(), and ~Canvas().

Definition at line 173 of file canvas.h.

Referenced by button_press_event(), and create_objects().

int Canvas::x

int Canvas::y

int Canvas::w

int Canvas::h

Definition at line 176 of file canvas.h.

Referenced by CanvasPopup::create_objects(), and CanvasFullScreenPopup::create_objects().

Definition at line 177 of file canvas.h.

Referenced by CanvasPopup::create_objects().

Definition at line 178 of file canvas.h.

Referenced by CanvasPopup::create_objects().

Definition at line 180 of file canvas.h.

Referenced by get_transfers(), and reset().

Definition at line 180 of file canvas.h.

Referenced by get_transfers(), and reset().

Definition at line 185 of file canvas.h.

Referenced by check_boundaries(), get_scrollbars(), and update_scrollbars().

Definition at line 186 of file canvas.h.

Referenced by check_boundaries(), get_scrollbars(), and update_scrollbars().

Definition at line 191 of file canvas.h.

Referenced by CWindowGUI::draw_status(), reset(), start_single(), and stop_single().

Definition at line 193 of file canvas.h.

Referenced by cursor_enter_event_base(), cursor_leave_event_base(), and reset().

Definition at line 194 of file canvas.h.

Referenced by create_canvas(), create_objects(), and reposition_window().

Definition at line 195 of file canvas.h.

Referenced by create_canvas(), create_objects(), and reposition_window().

Definition at line 196 of file canvas.h.

Referenced by create_canvas(), create_objects(), and reposition_window().

Definition at line 197 of file canvas.h.

Referenced by create_canvas(), create_objects(), and reposition_window().

Definition at line 198 of file canvas.h.

Referenced by Canvas(), and create_canvas().

Definition at line 199 of file canvas.h.

Referenced by Canvas(), and create_canvas().

Definition at line 209 of file canvas.h.

Referenced by Canvas(), is_locked(), lock_canvas(), unlock_canvas(), and ~Canvas().


The documentation for this class was generated from the following files:

Generated on Mon Apr 28 14:17:24 2008 for Cinelerra by  doxygen 1.5.5