![]() |
![]() |
![]() |
GtkDatabox Reference Manual | ![]() |
---|---|---|---|---|
#include <gtkdatabox_graph.h> GtkDataboxGraphPrivate; GtkDataboxGraph; GdkGC* gtk_databox_graph_get_gc (GtkDataboxGraph *graph); void gtk_databox_graph_set_gc (GtkDataboxGraph *graph, GdkGC *gc); void gtk_databox_graph_set_hide (GtkDataboxGraph *graph, gboolean hide); gboolean gtk_databox_graph_get_hide (GtkDataboxGraph *graph); void gtk_databox_graph_set_color (GtkDataboxGraph *graph, GdkColor *color); GdkColor* gtk_databox_graph_get_color (GtkDataboxGraph *graph); void gtk_databox_graph_set_size (GtkDataboxGraph *graph, gint size); gint gtk_databox_graph_get_size (GtkDataboxGraph *graph); gint gtk_databox_graph_calculate_extrema (GtkDataboxGraph *graph, gfloat *min_x, gfloat *max_x, gfloat *min_y, gfloat *max_y); void gtk_databox_graph_draw (GtkDataboxGraph *graph, GtkDatabox *box); GdkGC* gtk_databox_graph_create_gc (GtkDataboxGraph *graph, GtkDatabox *box);
"color" gpointer : Read / Write "hide" gboolean : Read / Write "size" gint : Read / Write
GtkDataboxGraphs can display data or other things in a GtkDatabox widget.
This class is just the basic interface. Other graph classes are derived from this class and implement some real things.
typedef struct _GtkDataboxGraphPrivate GtkDataboxGraphPrivate;
A private data structure used by the GtkDataboxGraph. It shields all internal things from developers who are just using the object.
typedef struct _GtkDataboxGraph GtkDataboxGraph;
The GtkDataboxGraph is the base class for all kinds of graphs (e.g. lines, points, decorations like coordinate crosses) to be shown in a GtkDatabox wiget.
Implemented by _GtkDataboxGraph
GdkGC* gtk_databox_graph_get_gc (GtkDataboxGraph *graph);
Gets the current graphics context of the graph.
|
A GtkDataboxGraph object |
Returns : |
The current graphics context of the graph. |
void gtk_databox_graph_set_gc (GtkDataboxGraph *graph, GdkGC *gc);
Sets the graphics context which the GtkDataboxGraph object is supposed to be using when drawing itself.
|
A GtkDataboxGraph object |
|
Graphics contex for the graph object |
void gtk_databox_graph_set_hide (GtkDataboxGraph *graph, gboolean hide);
Hidden graphs are not shown, when the GtkDatabox containing them is redrawn.
|
A GtkDataboxGraph object |
|
Declares whether should be hidden (true) or not (false). |
gboolean gtk_databox_graph_get_hide (GtkDataboxGraph *graph);
Gets the current "hide" status.
|
A GtkDataboxGraph object |
Returns : |
Whether the graph is hidden (true) or not (false). |
void gtk_databox_graph_set_color (GtkDataboxGraph *graph, GdkColor *color);
Sets the color which the GtkDataboxGraph object is supposed to be using when drawing itself.
|
A GtkDataboxGraph object |
|
Color which is to be used by the graph object |
GdkColor* gtk_databox_graph_get_color (GtkDataboxGraph *graph);
Gets the current color of the graph elements (e.g. points).
|
A GtkDataboxGraph object |
Returns : |
The color of the graph. |
void gtk_databox_graph_set_size (GtkDataboxGraph *graph, gint size);
Sets the size (e.g. line width) which the GtkDataboxGraph object is supposed to be using when drawing itself.
|
A GtkDataboxGraph object |
|
Size of graph elements for the graph object |
gint gtk_databox_graph_get_size (GtkDataboxGraph *graph);
Gets the size of the graph elements (e.g. the line width).
|
A GtkDataboxGraph object |
Returns : |
size of the graph elements |
gint gtk_databox_graph_calculate_extrema (GtkDataboxGraph *graph, gfloat *min_x, gfloat *max_x, gfloat *min_y, gfloat *max_y);
Virtual function which determines the minimum and maximum x and y values of the values of this GtkDataboxGraph object if applicable (there are graphs which do not contain data).
|
A GtkDataboxGraph object |
|
Will be filled with the lowest x value of the dataset |
|
Will be filled with the highest x value of the dataset |
|
Will be filled with the lowest y value of the dataset |
|
Will be filled with the highest y value of the dataset |
Returns : |
0 on success, -1 if no data is available, |
void gtk_databox_graph_draw (GtkDataboxGraph *graph, GtkDatabox *box);
Virtual function which draws the GtkDataboxGraph on the drawing area of the GtkDatabox object.
Typically this function is called by GtkDatabox objects.
|
A GtkDataboxGraph object |
|
A GtkDatabox object |
GdkGC* gtk_databox_graph_create_gc (GtkDataboxGraph *graph, GtkDatabox *box);
Virtual function which creates a graphics context for the graph
.
Typically called by derived graph objects when the graphics context is needed for the first time.
|
A GtkDataboxGraph object |
|
A GtkDatabox object |
Returns : |
The new graphics context. |