papyrus logo

Papyrus::Canvas Class Reference

#include <canvas.h>

Inheritance diagram for Papyrus::Canvas:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PAPYRUS_DRAWABLE (Canvas)
virtual ~Canvas ()
virtual Matrix global_matrix () const
virtual Region global_extents () const
Region anchor_extents () const
double width () const
double height () const
void size (double &width, double &height) const
void set_width (double width)
void set_height (double height)
void set_size (double width, double height)
Units units () const
void set_units (Units u)
void device_resolution (double &x, double &y) const
bool set_device_resolution (double x, double y)
Paint::pointer background () const
void set_background (Paint::pointer background)
void scroll_to (double offset_x, double offset_y)
void scroll_to_x (double offset_x)
void scroll_to_y (double offset_y)
void scroll_to_center ()
void scroll_position (double &x, double &y) const
double scroll_x () const
double scroll_y () const
void set_scroll_anchor (ScrollAnchor scroll_achor=SCROLL_ANCHOR_CENTER)
ScrollAnchor scroll_anchor () const
void scroll_anchor_offsets (double &x, double &y) const
double scroll_anchor_x_offset () const
double scroll_anchor_y_offset () const
void window_to_canvas (double &x, double &y) const
 Convert window coordinates to canvas coordinates.
void canvas_to_window (double &x, double &y) const
 Convert canvas coordinates to window coordinates.
virtual Selection select (double x, double y, unsigned depth=1)
sigc::signal< void > signal_size_changed ()
sigc::signal< void, Unitssignal_units ()
sigc::signal< void, double,
double > 
signal_display_resolution ()
sigc::signal< void, double,
double > 
signal_scrolled ()
sigc::signal< void, ScrollAnchorsignal_scroll_anchor_changed ()

Static Public Member Functions

static pointer create (double width=0.0, double height=0.0, double scale=1.0)
static pointer create (const Glib::ustring &id, double width=0.0, double height=0.0, double scale=1.0)

Protected Member Functions

 Canvas (const Glib::ustring &id, double width, double height, double scale)
virtual void draw (Context &cairo) const
virtual Matrix calculate_composed_matrix () const
void update_scroll_anchor_offsets ()

Protected Attributes

double m_width
double m_height
double m_scale
ScrollAnchor m_scroll_anchor
 Determines the default scroll position and the result of scroll_to_center().
double m_scroll_anchor_offset_x
 Stores the default scroll anchor x offset.
double m_scroll_anchor_offset_y
 Stores the default scroll anchor y offset.
double m_scroll_x
 Stores the current scroll x offset.
double m_scroll_y
 Stores the current scroll y offset.
Units m_units
double m_display_x_resolution
double m_display_y_resolution
Paint::pointer m_background
sigc::signal< void > m_signal_size_changed
sigc::signal< void, Unitsm_signal_units
sigc::signal< void, double,
double > 
m_signal_display_resolution
sigc::signal< void, double,
double > 
m_signal_scrolled
sigc::signal< void, ScrollAnchorm_signal_scroll_anchor_changed

Detailed Description

Author:
Rick L Vinyard Jr

Constructor & Destructor Documentation

Papyrus::Canvas::Canvas ( const Glib::ustring &  id,
double  width,
double  height,
double  scale 
) [protected]
Papyrus::Canvas::~Canvas (  )  [virtual]

Member Function Documentation

Region Papyrus::Canvas::anchor_extents (  )  const
Paint::pointer Papyrus::Canvas::background (  )  const

References m_background.

Matrix Papyrus::Canvas::calculate_composed_matrix (  )  const [protected, virtual]
void Papyrus::Canvas::canvas_to_window ( double &  x,
double &  y 
) const

Convert canvas coordinates to window coordinates.

Parameters:
[in] x The canvas x coordinate
[in] y The canvas y coordinate
[out] x The window x coordinate
[out] y The window y coordinate

References Papyrus::Drawable::composed_matrix().

Canvas::pointer Papyrus::Canvas::create ( const Glib::ustring &  id,
double  width = 0.0,
double  height = 0.0,
double  scale = 1.0 
) [static]

References PAPYRUS_CREATE.

Canvas::pointer Papyrus::Canvas::create ( double  width = 0.0,
double  height = 0.0,
double  scale = 1.0 
) [static]
void Papyrus::Canvas::device_resolution ( double &  x,
double &  y 
) const
void Papyrus::Canvas::draw ( Context cairo  )  const [protected, virtual]

Reimplemented from Papyrus::Group.

References m_background, and Papyrus::Context::paint().

