Bonobo API Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#define BONOBO_CANVAS_COMPONENT_TYPE #define BONOBO_CANVAS_COMPONENT (o) #define BONOBO_CANVAS_COMPONENT_CLASS (k) #define BONOBO_IS_CANVAS_COMPONENT (o) #define BONOBO_IS_CANVAS_COMPONENT_CLASS(k) typedef BonoboCanvasComponent; typedef BonoboCanvasComponentClass; |
The BonoboCanvasComponent objects are used to wrap a GnomeCanvasItems
and export them to a container application. Typically the
Here is an example of how to export Gnome Canvas Items in a simple way.
Example 1. Wrapping a Gnome Canvas Item
/* * Here is where the GnomeCanvasItem (in this case an ellipse * is created and wrapped in a BonoboCanvasComponent. * * This function is invoked on demand on the embeddable * argument. Embeddables are the document model, and the * items returned are the views. */ BonoboCanvasComponent * my_item_creator (BonoboEmbeddable *embeddable, GnomeCanvas *canvas, void *data) { GnomeCanvasItem *item = gnome_canvas_item_new ( gnome_canvas_root (canvas), |
Applications that do not use the base
On the client side (the application that will embed this component) an object of the type BonoboCanvasItem is used.
#define BONOBO_CANVAS_COMPONENT_TYPE (bonobo_canvas_component_get_type ()) |
#define BONOBO_CANVAS_COMPONENT(o) (GTK_CHECK_CAST ((o), BONOBO_CANVAS_COMPONENT_TYPE, BonoboCanvasComponent)) |
o : |
#define BONOBO_CANVAS_COMPONENT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_CANVAS_COMPONENT__TYPE, BonoboCanvasComponentClass)) |
k : |
#define BONOBO_IS_CANVAS_COMPONENT(o) (GTK_CHECK_TYPE ((o), BONOBO_CANVAS_COMPONENT_TYPE)) |
o : |
#define BONOBO_IS_CANVAS_COMPONENT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_CANVAS_COMPONENT_TYPE)) |
k : |
typedef struct { BonoboObject base; BonoboCanvasComponentPrivate *priv; } BonoboCanvasComponent; |
typedef struct { BonoboObjectClass parent_class; /* * Signals */ void (*set_bounds) (BonoboCanvasComponent *component, Bonobo_Canvas_DRect *bbox, CORBA_Environment *ev); } BonoboCanvasComponentClass; |
|
object : | |
Returns : |
void bonobo_canvas_component_set_proxy (BonoboCanvasComponent *comp, |
comp : | |
proxy : |
BonoboCanvasComponent* bonobo_canvas_component_construct (BonoboCanvasComponent *comp, |
comp : | |
corba_canvas_comp : | |
item : | |
Returns : |
BonoboCanvasComponent* bonobo_canvas_component_new ( |
item : | |
Returns : |
|
comp : | |
Returns : |