
@c %start of fragment

@deftp Class <gnome-canvas-item>
Derives from @code{<gtk-object>}.

This class defines the following properties:

@table @code
@item parent


@end table

@end deftp

@defop Signal <gnome-canvas-item> event  (arg0@tie{}@code{<gdk-event>}) @result{}@tie{}@code{<gboolean>}
Signals mouse button clicks, motion, enter/leave, and key press events on canvas
items. Use this signal to create user interactive items. The @c (structfield
"x") and @c (structfield "y") coordinates of the @var{event} structure have been
converted to canvas world coordinates.

@end defop

@deffn Function gnome-canvas-item-move  (self@tie{}@code{<gnome-canvas-item>}) (dx@tie{}@code{double}) (dy@tie{}@code{double})
@deffnx Method move
Moves a canvas item by creating an affine transformation matrix for translation
by using the specified values. This happens in item local coordinate system, so
if you have nontrivial transform, it most probably does not do, what you want.

@table @var
@item item
A canvas item.

@item dx
Horizontal offset.

@item dy
Vertical offset.

@end table

@end deffn

@deffn Function gnome-canvas-item-affine-relative  (self@tie{}@code{<gnome-canvas-item>}) (x1@tie{}@code{double}) (y2@tie{}@code{double}) (x2@tie{}@code{double}) (y2@tie{}@code{double}) (x3@tie{}@code{double}) (y3@tie{}@code{double})
@deffnx Method affine-relative
Combines the specified affine transformation matrix with the item's current
transformation. NULL affine is not allowed.

@table @var
@item item
A canvas item.

@item affine
An affine transformation matrix.

@end table

@end deffn

@deffn Function gnome-canvas-item-affine-absolute  (self@tie{}@code{<gnome-canvas-item>}) (x1@tie{}@code{double}) (y2@tie{}@code{double}) (x2@tie{}@code{double}) (y2@tie{}@code{double}) (x3@tie{}@code{double}) (y3@tie{}@code{double})
@deffnx Method affine-absolute
Makes the item's affine transformation matrix be equal to the specified matrix.
NULL affine is treated as identity.

@table @var
@item item
A canvas item.

@item affine
An affine transformation matrix.

@end table

@end deffn

@deffn Function gnome-canvas-item-raise  (self@tie{}@code{<gnome-canvas-item>}) (positions@tie{}@code{int})
@deffnx Method raise
Raises the item in its parent's stack by the specified number of positions. If
the number of positions is greater than the distance to the top of the stack,
then the item is put at the top.

@table @var
@item item
A canvas item.

@item positions
Number of steps to raise the item.

@end table

@end deffn

@deffn Function gnome-canvas-item-lower  (self@tie{}@code{<gnome-canvas-item>}) (positions@tie{}@code{int})
@deffnx Method lower
Lowers the item in its parent's stack by the specified number of positions. If
the number of positions is greater than the distance to the bottom of the stack,
then the item is put at the bottom.

@table @var
@item item
A canvas item.

@item positions
Number of steps to lower the item.

@end table

@end deffn

@deffn Function gnome-canvas-item-raise-to-top  (self@tie{}@code{<gnome-canvas-item>})
@deffnx Method raise-to-top
Raises an item to the top of its parent's stack.

@table @var
@item item
A canvas item.

@end table

@end deffn

@deffn Function gnome-canvas-item-lower-to-bottom  (self@tie{}@code{<gnome-canvas-item>})
@deffnx Method lower-to-bottom
Lowers an item to the bottom of its parent's stack.

@table @var
@item item
A canvas item.

@end table

@end deffn

@deffn Function gnome-canvas-item-show  (self@tie{}@code{<gnome-canvas-item>})
@deffnx Method show
Shows a canvas item. If the item was already shown, then no action is taken.

@table @var
@item item
A canvas item.

@end table

@end deffn

@deffn Function gnome-canvas-item-hide  (self@tie{}@code{<gnome-canvas-item>})
@deffnx Method hide
Hides a canvas item. If the item was already hidden, then no action is taken.

@table @var
@item item
A canvas item.

@end table

@end deffn

