Goocanvas::Canvas Class Reference

#include <canvas.h>

Inheritance diagram for Goocanvas::Canvas:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Canvas ()
GooCanvas * gobj ()
 Provides access to the underlying C GtkObject.
const GooCanvas * gobj () const
 Provides access to the underlying C GtkObject.
 Canvas ()
Glib::RefPtr< Itemget_root_item ()
Glib::RefPtr< const Itemget_root_item () const
void set_root_item (const Glib::RefPtr< Item > &item)
Glib::RefPtr< ItemModelget_root_item_model ()
Glib::RefPtr< const ItemModelget_root_item_model () const
void set_root_item_model (const Glib::RefPtr< ItemModel > &model)
Glib::RefPtr< Itemget_item (const Glib::RefPtr< ItemModel > &model)
Glib::RefPtr< const Itemget_item (const Glib::RefPtr< ItemModel > &model) const
Glib::RefPtr< Itemget_item_at (double x, double y, bool is_pointer_event)
Glib::RefPtr< const Itemget_item_at (double x, double y, bool is_pointer_event) const
Glib::ListHandle< Glib::RefPtr
< Item > > 
get_items_at (double x, double y, bool is_pointer_event)
Glib::ListHandle< Glib::RefPtr
< Item > > 
get_items_in_area (const Bounds &area, bool inside_area, bool allow_overlaps, bool include_containers) const
double get_scale () const
void set_scale (double scale)
void get_bounds (double &left, double &top, double &right, double &bottom) const
void get_bounds (Bounds &bounds) const
void set_bounds (double left, double top, double right, double bottom)
void set_bounds (const Bounds &bounds)
void scroll_to (double left, double top)
void grab_focus (const Glib::RefPtr< Item > &item)
void render (const Cairo::RefPtr< Cairo::Context > &context, const Bounds &bounds, double scale=0.0)
void render (const Cairo::RefPtr< Cairo::Context > &context, double scale=0.0)
void convert_to_pixels (double &x, double &y) const
void convert_from_pixels (double &x, double &y) const
void convert_to_item_space (const Glib::RefPtr< Item > &item, double &x, double &y) const
void convert_from_item_space (const Glib::RefPtr< Item > &item, double &x, double &y) const
Gdk::GrabStatus pointer_grab (const Glib::RefPtr< Item > &item, Gdk::EventMask mask, const Gdk::Cursor &cursor, guint32 time)
Gdk::GrabStatus pointer_grab (const Glib::RefPtr< Item > &item, Gdk::EventMask mask, guint32 time)
void pointer_ungrab (const Glib::RefPtr< Item > &item, guint32 time)
GdkGrabStatus keyboard_grab (const Glib::RefPtr< Item > &item, bool owner_events, guint32 time)
void keyboard_ungrab (const Glib::RefPtr< Item > &item, guint32 time)
Cairo::RefPtr< Cairo::Context > create_cairo_context ()
Glib::RefPtr< Itemcreate_item (const Glib::RefPtr< ItemModel > &model)
void unregister_item (const Glib::RefPtr< ItemModel > &model)
void update ()
void request_update ()
void request_redraw (const Bounds &bounds)
double get_default_line_width () const
void register_widget_item (const Glib::RefPtr< Goocanvas::Widget > &widget)
void unregister_widget_item (const Glib::RefPtr< Goocanvas::Widget > &widget)
Glib::SignalProxy2< void,
Gtk::Adjustment
*, Gtk::Adjustment * > 
signal_set_scroll_adjustments ()
Glib::SignalProxy2< void,
const Glib::RefPtr< Item >
&, const Glib::RefPtr
< ItemModel > & > 
signal_item_created ()
Glib::PropertyProxy< double > property_scale ()
 The magnification factor of the canvas.
Glib::PropertyProxy_ReadOnly
< double > 
property_scale () const
 The magnification factor of the canvas.
Glib::PropertyProxy< double > property_scale_x ()
 The horizontal magnification factor of the canvas.
Glib::PropertyProxy_ReadOnly
< double > 
property_scale_x () const
 The horizontal magnification factor of the canvas.
Glib::PropertyProxy< double > property_scale_y ()
 The vertical magnification factor of the canvas.
Glib::PropertyProxy_ReadOnly
< double > 
property_scale_y () const
 The vertical magnification factor of the canvas.
