Top | ![]() |
![]() |
![]() |
![]() |
Functions
Functions
GOComponentSaxHandler ()
void (*GOComponentSaxHandler) (GOComponent *component
,gpointer user_data
);
go_component_duplicate ()
GOComponent *
go_component_duplicate (GOComponent const *component
);
Duplicates the component.
go_component_edit ()
GtkWindow *
go_component_edit (GOComponent *component
);
Opens a top level window editor for the component if it can be edited.
go_component_export_image ()
gboolean go_component_export_image (GOComponent *component
,GOImageFormat format
,GsfOutput *output
,double x_dpi
,double y_dpi
);
Exports an image of graph
in given format
, writing results in a GsfOutput stream.
If export format type is a bitmap one, it computes image size with x_dpi, y_dpi and
graph
size (see
).gog_graph_get_size()
Parameters
component |
||
format |
image format for export |
|
output |
a GsfOutput stream |
|
x_dpi |
x resolution of exported graph |
|
y_dpi |
y resolution of exported graph |
go_component_get_command_context ()
GOCmdContext *
go_component_get_command_context (GOComponent *component
);
go_component_get_data ()
gboolean go_component_get_data (GOComponent *component
,gpointer *data
,int *length
,GDestroyNotify *clearfunc
,gpointer *user_data
);
go_component_get_inline ()
gboolean
go_component_get_inline (GOComponent *component
);
Returns the in-line or not nature of the component.
go_component_get_size ()
void go_component_get_size (GOComponent *component
,double *width
,double *height
);
go_component_get_snapshot ()
void const * go_component_get_snapshot (GOComponent *component
,GOSnapshotType *type
,size_t *length
);
Returns a snapshot is either svg or png format for the component.
go_component_get_use_font_from_app ()
gboolean
go_component_get_use_font_from_app (GOComponent *component
);
Returns whether the component should use the font from the calling application or use its own font.
go_component_new_by_mime_type ()
GOComponent *
go_component_new_by_mime_type (char const *mime_type
);
go_component_render ()
void go_component_render (GOComponent *component
,cairo_t *cr
,double width
,double height
);
go_component_sax_push_parser ()
void go_component_sax_push_parser (GsfXMLIn *xin
,xmlChar const **attrs
,GOComponentSaxHandler handler
,gpointer user_data
);
Loads the component from the xml stream. handler
will be called when done.
go_component_set_command_context ()
void go_component_set_command_context (GOComponent *component
,GOCmdContext *cc
);
go_component_set_data ()
void go_component_set_data (GOComponent *component
,char const *data
,int length
);
go_component_set_default_command_context ()
void
go_component_set_default_command_context
(GOCmdContext *cc
);
go_component_set_default_size ()
void go_component_set_default_size (GOComponent *component
,double width
,double ascent
,double descent
);
go_component_set_font ()
gboolean go_component_set_font (GOComponent *component
,PangoFontDescription const *desc
);
Sets the font the component should use. Not all components will actually changed the font they use.
go_component_set_inline ()
void go_component_set_inline (GOComponent *component
,gboolean is_inline
);
Sets the in-line or not nature of the component. Default is FALSE
.
go_component_set_size ()
void go_component_set_size (GOComponent *component
,double width
,double height
);
go_component_set_window ()
void go_component_set_window (GOComponent *component
,GdkWindow *window
);
go_component_set_use_font_from_app ()
void go_component_set_use_font_from_app (GOComponent *component
,gboolean use_font_from_app
);
Sets the source of the font that the component should use. Default is FALSE
.
go_component_write_xml_sax ()
void go_component_write_xml_sax (GOComponent *component
,GsfXMLOut *output
);
Types and Values
GOComponentClass
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 (*render) (GOComponent *component, cairo_t *cr, double width, double height); gboolean (*set_font) (GOComponent *component, PangoFontDescription const *desc); } GOComponentClass;
The component base object class.
Property Details
The “ascent”
property
“ascent” gdouble
Component ascent.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
The “descent”
property
“descent” gdouble
Component descent.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
The “height”
property
“height” gdouble
Component height.
Flags: Read
Allowed values: >= 0
Default value: 0
The “inline”
property
“inline” gboolean
Whether the component should be displayed in-line.
Flags: Read / Write
Default value: FALSE
The “mime-type”
property
“mime-type” gchar *
mime type of the content of the component.
Flags: Read / Write / Construct Only
Default value: NULL
Signal Details
The “changed”
signal
void user_function (GOComponent *gocomponent, gpointer user_data)
Parameters
gocomponent |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last