@deffn Function gnome-canvas-item-grab  (self@tie{}@code{<gnome-canvas-item>}) (event_mask@tie{}@code{unsigned-int}) (cursor@tie{}@code{<gdk-cursor>}) (etime@tie{}@code{unsigned-int32}) @result{}@tie{} (ret@tie{}@code{int})
@deffnx Method grab
Specifies that all events that match the specified event mask should be sent to
the specified item, and also grabs the mouse by calling @code{gdk-pointer-grab}.
The event mask is also used when grabbing the pointer. If @var{cursor} is not
NULL, then that cursor is used while the grab is active. The @var{etime}
parameter is the timestamp required for grabbing the mouse.

Return value: If an item was already grabbed, it returns
@samp{GDK_GRAB_ALREADY_GRABBED}. If the specified item was hidden by calling
@code{gnome-canvas-item-hide}, then it

@table @var
@item item
A canvas item.

@item event-mask
Mask of events that will be sent to this item.

@item cursor
If non-NULL, the cursor that will be used while the grab is active.

@item etime
The timestamp required for grabbing the mouse, or GDK_CURRENT_TIME.

@item ret
@samp{GDK_GRAB_NOT_VIEWABLE}. Else, it returns the result of calling
@code{gdk-pointer-grab}.

@end table

@end deffn

@deffn Function gnome-canvas-item-ungrab  (self@tie{}@code{<gnome-canvas-item>}) (etime@tie{}@code{unsigned-int32})
@deffnx Method ungrab
Ungrabs the item, which must have been grabbed in the canvas, and ungrabs the
mouse.

@table @var
@item item
A canvas item that holds a grab.

@item etime
The timestamp for ungrabbing the mouse.

@end table

@end deffn

@deffn Function gnome-canvas-item-w2i  (self@tie{}@code{<gnome-canvas-item>}) @result{}@tie{} (x@tie{}@code{double}) (y@tie{}@code{double})
@deffnx Method w2i
Converts a coordinate pair from world coordinates to item-relative coordinates.

@table @var
@item item
A canvas item.

@item x
X coordinate to convert (input/output value).

@item y
Y coordinate to convert (input/output value).

@end table

@end deffn

@deffn Function gnome-canvas-item-i2w  (self@tie{}@code{<gnome-canvas-item>}) @result{}@tie{} (x@tie{}@code{double}) (y@tie{}@code{double})
@deffnx Method i2w
Converts a coordinate pair from item-relative coordinates to world coordinates.

@table @var
@item item
A canvas item.

@item x
X coordinate to convert (input/output value).

@item y
Y coordinate to convert (input/output value).

@end table

@end deffn

@deffn Function gnome-canvas-item-reparent  (self@tie{}@code{<gnome-canvas-item>}) (new_group@tie{}@code{<gnome-canvas-group>})
@deffnx Method reparent
Changes the parent of the specified item to be the new group. The item keeps its
group-relative coordinates as for its old parent, so the item may change its
absolute position within the canvas.

@table @var
@item item
A canvas item.

@item new-group
A canvas group.

@end table

@end deffn

@deffn Function gnome-canvas-item-grab-focus  (self@tie{}@code{<gnome-canvas-item>})
@deffnx Method grab-focus
Makes the specified item take the keyboard focus, so all keyboard events will be
sent to it. If the canvas widget itself did not have the focus, it grabs it as
well.

@table @var
@item item
A canvas item.

@end table

@end deffn

@deffn Function gnome-canvas-item-get-bounds  (self@tie{}@code{<gnome-canvas-item>}) @result{}@tie{} (x1@tie{}@code{double}) (y1@tie{}@code{double}) (x2@tie{}@code{double}) (y2@tie{}@code{double})
@deffnx Method get-bounds
Queries the bounding box of a canvas item. The bounds are returned in the
coordinate system of the item's parent.

@table @var
@item item
A canvas item.

@item x1
Leftmost edge of the bounding box (return value).

@item y1
Upper edge of the bounding box (return value).

@item x2
Rightmost edge of the bounding box (return value).

@item y2
Lower edge of the bounding box (return value).

@end table

@end deffn

@deffn Function gnome-canvas-item-request-update  (self@tie{}@code{<gnome-canvas-item>})
@deffnx Method request-update
To be used only by item implementations. Requests that the canvas queue an
update for the specified item.

@table @var
@item item
A canvas item.

@end table

@end deffn


@c %end of fragment