Glib::PropertyProxy
< Gtk::AnchorType > 
property_anchor ()
 Where to place the canvas when it is smaller than the widget's allocated area.
Glib::PropertyProxy_ReadOnly
< Gtk::AnchorType > 
property_anchor () const
 Where to place the canvas when it is smaller than the widget's allocated area.
Glib::PropertyProxy< double > property_x1 ()
 The x coordinate of the left edge of the canvas bounds.
Glib::PropertyProxy_ReadOnly
< double > 
property_x1 () const
 The x coordinate of the left edge of the canvas bounds.
Glib::PropertyProxy< double > property_y1 ()
 The y coordinate of the top edge of the canvas bounds.
Glib::PropertyProxy_ReadOnly
< double > 
property_y1 () const
 The y coordinate of the top edge of the canvas bounds.
Glib::PropertyProxy< double > property_x2 ()
 The x coordinate of the right edge of the canvas bounds.
Glib::PropertyProxy_ReadOnly
< double > 
property_x2 () const
 The x coordinate of the right edge of the canvas bounds.
Glib::PropertyProxy< double > property_y2 ()
 The y coordinate of the bottom edge of the canvas bounds.
Glib::PropertyProxy_ReadOnly
< double > 
property_y2 () const
 The y coordinate of the bottom edge of the canvas bounds.
Glib::PropertyProxy< bool > property_automatic_bounds ()
 If the bounds are automatically calculated based on the bounds of all the items in the canvas.
Glib::PropertyProxy_ReadOnly
< bool > 
property_automatic_bounds () const
 If the bounds are automatically calculated based on the bounds of all the items in the canvas.
Glib::PropertyProxy< bool > property_bounds_from_origin ()
 If the automatic bounds are calculated from the origin.
Glib::PropertyProxy_ReadOnly
< bool > 
property_bounds_from_origin () const
 If the automatic bounds are calculated from the origin.
Glib::PropertyProxy< double > property_bounds_padding ()
 The padding added to the automatic bounds.
Glib::PropertyProxy_ReadOnly
< double > 
property_bounds_padding () const
 The padding added to the automatic bounds.
Glib::PropertyProxy< Gtk::Unit > property_units ()
 The units to use for the canvas.
Glib::PropertyProxy_ReadOnly
< Gtk::Unit > 
property_units () const
 The units to use for the canvas.
Glib::PropertyProxy< double > property_resolution_x ()
 The horizontal resolution of the display.
Glib::PropertyProxy_ReadOnly
< double > 
property_resolution_x () const
 The horizontal resolution of the display.
Glib::PropertyProxy< double > property_resolution_y ()
 The vertical resolution of the display.
Glib::PropertyProxy_ReadOnly
< double > 
property_resolution_y () const
 The vertical resolution of the display.
Glib::PropertyProxy_WriteOnly
< Glib::ustring > 
property_background_color ()
 The color to use for the canvas background.
Glib::PropertyProxy_WriteOnly
< guint > 
property_background_color_rgb ()
 The color to use for the canvas background.
Glib::PropertyProxy< bool > property_integer_layout ()
 If all item layout is done to the nearest integer.
Glib::PropertyProxy_ReadOnly
< bool > 
property_integer_layout () const
 If all item layout is done to the nearest integer.

Protected Member Functions

virtual void on_set_scroll_adjustments (Gtk::Adjustment *hadjustment, Gtk::Adjustment *vadjustment)
virtual void on_item_created (const Glib::RefPtr< Item > &item, const Glib::RefPtr< ItemModel > &model)

Related Functions

(Note that these are not member functions.)

Goocanvas::Canvaswrap (GooCanvas *object, bool take_copy=false)
 A Glib::wrap() method for this object.


Constructor & Destructor Documentation

virtual Goocanvas::Canvas::~Canvas (  )  [virtual]

Goocanvas::Canvas::Canvas (  ) 


Member Function Documentation

GooCanvas* Goocanvas::Canvas::gobj (  )  [inline]

Provides access to the underlying C GtkObject.

const GooCanvas* Goocanvas::Canvas::gobj (  )  const [inline]

Provides access to the underlying C GtkObject.

