CanvasItemModel
Object Hierarchy:
Description:
[ CCode ( type_id = "goo_canvas_item_model_get_type ()" ) ]
public interface CanvasItemModel : Object
public interface CanvasItemModel : Object
CanvasItemModel defines the interface that models for canvas items must implement, and contains methods for operating on canvas item models.
<note><para> The Model/View canvas feature may be removed in a future version of GooCanvas. </para></note>
All known implementing classes:
Namespace: Goo
Package: goocanvas-2.0
Content:
Properties:
- public abstract bool can_focus { get; set; }
- public abstract string description { owned get; set; }
- public abstract CanvasItemModel parent { get; set; }
- public abstract CanvasPointerEvents pointer_events { get; set; }
- public abstract string title { owned get; set; }
- public abstract string tooltip { owned get; set; }
- public abstract Matrix? transform { owned get; set; }
- public abstract CanvasItemVisibility visibility { get; set; }
- public abstract double visibility_threshold { get; set; }
Static methods:
- public static unowned ParamSpec class_find_child_property (ObjectClass mclass, string property_name)
This function is only intended to be used when implementing new canvas item models, specifically layout container item models such as CanvasTableModel .
- public static void class_install_child_property (ObjectClass mclass, uint property_id, ParamSpec pspec)
This function is only intended to be used when implementing new canvas item models, specifically layout container item models such as CanvasTableModel .
- public static (unowned ParamSpec)[] class_list_child_properties (ObjectClass mclass)
This function is only intended to be used when implementing new canvas item models, specifically layout container item models such as CanvasTableModel .
Methods:
- public abstract void add_child (CanvasItemModel child, int position)
Adds a child at the given stack position.
- public void animate (double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, CanvasAnimateType type)
Animates a model from its current position to the given offsets, scale and rotation.
- public abstract unowned CanvasItem create_item (Canvas canvas)
- public int find_child (CanvasItemModel child)
Attempts to find the given child with the container's stack.
- public abstract unowned CanvasItemModel get_child (int child_num)
Gets the child at the given stack position.
- public void get_child_properties (CanvasItemModel child, ...)
Gets the values of one or more child properties of
child
. - public void get_child_properties_valist (CanvasItemModel child, va_list var_args)
Gets the values of one or more child properties of
child
. - public abstract void get_child_property (CanvasItemModel child, uint property_id, Value value, ParamSpec pspec)
Gets a child property of
child
. - public abstract int get_n_children ()
Gets the number of children of the container.
- public abstract unowned CanvasItemModel get_parent ()
Gets the parent of the given model.
- public bool get_simple_transform (out double x, out double y, out double scale, out double rotation)
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.
- public abstract unowned CanvasStyle get_style ()
Gets the model's style.
- public abstract bool get_transform (out Matrix transform)
Gets the transformation matrix of an item model.
- public bool is_container ()
Tests to see if the given item model is a container.
- public void lower (CanvasItemModel? below)
Lowers a model in the stacking order.
- public abstract void move_child (int old_position, int new_position)
Moves a child to a new stack position.
- public void raise (CanvasItemModel? above)
Raises a model in the stacking order.
- public void remove ()
Removes a model from its parent.
- public abstract void remove_child (int child_num)
Removes the child at the given position.
- public void rotate (double degrees, double cx, double cy)
Rotates the model's coordinate system by the given amount, about the given origin.
- public void scale (double sx, double sy)
Scales the model's coordinate system by the given amounts.
- public void set_child_properties (CanvasItemModel child, ...)
Sets the values of one or more child properties of
child
. - public void set_child_properties_valist (CanvasItemModel child, va_list var_args)
Sets the values of one or more child properties of
child
. - public abstract void set_child_property (CanvasItemModel child, uint property_id, Value value, ParamSpec pspec)
Sets a child property of
child
. - public abstract void set_parent (CanvasItemModel parent)
This function is only intended to be used when implementing new canvas item models (specifically container models such as CanvasGroupModel).
- public void set_simple_transform (double x, double y, double scale, double rotation)
A convenience function to set the item model's transformation matrix.
- public abstract void set_style (CanvasStyle style)
Sets the model's style, by copying the properties from the given style.
- public abstract void set_transform (Matrix? transform)
Sets the transformation matrix of an item model.
- public 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.
- public 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.
- public void stop_animation ()
Stops any current animation for the given model, leaving it at its current position.
- public void translate (double tx, double ty)
Translates the origin of the model's coordinate system by the given amounts.
Signals:
- public virtual signal void animation_finished (bool stopped)
Emitted when the item model animation has finished.
- public virtual signal void changed (bool recompute_bounds)
Emitted when the item model has been changed.
- public virtual signal void child_added (int child_num)
Emitted when a child has been added.
- public virtual signal void child_moved (int old_child_num, int new_child_num)
Emitted when a child has been moved in the stacking order.
- public virtual signal void child_notify (ParamSpec pspec)
Emitted for each child property that has changed.
- public virtual signal void child_removed (int child_num)
Emitted when a child has been removed.
Inherited Members:
All known members inherited from class GLib.Object