gnome-sharp0.0.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.Base class for all canvas items
This is the base class for all canvas items. Canvas items are
the drawing elements of a GnomeCanvas. Example items include
lines, ellipses, polygons, images, text, curves and even
arbitrary GTK+ widgets.
Canvas items use the GObject property system to query and set
parameters. Properties are inherited so, for example, a
has a
property that is
inherited from its parent class object
. So be
sure to check the parent classes of
objects
when looking for item properties.
To create a new canvas item use the
constructor which
takes a parent ,
of the item to create,
and a terminated list of name/value GObject properties to
set for the new item.
There are several methods to change the drawing stacking
order of an item. Call to raise an
item a specified number of positions or
to lower it. To raise an item to the
top call . The
methods will put it at
the bottom.
To show an item call . Note that
canvas item's are shown by default and so do not need to be
explicitly shown after creation (contrary to GTK+ widget
behavior). Call to hide an item.
To move an item relative to its current position (item
coordinates) call or
for more complex
transforms. can be used to
set an item's transform to specific values (not offsets).
To convert between world and item coordinate systems call
, and to convert in the other direction
call . To get the transform for
converting from item to world coordinates use
or for converting item to
canvas coordinates, .
Handling user input for interactive items is accomplished
through a few functions and the "event" signals. To grab the
mouse cursor call , it can be
ungrabbed with (see
of the GTK+ library for details). To grab
keyboard focus call . Received
events will be signaled via the "event" signal.
Some other useful functions include a reparenting routine,
, and a function to query the
bounding box of an item (a minumum rectangular area containing
all parts of the item), Gtk.ObjectGLib.IWrapperSystem.IDisposableMethodSystem.Void
Combines the specified affine transformation matrix with the
item's current transformation.
Return value for an affine transformation matrix.
MethodSystem.Void
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.
Number of steps to lower the item.
MethodSystem.VoidShows a canvas item. If the item was already shown, then no action is taken.MethodSystem.VoidRequest redraw of if in aa mode, or the entire item in in xlib mode.
The svp that needs to be redrawn
This item must contain .
MethodSystem.Void
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.
MethodSystem.VoidLowers an item to the bottom of its parent's stack.MethodSystem.VoidHides a canvas item. If the item was already hidden, then no action is taken.MethodSystem.VoidRaises an item to the top of its parent's stack.MethodSystem.VoidConverts a coordinate pair from world coordinates to item-relative coordinates.
X coordinate to convert (input/output value).
Y coordinate to convert (input/output value).
The parameters and
are used as both in and out parameters.
MethodSystem.VoidSets the svp to the new value, requesting repaint on what's changed
the existing SVP
the new SVP
MethodSystem.VoidSets the svp to the new value, clipping if necessary, and requesting repaint on what's changed.
the old SVP
the new SVP
a clip path
MethodSystem.Void
Queries the bounding box of a canvas item. The bounds are
returned in the coordinate system of the item's
parent.
Return value for the leftmost edge of the bounding box
Return value for the upper edge of the bounding box
Return value for the rightmost edge of the bounding box
Return value for the lower edge of the bounding box
MethodSystem.Void
Makes the item's affine transformation matrix be equal to
the specified matrix.
Return value for an affine transformation matrix.
MethodSystem.Void
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.
A canvas group.
MethodSystem.VoidGets the affine transform that converts from the item's coordinate system to world coordinates.
Return value for an affine transformation matrix
MethodSystem.VoidUngrabs the item, which must have been grabbed in the canvas, and ungrabs the mouse.
The timestamp for ungrabbing the mouse.
MethodSystem.VoidGets the affine transform that converts from item-relative coordinates to canvas pixel coordinates./
Return value for an affine transformation matrix (return value).MethodSystem.Void
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.
Number of steps to raise the item.
MethodSystem.VoidConverts a coordinate pair from item-relative coordinates to world coordinates.
X coordinate to convert (input/output value).
Y coordinate to convert (input/output value).
The parameters and
are used as both in and out parameters.
MethodSystem.Void
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.
Horizontal offset.
Vertical offset.
MethodSystem.VoidTo be used only by item implementations. Requests that the canvas queue an update for the specified item.MethodSystem.VoidResets the bounding box of a canvas item to an empty rectangle.MethodSystem.VoidDisposes the resources associated with the object.ConstructorInternal constructor
Pointer to the C object.
An instance of CanvasItem, wrapping the C object.This is an internal constructor, and should not be used by user code.ConstructorTo be addedTo be added: an object of type 'Gnome.CanvasItem'To be addedPropertySystem.UInt32The GLib Type for Gnome.CanvasItemThe GLib Type for the Gnome.CanvasItem class.PropertyGnome.CanvasTo be addedTo be added: an object of type 'Gnome.Canvas'To be addedPropertyGnome.CanvasItemThe parent item
the parent item
the parent itemEventGnomeSharp.CanvasEventHandler
Signals mouse button clicks, motion, enter/leave, and key
press events on canvas items. Use this to create user
interactive items. The x and y coordinates in the
field have been converted to canvas world coordinates.
ConstructorInternal constructor
GLib type for the type
Creates a new instance of CanvasItem, using the GLib-provided typeThis is a constructor used by derivative types of that would have their own GLib type assigned to it. This is not typically used by C# code.