virtual void Goocanvas::Canvas::on_set_scroll_adjustments ( Gtk::Adjustment *  hadjustment,
Gtk::Adjustment *  vadjustment 
) [protected, virtual]

virtual void Goocanvas::Canvas::on_item_created ( const Glib::RefPtr< Item > &  item,
const Glib::RefPtr< ItemModel > &  model 
) [protected, virtual]

Glib::RefPtr<Item> Goocanvas::Canvas::get_root_item (  ) 

Glib::RefPtr<const Item> Goocanvas::Canvas::get_root_item (  )  const

void Goocanvas::Canvas::set_root_item ( const Glib::RefPtr< Item > &  item  ) 

Glib::RefPtr<ItemModel> Goocanvas::Canvas::get_root_item_model (  ) 

Glib::RefPtr<const ItemModel> Goocanvas::Canvas::get_root_item_model (  )  const

void Goocanvas::Canvas::set_root_item_model ( const Glib::RefPtr< ItemModel > &  model  ) 

Glib::RefPtr<Item> Goocanvas::Canvas::get_item ( const Glib::RefPtr< ItemModel > &  model  ) 

Glib::RefPtr<const Item> Goocanvas::Canvas::get_item ( const Glib::RefPtr< ItemModel > &  model  )  const

Glib::RefPtr<Item> Goocanvas::Canvas::get_item_at ( double  x,
double  y,
bool  is_pointer_event 
)

Glib::RefPtr<const Item> Goocanvas::Canvas::get_item_at ( double  x,
double  y,
bool  is_pointer_event 
) const

Glib::ListHandle< Glib::RefPtr<Item> > Goocanvas::Canvas::get_items_at ( double  x,
double  y,
bool  is_pointer_event 
)

Glib::ListHandle< Glib::RefPtr<Item> > Goocanvas::Canvas::get_items_in_area ( const Bounds area,
bool  inside_area,
bool  allow_overlaps,
bool  include_containers 
) const

double Goocanvas::Canvas::get_scale (  )  const

void Goocanvas::Canvas::set_scale ( double  scale  ) 

void Goocanvas::Canvas::get_bounds ( double &  left,
double &  top,
double &  right,
double &  bottom 
) const

void Goocanvas::Canvas::get_bounds ( Bounds bounds  )  const

void Goocanvas::Canvas::set_bounds ( double  left,
double  top,
double  right,
double  bottom 
)

void Goocanvas::Canvas::set_bounds ( const Bounds bounds  ) 

void Goocanvas::Canvas::scroll_to ( double  left,
double  top 
)

void Goocanvas::Canvas::grab_focus ( const Glib::RefPtr< Item > &  item  ) 

void Goocanvas::Canvas::render ( const Cairo::RefPtr< Cairo::Context > &  context,
const Bounds bounds,
double  scale = 0.0 
)

void Goocanvas::Canvas::render ( const Cairo::RefPtr< Cairo::Context > &  context,
double  scale = 0.0 
)

void Goocanvas::Canvas::convert_to_pixels ( double &  x,
double &  y 
) const

void Goocanvas::Canvas::convert_from_pixels ( double &  x,
double &  y 
) const

void Goocanvas::Canvas::convert_to_item_space ( const Glib::RefPtr< Item > &  item,
double &  x,
double &  y 
) const

void Goocanvas::Canvas::convert_from_item_space ( const Glib::RefPtr< Item > &  item,
double &  x,
double &  y 
) const

Gdk::GrabStatus Goocanvas::Canvas::pointer_grab ( const Glib::RefPtr< Item > &  item,
Gdk::EventMask  mask,
const Gdk::Cursor &  cursor,
guint32  time 
)

Gdk::GrabStatus Goocanvas::Canvas::pointer_grab ( const Glib::RefPtr< Item > &  item,
Gdk::EventMask  mask,
guint32  time 
)

void Goocanvas::Canvas::pointer_ungrab ( const Glib::RefPtr< Item > &  item,
guint32  time 
)

GdkGrabStatus Goocanvas::Canvas::keyboard_grab ( const Glib::RefPtr< Item > &  item,
bool  owner_events,
guint32  time 
)

void Goocanvas::Canvas::keyboard_ungrab ( const Glib::RefPtr< Item > &  item,
guint32  time 
)

Cairo::RefPtr<Cairo::Context> Goocanvas::Canvas::create_cairo_context (  ) 

