Goocanvas::ItemModel Class Reference
Inheritance diagram for Goocanvas::ItemModel:
[legend]

List of all members.

## Public Member Functions

virtual | ~ItemModel ()
GooCanvasItemModel* | gobj ()
| Provides access to the underlying C GObject.
const GooCanvasItemModel* | gobj () const
| Provides access to the underlying C GObject.
int | get_n_children () const
| Gets the number of children of the container.
Glib::RefPtr< ItemModel > | get_child (int child_num)
| Gets the child at the given stack position.
Glib::RefPtr< const ItemModel > | get_child (int child_num) const
| Gets the child at the given stack position.
void | get_child_property (const Glib::RefPtr< ItemModel >& child, const Glib::ustring& property_name, Glib::ValueBase&value) const
| Gets a child property of child.
void | set_child_property (const Glib::RefPtr< ItemModel >& child, const Glib::ustring& property_name, const Glib::ValueBase&value)
| Sets a child property of child.
void | add_child (const Glib::RefPtr< ItemModel >& child, int position)
| Adds a child at the given stack position.
void | add_child (const Glib::RefPtr< ItemModel >& child)
void | move_child (int old_position, int new_position)
| Moves a child to a new stack position.
void | remove_child (int child_num)
| Removes the child at the given position.
int | find_child (const Glib::RefPtr< ItemModel >& child)
| Attempts to find the given child with the container's stack.
Glib::RefPtr< ItemModel > | get_parent ()
| Gets the parent of the given model.
Glib::RefPtr< const ItemModel > | get_parent () const
| Gets the parent of the given model.
void | set_parent (const Glib::RefPtr< ItemModel >& parent)
| This function is only intended to be used when implementing new canvas item models (specifically container models such as Goo::CanvasGroupModel).
void | remove ()
| Removes a model from its parent.
bool | is_container () const
| Tests to see if the given item model is a container.
void | raise (const Glib::RefPtr< ItemModel >& above)
| Raises a model in the stacking order.
void | raise ()
| Raise the item to the top of the stack.
void | lower (const Glib::RefPtr< ItemModel >& below)
| Lowers a model in the stacking order.
void | lower ()
| Lower the item to the bottom of the stack.
bool | get_transform (Cairo::Matrix*transform)
| Gets the transformation matrix of an item model.
void | set_transform (const Cairo::Matrix*transform)
| Sets the transformation matrix of an item model.
void | set_simple_transform (double x, double y, double scale, double rotation)
| A convenience function to set the item model's transformation matrix.
bool | get_simple_transform (double& x, double& y, double& scale, double& rotation) const
| This function can be used to get the position, scale and rotation of an item model, providing that the model has a simple transformation matrix (e.g. set with set_simple_transform(), or using a combination of simple translate, scale and rotate operations).
void | translate (double tx, double ty)
| Translates the origin of the model's coordinate system by the given amounts.
void | scale (double sx, double sy)
| Scales the model's coordinate system by the given amounts.
void | rotate (double degrees, double cx, double cy)
| Rotates the model's coordinate system by the given amount, about the given origin.
void | skew_x (double degrees, double cx, double cy)
| Skews the model's coordinate system along the x axis by the given amount, about the given origin.
void | skew_y (double degrees, double cx, double cy)
| Skews the model's coordinate system along the y axis by the given amount, about the given origin.
Glib::RefPtr< Style > | get_style ()
| Gets the model's style.
Glib::RefPtr< const Style > | get_style () const
| Gets the model's style.
void | set_style (const Glib::RefPtr< Style >& style)
| Sets the model's style, by copying the properties from the given style.
void | animate (double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, AnimateType animate_type)
| Animates a model from its current position to the given offsets, scale and rotation.
void | stop_animation ()
| Stops any current animation for the given model, leaving it at its current position.
Glib::SignalProxy1< void, int > | signal_child_added ()
Glib::SignalProxy1< void, int > | signal_child_removed ()
Glib::SignalProxy2< void, int, int > | signal_child_moved ()
Glib::SignalProxy1< void, bool > | signal_changed ()
Glib::SignalProxy1< void, GParamSpec* > | signal_child_notify ()
Glib::SignalProxy1< void, bool > | signal_animation_finished ()
Glib::PropertyProxy < Glib::RefPtr< ItemModel > > | property_parent ()
| The parent item model.
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< ItemModel > > | property_parent () const
| The parent item model.
Glib::PropertyProxy< bool > | property_can_focus ()
| If the item can take the keyboard focus.
Glib::PropertyProxy_ReadOnly < bool > | property_can_focus () const
| If the item can take the keyboard focus.
Glib::PropertyProxy < Cairo::Matrix* > | property_transform ()
| The transformation matrix of the item.
Glib::PropertyProxy_ReadOnly < Cairo::Matrix* > | property_transform () const
| The transformation matrix of the item.
Glib::PropertyProxy < Glib::ustring > | property_title ()
| A short context-rich description of the item for use by assistive technologies.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_title () const
| A short context-rich description of the item for use by assistive technologies.
Glib::PropertyProxy < Glib::ustring > | property_description ()
| A description of the item for use by assistive technologies.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_description () const
| A description of the item for use by assistive technologies.
Glib::PropertyProxy < PointerEvents > | property_pointer_events ()
| Specifies when the item receives pointer events.
Glib::PropertyProxy_ReadOnly < PointerEvents > | property_pointer_events () const
| Specifies when the item receives pointer events.
Glib::PropertyProxy < ItemVisibility > | property_visibility ()
| When the canvas item is visible.
Glib::PropertyProxy_ReadOnly < ItemVisibility > | property_visibility () const
| When the canvas item is visible.
Glib::PropertyProxy< double > | property_visibility_threshold ()
| The scale threshold at which the item becomes visible.
Glib::PropertyProxy_ReadOnly < double > | property_visibility_threshold () const
| The scale threshold at which the item becomes visible.
Glib::PropertyProxy< double > | property_x ()
| The x coordinate of the left side of the item.
Glib::PropertyProxy_ReadOnly < double > | property_x () const
| The x coordinate of the left side of the item.
Glib::PropertyProxy< double > | property_y ()
| The y coordinate of the top of the item.
Glib::PropertyProxy_ReadOnly < double > | property_y () const
| The y coordinate of the top of the item.
Glib::PropertyProxy< double > | property_width ()
| The width of the item.
Glib::PropertyProxy_ReadOnly < double > | property_width () const
| The width of the item.
Glib::PropertyProxy< double > | property_height ()
| The height of the item.
Glib::PropertyProxy_ReadOnly < double > | property_height () const
| The height of the item.

