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

Canvas Class Reference

#include <canvas.h>

Inheritance diagram for Canvas:

CWindowCanvas RecordMonitorCanvas VWindowCanvas List of all members.

Public Member Functions

 Canvas (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)
int create_objects (EDL *edl)
void set_cursor (int cursor)
void start_video ()
void stop_video ()
void start_single ()
void stop_single ()
virtual void status_event ()
virtual void reset_camera ()
virtual void reset_projector ()
virtual void zoom_resize_window (float percentage)
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 ()
void get_transfers (EDL *edl, int &in_x, int &in_y, int &in_w, int &in_h, int &out_x, int &out_y, int &out_w, int &out_h, 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 ()

Public Attributes

BC_WindowBase * subwindow
CanvasOutputcanvas
CanvasXScrollxscroll
CanvasYScrollyscroll
CanvasPopupcanvas_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
VFrame * refresh_frame
int w_needed
int h_needed
int w_visible
int h_visible
int is_processing

Private Member Functions

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

Detailed Description

Definition at line 16 of file canvas.h.


Constructor & Destructor Documentation

Canvas::Canvas 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 10 of file canvas.C.

References reset().

Canvas::~Canvas  )  [virtual]
 

Definition at line 36 of file canvas.C.

References canvas, canvas_menu, refresh_frame, xscroll, and yscroll.


Member Function Documentation

int Canvas::button_press_event  )  [virtual]
 

Reimplemented in CWindowCanvas, and RecordMonitorCanvas.

Definition at line 593 of file canvas.C.

References canvas, and canvas_menu.

Referenced by RecordMonitorCanvas::button_press_event(), CWindowCanvas::button_press_event(), and CanvasOutput::button_press_event().

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

Reimplemented in CWindowCanvas, and RecordMonitorCanvas.

Definition at line 60 of file canvas.h.

Referenced by CanvasOutput::button_release_event().

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

Definition at line 58 of file canvas.C.

Referenced by VWindowCanvas::zoom_resize_window(), RecordMonitorCanvas::zoom_resize_window(), and CWindowCanvas::zoom_resize_window().

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

Definition at line 224 of file canvas.C.

References get_x_offset(), get_y_offset(), and get_zooms().

Referenced by CWindowCanvas::calculate_origin(), CWindowCanvas::do_eyedrop(), CWindowCanvas::do_mask(), get_transfers(), CWindowZoom::handle_event(), CWindowCanvas::test_bezier(), CWindowCanvas::test_crop(), and CWindowCanvas::test_zoom().

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

Definition at line 161 of file canvas.C.

References h_needed, h_visible, w_needed, and w_visible.

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

Reimplemented in VWindowCanvas.

Definition at line 80 of file canvas.h.

Referenced by CanvasPopupRemoveSource::handle_event().

int Canvas::create_objects EDL edl  ) 
 

Definition at line 575 of file canvas.C.

References canvas, canvas_menu, CanvasPopup::create_objects(), get_scrollbars(), h, subwindow, w, x, and y.

Referenced by VWindowGUI::create_objects().

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

Reimplemented in CWindowCanvas, and RecordMonitorCanvas.

Definition at line 59 of file canvas.h.

Referenced by CanvasOutput::cursor_enter_event().

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

Reimplemented in CWindowCanvas.

Definition at line 58 of file canvas.h.

Referenced by CanvasOutput::cursor_leave_event().

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

Reimplemented in CWindowCanvas, and RecordMonitorCanvas.

Definition at line 62 of file canvas.h.

Referenced by CanvasOutput::cursor_motion_event().

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

Reimplemented in CWindowCanvas, and VWindowCanvas.

Definition at line 63 of file canvas.h.

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

Reimplemented in CWindowCanvas, and VWindowCanvas.

Definition at line 91 of file canvas.h.

Referenced by VDeviceX11::close_all(), CanvasYScroll::handle_event(), CanvasXScroll::handle_event(), and reposition_window().

int Canvas::get_buttonpress  ) 
 

Definition at line 569 of file canvas.C.

References canvas.

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

int Canvas::get_cursor_x  ) 
 

Definition at line 559 of file canvas.C.

References canvas.

Referenced by RecordMonitorCanvas::button_press_event(), CWindowCanvas::calculate_origin(), RecordMonitorCanvas::cursor_motion_event(), CWindowCanvas::cursor_motion_event(), CWindowCanvas::do_eyedrop(), CWindowCanvas::do_mask(), CWindowCanvas::test_bezier(), CWindowCanvas::test_crop(), and CWindowCanvas::test_zoom().

int Canvas::get_cursor_y  ) 
 

Definition at line 564 of file canvas.C.

References canvas.

Referenced by RecordMonitorCanvas::button_press_event(), CWindowCanvas::calculate_origin(), RecordMonitorCanvas::cursor_motion_event(), CWindowCanvas::cursor_motion_event(), CWindowCanvas::do_eyedrop(), CWindowCanvas::do_mask(), CWindowCanvas::test_bezier(), CWindowCanvas::test_crop(), and CWindowCanvas::test_zoom().

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

