![]() | ![]() | ![]() | DiaCanvas2 Reference Manual | ![]() |
---|
DiaCanvasGroup — Holds a set of DiaCanvasItem's.
#define DIA_CANVAS_GROUP (obj) struct DiaCanvasGroup; DiaCanvasItem* dia_canvas_group_create_item (DiaCanvasGroup *group, GType type, const gchar *first_arg_name, ...); void dia_canvas_group_raise_item (DiaCanvasGroup *group, DiaCanvasItem *item, gint pos); void dia_canvas_group_lower_item (DiaCanvasGroup *group, DiaCanvasItem *item, gint pos); gint (*DiaCanvasItemForeachFunc) (DiaCanvasItem *item, gpointer data); gint dia_canvas_group_foreach (DiaCanvasItem *item, DiaCanvasItemForeachFunc func, gpointer data);
A DiaCanvasGroup is special in that it holds a set of DiaCanvasItem objects. It implements the DiaCanvasGroupable interface.
#define DIA_CANVAS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIA_TYPE_CANVAS_GROUP, DiaCanvasGroup))
obj : |
struct DiaCanvasGroup;
DiaCanvasGroup is a special kind of DiaCanvasItem that can hold other canvas items. It implements the DiaCanvasGroupable interface.
DiaCanvasItem* dia_canvas_group_create_item (DiaCanvasGroup *group, GType type, const gchar *first_arg_name, ...);
Create a new DiaCanvasItem of type
as a child of the group
.
You can add properties that have to be set on the newly created item. The
last value should be NULL
. Note that the property 'parent' has no effect.
group : | |
type : | |
first_arg_name : | |
... : | |
Returns : | The newly created canvas item. Note that this is a borrowed reference, you should reference it yourself if you want to keep a reference to the newly created item. |
void dia_canvas_group_raise_item (DiaCanvasGroup *group, DiaCanvasItem *item, gint pos);
Bring an object pos
positions to the front.
group : | |
item : | |
pos : |
void dia_canvas_group_lower_item (DiaCanvasGroup *group, DiaCanvasItem *item, gint pos);
Bring item
pos
position to the back.
group : | |
item : | |
pos : |
gint (*DiaCanvasItemForeachFunc) (DiaCanvasItem *item, gpointer data);
item : | |
data : | |
Returns : |
gint dia_canvas_group_foreach (DiaCanvasItem *item, DiaCanvasItemForeachFunc func, gpointer data);
Call the function func
for every child of item
. You can pass extra data
via the data
value.
item : | |
func : | |
data : | |
Returns : |
<< DiaCanvasItem | DiaShape >> |