Top | ![]() |
![]() |
![]() |
![]() |
Functions
GogGraph * | gog_graph_dup () |
gboolean | gog_graph_export_image () |
void | gog_graph_force_update () |
GSList * | gog_graph_get_data () |
GODoc * | gog_graph_get_document () |
void | gog_graph_get_size () |
GSList * | gog_graph_get_supported_image_formats () |
GogTheme * | gog_graph_get_theme () |
unsigned | gog_graph_num_cols () |
unsigned | gog_graph_num_rows () |
gboolean | gog_graph_request_update () |
GOData * | gog_graph_ref_data () |
void | gog_graph_render_to_cairo () |
void | gog_graph_set_size () |
void | gog_graph_set_theme () |
void | gog_graph_unref_data () |
gboolean | gog_graph_validate_chart_layout () |
GogView * | gog_graph_view_get_selection () |
void | gog_graph_view_handle_event () |
void | gog_graph_view_set_selection () |
Properties
GODoc * | document | Read / Write |
gdouble | height-pts | Read / Write |
GogTheme * | theme | Read / Write |
gchar * | theme-name | Read / Write |
gdouble | width-pts | Read / Write |
GogRenderer * | renderer | Write |
Object Hierarchy
GObject ├── GogObject │ ╰── GogStyledObject │ ╰── GogOutlinedObject │ ╰── GogGraph ╰── GogView ╰── GogOutlinedView ╰── GogGraphView
Description
A graph (in the abstract sense) in GOffice is an hierarical object model, with a GogGraph object as the top-level object. Objects that can be part of a graph is a subclass of GogObject. Those, and related objects have the prefix "Gog" in the class name. See GogObject for how to manipulate the object model, and the individual classes for specifics.
A GogGraph can have 1 or more children in the roles "Chart" and "Title".
Functions
gog_graph_export_image ()
gboolean gog_graph_export_image (GogGraph *graph
,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()
gog_graph_force_update ()
void
gog_graph_force_update (GogGraph *graph
);
Do an update now if one has been queued.
gog_graph_get_document ()
GODoc *
gog_graph_get_document (GogGraph *graph
);
Retrieves the GODoc for graph
.
gog_graph_get_size ()
void gog_graph_get_size (GogGraph *graph
,double *width
,double *height
);
FIXME Returns the logical size of graph, in points.
gog_graph_get_supported_image_formats ()
GSList *
gog_graph_get_supported_image_formats (void
);
Builds a list of supported formats for image export.
gog_graph_request_update ()
gboolean
gog_graph_request_update (GogGraph *graph
);
queue an update if one had not already be queued.
gog_graph_ref_data ()
GOData * gog_graph_ref_data (GogGraph *graph
,GOData *dat
);
Returns
dat
or something equivalent to it that already exists in the graph.
Otherwise use dat
. Adds a gobject ref to the target and increments a
count of the number of refs made from this GogGraph.
[transfer full]
gog_graph_render_to_cairo ()
void gog_graph_render_to_cairo (GogGraph *graph
,cairo_t *cairo
,double w
,double h
);
Renders a graph using cairo
. w
and h
are the requested width an height of the rendered graph, in the current cairo
coordinate space. This function is not suited for multiple rendering of the same graph. gog_renderer_render_to cairo or gog_renderer_update/gog_renderer_get_cairo_surface should be used instead.
gog_graph_set_size ()
void gog_graph_set_size (GogGraph *graph
,double width
,double height
);
Sets the logical size of graph, given in points.
gog_graph_validate_chart_layout ()
gboolean
gog_graph_validate_chart_layout (GogGraph *graph
);
Check the layout of the chart grid and ensure that there are no empty cols or rows, and resize as necessary
gog_graph_view_handle_event ()
void gog_graph_view_handle_event (GogGraphView *gview
,GdkEvent *event
,double x_offset
,double y_offset
);
Handle events.
gog_graph_view_set_selection ()
void gog_graph_view_set_selection (GogGraphView *gview
,GogObject *gobj
);
Sets gobj
as current selection. If gobj
is different from previously
selected object, a selection-changed signal is emitted.
Types and Values
GogGraphClass
typedef struct { GogOutlinedObjectClass base; /* signals */ void (*add_data) (GogGraph *graph, GOData *input); void (*remove_data) (GogGraph *graph, GOData *input); } GogGraphClass;
Property Details
The “height-pts”
property
“height-pts” gdouble
Logical graph height, in points.
Flags: Read / Write
Allowed values: >= 0
Default value: 226.772
The “theme-name”
property
“theme-name” gchar *
The name of the theme for elements of the graph.
Flags: Read / Write
Default value: "default"
The “width-pts”
property
“width-pts” gdouble
Logical graph width, in points.
Flags: Read / Write
Allowed values: >= 0
Default value: 340.157
Signal Details
The “add-data”
signal
void user_function (GogGraph *graph, GObject *data, gpointer user_data)
The ::add-data signal is emitted BEFORE data
has been added.
Parameters
graph |
the object on which the signal is emitted |
|
data |
The new GOData being added to |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
The “remove-data”
signal
void user_function (GogGraph *graph, GObject *data, gpointer user_data)
The ::remove-data signal is emitted BEFORE data
has been removed.
Parameters
graph |
the object on which the signal is emitted |
|
data |
The new GOData being removed to |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
The “selection-changed”
signal
void user_function (GogGraphView *goggraphview, GObject *arg1, gpointer user_data)
Parameters
goggraphview |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last