Reimplemented in CWindowCanvas.

Definition at line 65 of file canvas.h.

Referenced by CanvasToggleControls::handle_event().

int Canvas::get_output_h EDL edl  )  [virtual]
 

Definition at line 398 of file canvas.C.

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

Referenced by get_transfers().

int Canvas::get_output_w EDL edl  )  [virtual]
 

Definition at line 390 of file canvas.C.

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

Referenced by get_transfers().

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

Definition at line 411 of file canvas.C.

References get_xscroll(), get_yscroll(), get_zooms(), h_needed, h_visible, EDLSession::output_h, EDLSession::output_w, EDL::session, subwindow, use_scrollbars, w_needed, w_visible, xscroll, and yscroll.

Referenced by create_objects(), and reposition_window().

void Canvas::get_transfers EDL edl,
int &  in_x,
int &  in_y,
int &  in_w,
int &  in_h,
int &  out_x,
int &  out_y,
int &  out_w,
int &  out_h,
int  canvas_w = -1,
int  canvas_h = -1
 

Definition at line 249 of file canvas.C.

References canvas, canvas_to_output(), EDL::get_aspect_ratio(), get_output_h(), get_output_w(), get_zooms(), output_h, output_w, and use_scrollbars.

Referenced by VWindowCanvas::draw_refresh(), CWindowCanvas::draw_refresh(), and VDeviceX11::write_buffer().

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

Definition at line 79 of file canvas.C.

References canvas, get_xscroll(), EDLSession::output_w, EDL::session, use_scrollbars, and xscroll.

Referenced by CWindowCanvas::button_press_event(), canvas_to_output(), and output_to_canvas().

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

Reimplemented in CWindowCanvas.

Definition at line 87 of file canvas.h.

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

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

Definition at line 119 of file canvas.C.

References canvas, get_yscroll(), EDLSession::output_h, EDL::session, use_scrollbars, and yscroll.

Referenced by CWindowCanvas::button_press_event(), canvas_to_output(), and output_to_canvas().

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

Reimplemented in CWindowCanvas.

Definition at line 88 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 89 of file canvas.h.

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

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

Definition at line 179 of file canvas.C.

References EDL::calculate_conformed_dimensions(), canvas, get_zoom(), EDLSession::output_h, EDLSession::output_w, EDL::session, and use_scrollbars.

Referenced by CWindowCanvas::button_press_event(), canvas_to_output(), CWindowCanvas::cursor_motion_event(), get_scrollbars(), get_transfers(), and output_to_canvas().

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

Definition at line 236 of file canvas.C.

References get_x_offset(), get_y_offset(), and get_zooms().

Referenced by CWindowCanvas::do_mask(), CWindowCanvas::draw_bezier(), CWindowCanvas::draw_crop(), CWindowCanvas::draw_overlays(), CWindowCanvas::draw_safe_regions(), and CWindowCanvas::test_crop().

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

Definition at line 528 of file canvas.C.

References canvas, draw_refresh(), and get_scrollbars().

Referenced by CWindowZoom::handle_event(), VWindowGUI::resize_event(), RecordMonitorGUI::resize_event(), CWindowGUI::resize_event(), CWindowCanvas::test_zoom(), and CWindow::update().

void Canvas::reset  ) 
 

Definition at line 45 of file canvas.C.

References canvas, is_processing, output_h, output_w, refresh_frame, use_scrollbars, xscroll, and yscroll.

Referenced by Canvas().

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

Reimplemented in CWindowCanvas.

Definition at line 55 of file canvas.h.

Referenced by CanvasPopupResetCamera::handle_event().

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

Reimplemented in CWindowCanvas.

Definition at line 56 of file canvas.h.

Referenced by CanvasPopupResetProjector::handle_event().

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

Reimplemented in RecordMonitorCanvas.

Definition at line 79 of file canvas.h.

Referenced by CanvasPopupResetTranslation::handle_event().

int Canvas::scrollbars_exist  ) 
 

Definition at line 385 of file canvas.C.

References use_scrollbars, xscroll, and yscroll.

void Canvas::set_cursor int  cursor  ) 
 

Definition at line 554 of file canvas.C.

References canvas.

Referenced by RecordMonitorCanvas::cursor_enter_event(), CWindowCanvas::cursor_enter_event(), CWindowCanvas::cursor_leave_event(), and CWindowCanvas::test_crop().

void Canvas::start_single  ) 
 

Definition at line 606 of file canvas.C.

References is_processing, and status_event().

Referenced by VDeviceX11::open_output().

void Canvas::start_video  ) 
 

Definition at line 618 of file canvas.C.

References canvas, and status_event().

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

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

Reimplemented in CWindowCanvas.

Definition at line 52 of file canvas.h.

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

void Canvas::stop_single  ) 
 

Definition at line 612 of file canvas.C.

References is_processing, and status_event().

Referenced by VDeviceX11::close_all().

void Canvas::stop_video  ) 
 

Definition at line 627 of file canvas.C.

References canvas, and status_event().

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

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

