![]() |
![]() |
![]() |
DiaCanvas2 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
DiaCanvasViewItemDiaCanvasViewItem — Object that contains the visual representation of a DiaCanvasItem. |
#define DIA_CANVAS_VIEW_ITEM (obj) struct DiaCanvasViewItem; gboolean dia_canvas_view_item_emit_event (DiaCanvasViewItem *item
,gpointer event
); void dia_canvas_view_item_request_redraw_uta (DiaCanvasViewItem *item
,ArtUta *uta
); void dia_canvas_view_item_add_items (GnomeCanvasGroup *vitem
,DiaCanvasItem *item
); gboolean dia_canvas_view_item_is_focused (DiaCanvasViewItem *item
); gboolean dia_canvas_view_item_is_selected (DiaCanvasViewItem *item
); gint (*DiaCanvasViewItemForeachFunc) (DiaCanvasViewItem *item
,gpointer data
); gint dia_canvas_view_item_foreach (DiaCanvasViewItem *item
,DiaCanvasViewItemForeachFunc func
,gpointer data
);
GObject +----GInitiallyUnowned +----GtkObject +----GnomeCanvasItem +----GnomeCanvasGroup +----DiaCanvasViewItem
#define DIA_CANVAS_VIEW_ITEM(obj) (GTK_CHECK_CAST ((obj), DIA_TYPE_CANVAS_VIEW_ITEM, DiaCanvasViewItem))
Cast an object to a DiaCanvasViewItem.
struct DiaCanvasViewItem;
A DiaCanvasViewItem holds information about a DiaCanvasItem that is specific for one view (e.g. a cursor position for text, an object is selected, rendering information).
Information about the DiaShapes that have to be rendered are held in "shapes". The shapes contain a list of DiaShapeItemInfo objects, which contain some DiaCanvasViewItem specific rendering data (like SVP's and scaled images).
gboolean dia_canvas_view_item_emit_event (DiaCanvasViewItem *item
,gpointer event
);
Send a DiaEvent to the DiaCanvasItem refered to by item
.
Returns : |
TRUE if the event is handled, FALSE otherwise. |
void dia_canvas_view_item_request_redraw_uta (DiaCanvasViewItem *item
,ArtUta *uta
);
Informs a canvas that the specified area, given as a microtile array, needs to be repainted. To be used only by item implementations.
The interface is the same as gnome_canvas_request_redraw_uta()
. This
function is also called to update the canvas' redraw area.
|
A canvas view item. |
|
Microtile array that specifies the area to be redrawn. It will be freed by this function, so the argument you pass will be invalid after you call this function. |
void dia_canvas_view_item_add_items (GnomeCanvasGroup *vitem
,DiaCanvasItem *item
);
Add an item to the DiaCanvasView's tree and connect some signals so it can automatically update itself when something changes
vitem
is of type GnomeCanvasGroup, since the real root item of the
DiaCanvasView is actually a GnomeCanvasGroup.
This function is used internally.
So, item
is added to the canvas and now we should create a new child
to vitem
in order to update the DiaCanvasView (GnomeCanvas).
gboolean dia_canvas_view_item_is_focused (DiaCanvasViewItem *item
);
Check if an item has the focus. If the real focus is held by a child object
of item
and the child has the DIA_COMPOSITE flag, TRUE is returned.
Returns : |
TRUE/FALSE. |
gboolean dia_canvas_view_item_is_selected (DiaCanvasViewItem *item
);
gint (*DiaCanvasViewItemForeachFunc) (DiaCanvasViewItem *item
,gpointer data
);
Prototype of the function used by dia_canvas_view_item_foreach()
.
gint dia_canvas_view_item_foreach (DiaCanvasViewItem *item
,DiaCanvasViewItemForeachFunc func
,gpointer data
);
Call func
for each canvas view item. If func
returns FALSE
, no more
items are called.