Region Papyrus::Canvas::global_extents (  )  const [virtual]
Matrix Papyrus::Canvas::global_matrix (  )  const [virtual]
double Papyrus::Canvas::height (  )  const

References m_height.

Papyrus::Canvas::PAPYRUS_DRAWABLE ( Canvas   ) 

Reimplemented from Papyrus::Group.

ScrollAnchor Papyrus::Canvas::scroll_anchor (  )  const

References m_scroll_anchor.

void Papyrus::Canvas::scroll_anchor_offsets ( double &  x,
double &  y 
) const
double Papyrus::Canvas::scroll_anchor_x_offset (  )  const
double Papyrus::Canvas::scroll_anchor_y_offset (  )  const
void Papyrus::Canvas::scroll_position ( double &  x,
double &  y 
) const

References m_scroll_x, and m_scroll_y.

void Papyrus::Canvas::scroll_to ( double  offset_x,
double  offset_y 
)
void Papyrus::Canvas::scroll_to_center (  ) 

References scroll_to().

void Papyrus::Canvas::scroll_to_x ( double  offset_x  ) 
void Papyrus::Canvas::scroll_to_y ( double  offset_y  ) 
double Papyrus::Canvas::scroll_x (  )  const

References m_scroll_x.

double Papyrus::Canvas::scroll_y (  )  const

References m_scroll_y.

Selection Papyrus::Canvas::select ( double  x,
double  y,
unsigned  depth = 1 
) [virtual]
void Papyrus::Canvas::set_background ( Paint::pointer  background  ) 
bool Papyrus::Canvas::set_device_resolution ( double  x,
double  y 
)
void Papyrus::Canvas::set_height ( double  height  ) 
void Papyrus::Canvas::set_scroll_anchor ( ScrollAnchor  scroll_achor = SCROLL_ANCHOR_CENTER  ) 
void Papyrus::Canvas::set_size ( double  width,
double  height 
)
void Papyrus::Canvas::set_units ( Units  u  ) 
void Papyrus::Canvas::set_width ( double  width  ) 
sigc::signal< void, double, double > Papyrus::Canvas::signal_display_resolution (  ) 
sigc::signal< void, ScrollAnchor > Papyrus::Canvas::signal_scroll_anchor_changed (  ) 
sigc::signal< void, double, double > Papyrus::Canvas::signal_scrolled (  ) 

References m_signal_scrolled.

sigc::signal< void > Papyrus::Canvas::signal_size_changed (  ) 

References m_signal_size_changed.

sigc::signal< void, Units > Papyrus::Canvas::signal_units (  ) 

References m_signal_units.

void Papyrus::Canvas::size ( double &  width,
double &  height 
) const

References m_height, and m_width.

Units Papyrus::Canvas::units (  )  const

References m_units.

void Papyrus::Canvas::update_scroll_anchor_offsets (  )  [protected]
double Papyrus::Canvas::width (  )  const

References m_width.

void Papyrus::Canvas::window_to_canvas ( double &  x,
double &  y 
) const

Convert window coordinates to canvas coordinates.

Parameters:
[in] x The window x coordinate
[in] y The window y coordinate
[out] x The canvas x coordinate
[out] y The canvas y coordinate

References Papyrus::Drawable::composed_matrix().


Member Data Documentation

Referenced by background(), draw(), and set_background().

double Papyrus::Canvas::m_height [protected]
double Papyrus::Canvas::m_scale [protected]

Referenced by Canvas().

Determines the default scroll position and the result of scroll_to_center().

Referenced by scroll_anchor(), set_scroll_anchor(), and update_scroll_anchor_offsets().

double Papyrus::Canvas::m_scroll_x [protected]

Stores the current scroll x offset.

Referenced by calculate_composed_matrix(), scroll_position(), scroll_to(), scroll_to_x(), scroll_to_y(), and scroll_x().

double Papyrus::Canvas::m_scroll_y [protected]

Stores the current scroll y offset.

Referenced by calculate_composed_matrix(), scroll_position(), scroll_to(), scroll_to_x(), scroll_to_y(), and scroll_y().

sigc::signal<void,double,double> Papyrus::Canvas::m_signal_display_resolution [protected]
sigc::signal<void,double,double> Papyrus::Canvas::m_signal_scrolled [protected]
sigc::signal<void> Papyrus::Canvas::m_signal_size_changed [protected]
sigc::signal<void,Units> Papyrus::Canvas::m_signal_units [protected]

Referenced by set_units(), and signal_units().

Referenced by set_units(), and units().

double Papyrus::Canvas::m_width [protected]

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

Generated on Fri Apr 16 12:41:06 2010 for papyrus by doxygen 1.6.1