## Static Public Member Functions

static void | add_interface (GType gtype_implementer)

## Protected Member Functions

virtual int | get_n_children_vfunc () const
virtual Glib::RefPtr< ItemModel > | get_child_vfunc (int child_num) const
virtual void | add_child_vfunc (const Glib::RefPtr< ItemModel >& child, int position)
virtual void | move_child_vfunc (int old_position, int ne_position)
virtual void | remove_child_vfunc (int child_num)
virtual void | get_child_property_vfunc (const Glib::RefPtr< ItemModel >& child, guint property_id, Glib::ValueBase&value, GParamSpec* pspec) const
virtual void | set_child_property_vfunc (const Glib::RefPtr< ItemModel >& child, guint property_id, const Glib::ValueBase&value, GParamSpec* pspec)
virtual Glib::RefPtr< ItemModel > | get_parent_vfunc () const
virtual void | set_parent_vfunc (const Glib::RefPtr< ItemModel >& parent)
virtual Glib::RefPtr< Item > | create_item_vfunc (Canvas* canvas)
virtual bool | get_transform_vfunc (Cairo::Matrix*transform) const
virtual void | set_transform_vfunc (const Cairo::Matrix*transform)
virtual Glib::RefPtr< Style > | get_style_vfunc () const
virtual void | set_style_vfunc (const Glib::RefPtr< Style >& style)
virtual void | on_child_added (int child_num)
virtual void | on_child_removed (int child_num)
virtual void | on_child_moved (int old_child_num, int new_child_num)
virtual void | on_changed (bool recompute_bounds)
virtual void | on_child_notify (GParamSpec* pspec)
virtual void | on_animation_finished (bool stopped)

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr < Goocanvas::ItemModel > | wrap (GooCanvasItemModel* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Constructor & Destructor Documentation

virtual Goocanvas::ItemModel::~ItemModel | ( |  | ) | `[virtual]`

## Member Function Documentation

void Goocanvas::ItemModel::add_child | ( | const Glib::RefPtr< ItemModel >& | child,
|  | int | position
| ) |  |

Adds a child at the given stack position.

Parameters:

  child | The child to add.
  position | The position of the child, or -1 to place it last (at the top of the stacking order).

void Goocanvas::ItemModel::add_child | ( | const Glib::RefPtr< ItemModel >& | child | ) |

virtual void Goocanvas::ItemModel::add_child_vfunc | ( | const Glib::RefPtr< ItemModel >& | child,
|  | int | position
| ) |  | `[protected, virtual]`

static void Goocanvas::ItemModel::add_interface | ( | GType | gtype_implementer | ) | `[static]`

void Goocanvas::ItemModel::animate | ( | double | x,
|  | double | y,
|  | double | scale,
|  | double | degrees,
|  | bool | absolute,
|  | int | duration,
|  | int | step_time,
|  | AnimateType | animate_type
| ) |  |

Animates a model from its current position to the given offsets, scale and rotation.

Parameters:

  x | The final x coordinate.
  y | The final y coordinate.
  scale | The final scale.
  degrees | The final rotation. This can be negative to rotate anticlockwise, and can also be greater than 360 to rotate a number of times.
  absolute | If the x, y, scale and degrees values are absolute, or relative to the current transform. Note that absolute animations only work if the model currently has a simple transform. If the model has a shear or some other complicated transform it may result in strange animations.
  duration | The duration of the animation, in milliseconds (1/1000ths of a second).
  step_time | The time between each animation step, in milliseconds.
  type | Specifies what happens when the animation finishes.

virtual Glib::RefPtr<Item> Goocanvas::ItemModel::create_item_vfunc | ( | Canvas* | canvas | ) | `[protected, virtual]`

int Goocanvas::ItemModel::find_child | ( | const Glib::RefPtr< ItemModel >& | child | ) |

Attempts to find the given child with the container's stack.

Parameters:

  child | The child to find.

Returns:
  The position of the given child, or -1 if it isn't found.

Glib::RefPtr<ItemModel> Goocanvas::ItemModel::get_child | ( | int | child_num | ) |

Gets the child at the given stack position.

Parameters:

  child_num | The position of a child in the container's stack.

Returns:
  The child at the given stack position, or `0` if child_num is out of range.

Glib::RefPtr<const ItemModel> Goocanvas::ItemModel::get_child | ( | int | child_num | ) | const

Gets the child at the given stack position.

Parameters:

  child_num | The position of a child in the container's stack.

Returns:
  The child at the given stack position, or `0` if child_num is out of range.

void Goocanvas::ItemModel::get_child_property | ( | const Glib::RefPtr< ItemModel >& | child,
|  | const Glib::ustring & | property_name,
|  | Glib::ValueBase & | value
| ) |  | const

Gets a child property of child.

Parameters:

  child | A child Goo::CanvasItemModel.
  property_name | The name of the child property to get.
  value | A location to return the value.

virtual void Goocanvas::ItemModel::get_child_property_vfunc | ( | const Glib::RefPtr< ItemModel >& | child,
|  | guint | property_id,
|  | Glib::ValueBase & | value,
|  | GParamSpec * | pspec
| ) |  | const`[protected, virtual]`

virtual Glib::RefPtr<ItemModel> Goocanvas::ItemModel::get_child_vfunc | ( | int | child_num | ) | const`[protected, virtual]`

int Goocanvas::ItemModel::get_n_children | ( |  | ) | const

Gets the number of children of the container.

Returns:
  The number of children.

virtual int Goocanvas::ItemModel::get_n_children_vfunc | ( |  | ) | const`[protected, virtual]`

Glib::RefPtr<ItemModel> Goocanvas::ItemModel::get_parent | ( |  | ) |

Gets the parent of the given model.

Returns:
  The parent model, or `0` if the model has no parent.

Glib::RefPtr<const ItemModel> Goocanvas::ItemModel::get_parent | ( |  | ) | const

Gets the parent of the given model.

Returns:
  The parent model, or `0` if the model has no parent.

virtual Glib::RefPtr<ItemModel> Goocanvas::ItemModel::get_parent_vfunc | ( |  | ) | const`[protected, virtual]`

bool Goocanvas::ItemModel::get_simple_transform | ( | double & | x,
|  | double & | y,
|  | double & | scale,
|  | double & | rotation
| ) |  | const

This function can be used to get the position, scale and rotation of an item model, providing that the model has a simple transformation matrix (e.g. set with set_simple_transform(), or using a combination of simple translate, scale and rotate operations).

If the model has a complex transformation matrix the results will be incorrect.

Parameters:

  x | Returns the x coordinate of the origin of the model's coordinate space.
  y | Returns the y coordinate of the origin of the model's coordinate space.
  scale | Returns the scale of the model.
  rotation | Returns the clockwise rotation of the model, in degrees (0-360).

Returns:
  `true` if a transform is set.

Glib::RefPtr<const Style> Goocanvas::ItemModel::get_style | ( |  | ) | const

Gets the model's style.

If the model doesn't have its own style it will return its parent's style.

Returns:
  The model's style.

Glib::RefPtr<Style> Goocanvas::ItemModel::get_style | ( |  | ) |

Gets the model's style.

If the model doesn't have its own style it will return its parent's style.

Returns:
  The model's style.

virtual Glib::RefPtr<Style> Goocanvas::ItemModel::get_style_vfunc | ( |  | ) | const`[protected, virtual]`

bool Goocanvas::ItemModel::get_transform | ( | Cairo::Matrix * | transform | ) |

Gets the transformation matrix of an item model.

Parameters:

  transform | The place to store the transform.

Returns:
  `true` if a transform is set.

virtual bool Goocanvas::ItemModel::get_transform_vfunc | ( | Cairo::Matrix * | transform | ) | const`[protected, virtual]`

GooCanvasItemModel* Goocanvas::ItemModel::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Goocanvas::EllipseModel, Goocanvas::GridModel, Goocanvas::GroupModel, Goocanvas::ImageModel, Goocanvas::ItemModelSimple, Goocanvas::PolylineModel, Goocanvas::PathModel, Goocanvas::RectModel, Goocanvas::TableModel, and Goocanvas::TextModel.

const GooCanvasItemModel* Goocanvas::ItemModel::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Goocanvas::EllipseModel, Goocanvas::GridModel, Goocanvas::GroupModel, Goocanvas::ImageModel, Goocanvas::ItemModelSimple, Goocanvas::PolylineModel, Goocanvas::PathModel, Goocanvas::RectModel, Goocanvas::TableModel, and Goocanvas::TextModel.

bool Goocanvas::ItemModel::is_container | ( |  | ) | const

Tests to see if the given item model is a container.

Returns:
  `true` if the item model is a container.

void Goocanvas::ItemModel::lower | ( | const Glib::RefPtr< ItemModel >& | below | ) |

Lowers a model in the stacking order.

Parameters:

  below | The item model to lower model below, or `0` to lower model to the bottom of the stack.

void Goocanvas::ItemModel::lower | ( |  | ) |

Lower the item to the bottom of the stack.

void Goocanvas::ItemModel::move_child | ( | int | old_position,
|  | int | new_position
| ) |  |

Moves a child to a new stack position.

Parameters:

  old_position | The current position of the child.
  new_position | The new position of the child.

virtual void Goocanvas::ItemModel::move_child_vfunc | ( | int | old_position,
|  | int | ne_position
| ) |  | `[protected, virtual]`

virtual void Goocanvas::ItemModel::on_animation_finished | ( | bool | stopped | ) | `[protected, virtual]`

virtual void Goocanvas::ItemModel::on_changed | ( | bool | recompute_bounds | ) | `[protected, virtual]`

virtual void Goocanvas::ItemModel::on_child_added | ( | int | child_num | ) | `[protected, virtual]`

virtual void Goocanvas::ItemModel::on_child_moved | ( | int | old_child_num,
|  | int | new_child_num
| ) |  | `[protected, virtual]`

virtual void Goocanvas::ItemModel::on_child_notify | ( | GParamSpec * | pspec | ) | `[protected, virtual]`

virtual void Goocanvas::ItemModel::on_child_removed | ( | int | child_num | ) | `[protected, virtual]`

Glib::PropertyProxy<bool> Goocanvas::ItemModel::property_can_focus | ( |  | ) |

If the item can take the keyboard focus.

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::ItemModel::property_can_focus | ( |  | ) | const

If the item can take the keyboard focus.

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<Glib::ustring> Goocanvas::ItemModel::property_description | ( |  | ) |

A description of the item for use by assistive technologies.

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<Glib::ustring> Goocanvas::ItemModel::property_description | ( |  | ) | const

A description of the item for use by assistive technologies.

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::ItemModel::property_height | ( |  | ) |

The height of the item.

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::ItemModel::property_height | ( |  | ) | const

The height of the item.

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< Glib::RefPtr<ItemModel> > Goocanvas::ItemModel::property_parent | ( |  | ) |

The parent item model.

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< Glib::RefPtr<ItemModel> > Goocanvas::ItemModel::property_parent | ( |  | ) | const

The parent item model.

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<PointerEvents> Goocanvas::ItemModel::property_pointer_events | ( |  | ) |

Specifies when the item receives pointer events.

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<PointerEvents> Goocanvas::ItemModel::property_pointer_events | ( |  | ) | const

Specifies when the item receives pointer events.

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<Glib::ustring> Goocanvas::ItemModel::property_title | ( |  | ) |

A short context-rich description of the item for use by assistive technologies.

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<Glib::ustring> Goocanvas::ItemModel::property_title | ( |  | ) | const

A short context-rich description of the item for use by assistive technologies.

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<Cairo::Matrix*> Goocanvas::ItemModel::property_transform | ( |  | ) |

The transformation matrix of the item.

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<Cairo::Matrix*> Goocanvas::ItemModel::property_transform | ( |  | ) | const

The transformation matrix of the item.

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<ItemVisibility> Goocanvas::ItemModel::property_visibility | ( |  | ) |

When the canvas item is visible.

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<ItemVisibility> Goocanvas::ItemModel::property_visibility | ( |  | ) | const

When the canvas item is visible.

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::ItemModel::property_visibility_threshold | ( |  | ) |

The scale threshold at which the item becomes visible.

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::ItemModel::property_visibility_threshold | ( |  | ) | const

The scale threshold at which the item becomes visible.

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::ItemModel::property_width | ( |  | ) | const

The width of the item.

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.

Reimplemented in Goocanvas::TextModel.

Glib::PropertyProxy<double> Goocanvas::ItemModel::property_width | ( |  | ) |

The width of the item.

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.

Reimplemented in Goocanvas::TextModel.

Glib::PropertyProxy<double> Goocanvas::ItemModel::property_x | ( |  | ) |

The x coordinate of the left side of the item.

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.

Reimplemented in Goocanvas::TextModel.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::ItemModel::property_x | ( |  | ) | const

The x coordinate of the left side of the item.

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.

Reimplemented in Goocanvas::TextModel.

Glib::PropertyProxy<double> Goocanvas::ItemModel::property_y | ( |  | ) |

The y coordinate of the top of the item.

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.

Reimplemented in Goocanvas::TextModel.

Glib::PropertyProxy_ReadOnly<double> Goocanvas::ItemModel::property_y | ( |  | ) | const

The y coordinate of the top of the item.

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.

Reimplemented in Goocanvas::TextModel.

void Goocanvas::ItemModel::raise | ( | const Glib::RefPtr< ItemModel >& | above | ) |

Raises a model in the stacking order.

Parameters:

  above | The item model to raise model above, or `0` to raise model to the top of the stack.

void Goocanvas::ItemModel::raise | ( |  | ) |

Raise the item to the top of the stack.

void Goocanvas::ItemModel::remove | ( |  | ) |

Removes a model from its parent.

If the model is in a canvas it will be removed.

This would normally also result in the model being freed.

void Goocanvas::ItemModel::remove_child | ( | int | child_num | ) |

Removes the child at the given position.

Parameters:

  child_num | The position of the child to remove.

virtual void Goocanvas::ItemModel::remove_child_vfunc | ( | int | child_num | ) | `[protected, virtual]`

void Goocanvas::ItemModel::rotate | ( | double | degrees,
|  | double | cx,
|  | double | cy
| ) |  |

Rotates the model's coordinate system by the given amount, about the given origin.

Parameters:

  degrees | The clockwise angle of rotation.
  cx | The x coordinate of the origin of the rotation.
  cy | The y coordinate of the origin of the rotation.

void Goocanvas::ItemModel::scale | ( | double | sx,
|  | double | sy
| ) |  |

Scales the model's coordinate system by the given amounts.

Parameters:

  sx | The amount to scale the horizontal axis.
  sy | The amount to scale the vertical axis.

void Goocanvas::ItemModel::set_child_property | ( | const Glib::RefPtr< ItemModel >& | child,
|  | const Glib::ustring & | property_name,
|  | const Glib::ValueBase & | value
| ) |  |

Sets a child property of child.

Parameters:

  child | A child Goo::CanvasItemModel.
  property_name | The name of the child property to set.
  value | The value to set the property to.

virtual void Goocanvas::ItemModel::set_child_property_vfunc | ( | const Glib::RefPtr< ItemModel >& | child,
|  | guint | property_id,
|  | const Glib::ValueBase & | value,
|  | GParamSpec * | pspec
| ) |  | `[protected, virtual]`

void Goocanvas::ItemModel::set_parent | ( | const Glib::RefPtr< ItemModel >& | parent | ) |

This function is only intended to be used when implementing new canvas item models (specifically container models such as Goo::CanvasGroupModel).

It sets the parent of the child model. <!--PARAMETERS--> <note><para> This function cannot be used to add a model to a group or to change the parent of a model. To do that use the Goo::CanvasItemModel:parent property. </para></note>

Parameters:

  parent | The new parent item model.

virtual void Goocanvas::ItemModel::set_parent_vfunc | ( | const Glib::RefPtr< ItemModel >& | parent | ) | `[protected, virtual]`

void Goocanvas::ItemModel::set_simple_transform | ( | double | x,
|  | double | y,
|  | double | scale,
|  | double | rotation
| ) |  |

A convenience function to set the item model's transformation matrix.

Parameters:

  x | The x coordinate of the origin of the model's coordinate space.
  y | The y coordinate of the origin of the model's coordinate space.
  scale | The scale of the model.
  rotation | The clockwise rotation of the model, in degrees.

void Goocanvas::ItemModel::set_style | ( | const Glib::RefPtr< Style >& | style | ) |

Sets the model's style, by copying the properties from the given style.

Parameters:

  style | A style.

virtual void Goocanvas::ItemModel::set_style_vfunc | ( | const Glib::RefPtr< Style >& | style | ) | `[protected, virtual]`

void Goocanvas::ItemModel::set_transform | ( | const Cairo::Matrix * | transform | ) |

Sets the transformation matrix of an item model.

Parameters:

  transform | The new transformation matrix, or `0` to reset the transformation to the identity matrix.

virtual void Goocanvas::ItemModel::set_transform_vfunc | ( | const Cairo::Matrix * | transform | ) | `[protected, virtual]`

Glib::SignalProxy1< void,bool > Goocanvas::ItemModel::signal_animation_finished | ( |  | ) |

Prototype:
  `void on_my_animation_finished(bool stopped)`

Glib::SignalProxy1< void,bool > Goocanvas::ItemModel::signal_changed | ( |  | ) |

Prototype:
  `void on_my_changed(bool recompute_bounds)`

Glib::SignalProxy1< void,int > Goocanvas::ItemModel::signal_child_added | ( |  | ) |

Prototype:
  `void on_my_child_added(int child_num)`

Glib::SignalProxy2< void,int,int > Goocanvas::ItemModel::signal_child_moved | ( |  | ) |

Prototype:
  `void on_my_child_moved(int old_child_num, int new_child_num)`

Glib::SignalProxy1< void,GParamSpec* > Goocanvas::ItemModel::signal_child_notify | ( |  | ) |

Prototype:
  `void on_my_child_notify(GParamSpec* pspec)`

Glib::SignalProxy1< void,int > Goocanvas::ItemModel::signal_child_removed | ( |  | ) |

Prototype:
  `void on_my_child_removed(int child_num)`

void Goocanvas::ItemModel::skew_x | ( | double | degrees,
|  | double | cx,
|  | double | cy
| ) |  |

Skews the model's coordinate system along the x axis by the given amount, about the given origin.

Parameters:

  degrees | The skew angle.
  cx | The x coordinate of the origin of the skew transform.
  cy | The y coordinate of the origin of the skew transform.

void Goocanvas::ItemModel::skew_y | ( | double | degrees,
|  | double | cx,
|  | double | cy
| ) |  |

Skews the model's coordinate system along the y axis by the given amount, about the given origin.

Parameters:

  degrees | The skew angle.
  cx | The x coordinate of the origin of the skew transform.
  cy | The y coordinate of the origin of the skew transform.

void Goocanvas::ItemModel::stop_animation | ( |  | ) |

Stops any current animation for the given model, leaving it at its current position.

void Goocanvas::ItemModel::translate | ( | double | tx,
|  | double | ty
| ) |  |

Translates the origin of the model's coordinate system by the given amounts.

Parameters:

  tx | The amount to move the origin in the horizontal direction.
  ty | The amount to move the origin in the vertical direction.

## Friends And Related Function Documentation

Glib::RefPtr< Goocanvas::ItemModel > wrap | ( | GooCanvasItemModel * | 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:

- goocanvasmm/itemmodel.h