|  |  |  | Goffice Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
GOComponent; GOComponentClass; GOComponent * go_component_new_by_mime_type (char const *mime_type); void go_component_set_default_size (GOComponent *component,double width,double ascent,double descent); gboolean go_component_needs_window (GOComponent *component); void go_component_set_window (GOComponent *component,GdkWindow *window); void go_component_set_data (GOComponent *component,char const *data,int length); gboolean go_component_get_data (GOComponent *component,gpointer *data,int *length,GDestroyNotify *clearfunc,gpointer *user_data); void go_component_set_size (GOComponent *component,double width,double height); gboolean go_component_is_resizable (GOComponent *component); gboolean go_component_is_editable (GOComponent *component); GtkWindow* go_component_edit (GOComponent *component); void go_component_emit_changed (GOComponent *component); void go_component_set_command_context (GOCmdContext *cc); GOCmdContext * go_component_get_command_context (void); void go_component_render (GOComponent *component,cairo_t *cr,double width,double height);
"ascent" gdouble : Read / Write "descent" gdouble : Read / Write "height" gdouble : Read "mime-type" gchar* : Read / Write "width" gdouble : Read / Write
typedef struct {
	GObjectClass parent_class;
	GtkWindow* (*edit) (GOComponent *component);
	gboolean (*get_data) (GOComponent *component, gpointer *data, int *length,
			      GDestroyNotify *clearfunc, gpointer *user_data);
	void (*mime_type_set) (GOComponent* component);
	void (*set_data) (GOComponent *component);
	void (*set_default_size) (GOComponent* component);
	void (*set_size) (GOComponent *component);
	void (*set_window) (GOComponent *component);
	void (*render) (GOComponent *component, cairo_t *cr,
			    double width, double height);
	/* signals */
	void (*changed) (GOComponent* component);
} GOComponentClass;
The component base object class.
| GObjectClass  | the parent object class. | 
| callback for component edition. | |
| returns the data embedded in the component. | |
| sets the mime type. | |
| sets the data embedded in the component. | |
| sets the default size for the component. | |
| sets the requested size. | |
| sets the window if the component uses a GdkWindow. The new
window is stored in the windowfield of GOComponent. | |
| displays the contents. | |
| callback called when the component contents changed. | 
GOComponent *       go_component_new_by_mime_type       (char const *mime_type);
| 
 | |
| Returns : | 
void go_component_set_default_size (GOComponent *component,double width,double ascent,double descent);
| 
 | |
| 
 | |
| 
 | |
| 
 | 
gboolean            go_component_needs_window           (GOComponent *component);
| 
 | GOComponent | 
| Returns : | TRUE if the component uses its own GtkWindow. | 
void go_component_set_window (GOComponent *component,GdkWindow *window);
| 
 | |
| 
 | 
void go_component_set_data (GOComponent *component,char const *data,int length);
| 
 | |
| 
 | |
| 
 | 
gboolean go_component_get_data (GOComponent *component,gpointer *data,int *length,GDestroyNotify *clearfunc,gpointer *user_data);
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
void go_component_set_size (GOComponent *component,double width,double height);
| 
 | |
| 
 | |
| 
 | 
gboolean            go_component_is_resizable           (GOComponent *component);
| 
 | |
| Returns : | 
gboolean            go_component_is_editable            (GOComponent *component);
| 
 | |
| Returns : | 
GOCmdContext *      go_component_get_command_context    (void);
| Returns : | 
void go_component_render (GOComponent *component,cairo_t *cr,double width,double height);
| 
 | |
| 
 | |
| 
 | |
| 
 | 
"ascent" property"ascent" gdouble : Read / Write
Component ascent.
Allowed values: >= 0
Default value: 0
"descent" property"descent" gdouble : Read / Write
Component descent.
Allowed values: >= 0
Default value: 0
"height" property"height" gdouble : Read
Component height.
Allowed values: >= 0
Default value: 0
"mime-type" property"mime-type" gchar* : Read / Write
mime type of the content of the component.
Default value: NULL
"width" property"width" gdouble : Read / Write
Component width.
Allowed values: >= 0
Default value: 0
"changed" signalvoid user_function (GOComponent *gocomponent, gpointer user_data) : Run Last
| 
 | the object which received the signal. | 
| 
 | user data set when the signal handler was connected. |