Glib::RefPtr<Item> Goocanvas::Canvas::create_item ( const Glib::RefPtr< ItemModel > &  model  ) 

void Goocanvas::Canvas::unregister_item ( const Glib::RefPtr< ItemModel > &  model  ) 

void Goocanvas::Canvas::update (  ) 

void Goocanvas::Canvas::request_update (  ) 

void Goocanvas::Canvas::request_redraw ( const Bounds bounds  ) 

double Goocanvas::Canvas::get_default_line_width (  )  const

void Goocanvas::Canvas::register_widget_item ( const Glib::RefPtr< Goocanvas::Widget > &  widget  ) 

void Goocanvas::Canvas::unregister_widget_item ( const Glib::RefPtr< Goocanvas::Widget > &  widget  ) 

Glib::SignalProxy2< void,Gtk::Adjustment*,Gtk::Adjustment* > Goocanvas::Canvas::signal_set_scroll_adjustments (  ) 

Prototype:
void on_my_set_scroll_adjustments(Gtk::Adjustment* hadjustment, Gtk::Adjustment* vadjustment)

Glib::SignalProxy2< void,const Glib::RefPtr<Item>&,const Glib::RefPtr<ItemModel>& > Goocanvas::Canvas::signal_item_created (  ) 

Prototype:
void on_my_item_created(const Glib::RefPtr<Item>& item, const Glib::RefPtr<ItemModel>& model)

Glib::PropertyProxy<double> Goocanvas::Canvas::property_scale (  ) 

The magnification factor of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_scale (  )  const

The magnification factor of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_scale_x (  ) 

The horizontal magnification factor of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_scale_x (  )  const

The horizontal magnification factor of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_scale_y (  ) 

The vertical magnification factor of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_scale_y (  )  const

The vertical magnification factor of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Gtk::AnchorType> Goocanvas::Canvas::property_anchor (  ) 

Where to place the canvas when it is smaller than the widget's allocated area.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Goocanvas::Canvas::property_anchor (  )  const

Where to place the canvas when it is smaller than the widget's allocated area.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_x1 (  ) 

The x coordinate of the left edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_x1 (  )  const

The x coordinate of the left edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_y1 (  ) 

The y coordinate of the top edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_y1 (  )  const

The y coordinate of the top edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_x2 (  ) 

The x coordinate of the right edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_x2 (  )  const

The x coordinate of the right edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_y2 (  ) 

The y coordinate of the bottom edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_y2 (  )  const

The y coordinate of the bottom edge of the canvas bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Goocanvas::Canvas::property_automatic_bounds (  ) 

If the bounds are automatically calculated based on the bounds of all the items in the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Goocanvas::Canvas::property_automatic_bounds (  )  const

If the bounds are automatically calculated based on the bounds of all the items in the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Goocanvas::Canvas::property_bounds_from_origin (  ) 

If the automatic bounds are calculated from the origin.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Goocanvas::Canvas::property_bounds_from_origin (  )  const

If the automatic bounds are calculated from the origin.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_bounds_padding (  ) 

The padding added to the automatic bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_bounds_padding (  )  const

The padding added to the automatic bounds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Gtk::Unit> Goocanvas::Canvas::property_units (  ) 

The units to use for the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Gtk::Unit> Goocanvas::Canvas::property_units (  )  const

The units to use for the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_resolution_x (  ) 

The horizontal resolution of the display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_resolution_x (  )  const

The horizontal resolution of the display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Goocanvas::Canvas::property_resolution_y (  ) 

The vertical resolution of the display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::Canvas::property_resolution_y (  )  const

The vertical resolution of the display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly<Glib::ustring> Goocanvas::Canvas::property_background_color (  ) 

The color to use for the canvas background.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly<guint> Goocanvas::Canvas::property_background_color_rgb (  ) 

The color to use for the canvas background.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Goocanvas::Canvas::property_integer_layout (  ) 

If all item layout is done to the nearest integer.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Goocanvas::Canvas::property_integer_layout (  )  const

If all item layout is done to the nearest integer.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.


Friends And Related Function Documentation

Goocanvas::Canvas * wrap ( GooCanvas *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


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

Generated on Tue Feb 19 03:39:03 2008 for goocanvasmm by  doxygen 1.5.5