Reimplemented in CWindowCanvas.

Definition at line 64 of file canvas.h.

Referenced by CanvasToggleControls::handle_event().

void Canvas::update_scrollbars  ) 
 

Definition at line 170 of file canvas.C.

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

Referenced by CWindowCanvas::cursor_motion_event().

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

Reimplemented in CWindowCanvas.

Definition at line 82 of file canvas.h.

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

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

Reimplemented in CWindowCanvas, RecordMonitorCanvas, and VWindowCanvas.

Definition at line 57 of file canvas.h.

Referenced by CanvasPopupSize::handle_event().


Member Data Documentation

CanvasOutput* Canvas::canvas
 

Definition at line 130 of file canvas.h.

Referenced by button_press_event(), VDeviceX11::close_all(), create_objects(), CWindowCanvas::do_mask(), CWindowCanvas::draw_bezier(), CWindowCanvas::draw_crop(), CWindowCanvas::draw_crophandle(), 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(), RecordMonitorCanvas::keypress_event(), VDeviceX11::new_output_buffer(), VDeviceX11::open_output(), VDeviceX11::output_visible(), reposition_window(), reset(), set_cursor(), start_video(), stop_video(), VDeviceX11::write_buffer(), and ~Canvas().

CanvasPopup* Canvas::canvas_menu
 

Definition at line 133 of file canvas.h.

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

int Canvas::h
 

Definition at line 134 of file canvas.h.

Referenced by create_objects(), VWindowGUI::drag_motion(), CWindowGUI::drag_motion(), CWindowZoom::handle_event(), VDeviceX11::new_output_buffer(), and CWindowCanvas::test_zoom().

int Canvas::h_needed
 

Definition at line 145 of file canvas.h.

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

int Canvas::h_visible
 

Definition at line 147 of file canvas.h.

Referenced by check_boundaries(), get_scrollbars(), CWindowZoom::handle_event(), and update_scrollbars().

int Canvas::is_processing
 

Definition at line 150 of file canvas.h.

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

int Canvas::output_h
 

Definition at line 140 of file canvas.h.

Referenced by get_transfers(), and reset().

int Canvas::output_w
 

Definition at line 140 of file canvas.h.

Referenced by get_transfers(), and reset().

VFrame* Canvas::refresh_frame
 

Definition at line 142 of file canvas.h.

Referenced by VDeviceX11::close_all(), CWindowCanvas::do_eyedrop(), VWindowCanvas::draw_refresh(), CWindowCanvas::draw_refresh(), reset(), and ~Canvas().

BC_WindowBase* Canvas::subwindow
 

Definition at line 129 of file canvas.h.

Referenced by create_objects(), and get_scrollbars().

int Canvas::use_cwindow
 

Definition at line 136 of file canvas.h.

int Canvas::use_rwindow
 

Definition at line 137 of file canvas.h.

int Canvas::use_scrollbars
 

Definition at line 135 of file canvas.h.

Referenced by get_output_h(), get_output_w(), get_scrollbars(), get_transfers(), get_x_offset(), get_y_offset(), get_zooms(), reset(), scrollbars_exist(), update_scrollbars(), and CWindowCanvas::update_zoom().

int Canvas::use_vwindow
 

Definition at line 138 of file canvas.h.

int Canvas::w
 

Definition at line 134 of file canvas.h.

Referenced by create_objects(), VWindowGUI::drag_motion(), CWindowGUI::drag_motion(), CWindowZoom::handle_event(), VDeviceX11::new_output_buffer(), and CWindowCanvas::test_zoom().

int Canvas::w_needed
 

Definition at line 144 of file canvas.h.

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

int Canvas::w_visible
 

Definition at line 146 of file canvas.h.

Referenced by check_boundaries(), get_scrollbars(), CWindowZoom::handle_event(), and update_scrollbars().

int Canvas::x
 

Definition at line 134 of file canvas.h.

Referenced by create_objects(), CWindowCanvas::cursor_motion_event(), CWindowCanvas::do_mask(), VWindowGUI::drag_motion(), CWindowGUI::drag_motion(), and CWindowCanvas::test_zoom().

CanvasXScroll* Canvas::xscroll
 

Definition at line 131 of file canvas.h.

Referenced by get_scrollbars(), get_x_offset(), reset(), scrollbars_exist(), update_scrollbars(), and ~Canvas().

int Canvas::y
 

Definition at line 134 of file canvas.h.

Referenced by create_objects(), CWindowCanvas::cursor_motion_event(), CWindowCanvas::do_mask(), VWindowGUI::drag_motion(), CWindowGUI::drag_motion(), and CWindowCanvas::test_zoom().

CanvasYScroll* Canvas::yscroll
 

Definition at line 132 of file canvas.h.

Referenced by get_scrollbars(), get_y_offset(), reset(), scrollbars_exist(), update_scrollbars(), and ~Canvas().


The documentation for this class was generated from the following files:
Generated on Sun Jan 8 13:39:10 2006 for Cinelerra-svn by  doxygen 1.4.4