gtkdatabox  1.0.0
About: GtkDatabox is a Gtk+-widget for live display of large amounts of fluctuating numerical data.
  Fossies Dox: gtkdatabox-1.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gtkdatabox_graph.h File Reference
#include <gdk/gdk.h>
#include <pango/pango.h>
#include <gtkdatabox.h>
Include dependency graph for gtkdatabox_graph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _GtkDataboxGraphClass
 
struct  _GtkDataboxGraph
 

Macros

#define GTK_DATABOX_TYPE_GRAPH   (gtk_databox_graph_get_type ())
 
#define GTK_DATABOX_GRAPH(obj)
 
#define GTK_DATABOX_GRAPH_CLASS(klass)
 
#define GTK_DATABOX_IS_GRAPH(obj)
 
#define GTK_DATABOX_IS_GRAPH_CLASS(klass)
 
#define GTK_DATABOX_GRAPH_GET_CLASS(obj)
 

Typedefs

typedef struct _GtkDataboxGraphClass GtkDataboxGraphClass
 

Functions

GType gtk_databox_graph_get_type (void)
 
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, GdkRGBA *color)
 
GdkRGBA * gtk_databox_graph_get_color (GtkDataboxGraph *graph)
 
void gtk_databox_graph_set_rgba (GtkDataboxGraph *graph, GdkRGBA *rgba)
 
GdkRGBA * gtk_databox_graph_get_rgba (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)
 
cairo_t * gtk_databox_graph_create_gc (GtkDataboxGraph *graph, GtkDatabox *box)
 

Macro Definition Documentation

◆ GTK_DATABOX_GRAPH

#define GTK_DATABOX_GRAPH (   obj)
Value:
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
#define GTK_DATABOX_TYPE_GRAPH

Definition at line 43 of file gtkdatabox_graph.h.

◆ GTK_DATABOX_GRAPH_CLASS

#define GTK_DATABOX_GRAPH_CLASS (   klass)
Value:
(G_TYPE_CHECK_CLASS_CAST ((klass), \

Definition at line 46 of file gtkdatabox_graph.h.

◆ GTK_DATABOX_GRAPH_GET_CLASS

#define GTK_DATABOX_GRAPH_GET_CLASS (   obj)
Value:
(G_TYPE_INSTANCE_GET_CLASS ((obj), \

Definition at line 53 of file gtkdatabox_graph.h.

◆ GTK_DATABOX_IS_GRAPH

#define GTK_DATABOX_IS_GRAPH (   obj)
Value:
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \

Definition at line 49 of file gtkdatabox_graph.h.

◆ GTK_DATABOX_IS_GRAPH_CLASS

#define GTK_DATABOX_IS_GRAPH_CLASS (   klass)
Value:
(G_TYPE_CHECK_CLASS_TYPE ((klass), \

Definition at line 51 of file gtkdatabox_graph.h.

◆ GTK_DATABOX_TYPE_GRAPH

#define GTK_DATABOX_TYPE_GRAPH   (gtk_databox_graph_get_type ())

SECTION:gtkdatabox_graph @short_description: An abstract anchestor for all "real" graphs. gtkdatabox_graph.h @see_also: GtkDatabox, GtkDataboxPoints, GtkDataboxLines, GtkDataboxBars, GtkDataboxGrid, GtkDataboxCrossSimple

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.

Definition at line 42 of file gtkdatabox_graph.h.

Typedef Documentation

◆ GtkDataboxGraphClass

GtkDataboxGraphClass

The object class of GtkDataboxGraph.

Definition at line 41 of file gtkdatabox_graph.h.

Function Documentation

◆ gtk_databox_graph_calculate_extrema()

gint gtk_databox_graph_calculate_extrema ( GtkDataboxGraph graph,
gfloat *  min_x,
gfloat *  max_x,
gfloat *  min_y,
gfloat *  max_y 
)

gtk_databox_graph_calculate_extrema: @graph: A GtkDataboxGraph object @min_x: Will be filled with the lowest x value of the dataset @max_x: Will be filled with the highest x value of the dataset @min_y: Will be filled with the lowest y value of the dataset @max_y: Will be filled with the highest y value of the dataset

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).

Return value: 0 on success, -1 if no data is available,

Definition at line 232 of file gtkdatabox_graph.c.

References GTK_DATABOX_GRAPH_GET_CLASS.

Referenced by gtk_databox_calculate_extrema().

◆ gtk_databox_graph_create_gc()

cairo_t* gtk_databox_graph_create_gc ( GtkDataboxGraph graph,
GtkDatabox box 
)

gtk_databox_graph_create_gc: @graph: A GtkDataboxGraph object @box: A GtkDatabox object

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.

Return value: The new graphics context.

Definition at line 135 of file gtkdatabox_graph.c.

References GTK_DATABOX_GRAPH_GET_CLASS.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_grid_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_offset_bars_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_regions_real_draw().

◆ gtk_databox_graph_draw()

void gtk_databox_graph_draw ( GtkDataboxGraph graph,
GtkDatabox box 
)

gtk_databox_graph_draw: @graph: A GtkDataboxGraph object @box: A GtkDatabox object

Virtual function which draws the GtkDataboxGraph on the drawing area of the GtkDatabox object.

Typically this function is called by GtkDatabox objects.

Definition at line 208 of file gtkdatabox_graph.c.

References GTK_DATABOX_GRAPH_GET_CLASS, and _GtkDataboxGraphPrivate::hide.

Referenced by gtk_databox_draw().

◆ gtk_databox_graph_get_color()

GdkRGBA* gtk_databox_graph_get_color ( GtkDataboxGraph graph)

gtk_databox_graph_get_color: @graph: A GtkDataboxGraph object

Gets the current color of the graph elements (e.g. points).

Return value: The color of the graph.

Definition at line 299 of file gtkdatabox_graph.c.

References _GtkDataboxGraphPrivate::color.

Referenced by gtk_databox_graph_get_property().

◆ gtk_databox_graph_get_hide()

gboolean gtk_databox_graph_get_hide ( GtkDataboxGraph graph)

gtk_databox_graph_get_hide: @graph: A GtkDataboxGraph object

Gets the current "hide" status.

Return value: Whether the graph is hidden (true) or not (false).

Definition at line 368 of file gtkdatabox_graph.c.

References GTK_DATABOX_IS_GRAPH, and _GtkDataboxGraphPrivate::hide.

Referenced by gtk_databox_graph_get_property().

◆ gtk_databox_graph_get_rgba()

GdkRGBA* gtk_databox_graph_get_rgba ( GtkDataboxGraph graph)

◆ gtk_databox_graph_get_size()

gint gtk_databox_graph_get_size ( GtkDataboxGraph graph)

gtk_databox_graph_get_size: @graph: A GtkDataboxGraph object

Gets the size of the graph elements (e.g. the line width).

Return value: size of the graph elements

Definition at line 333 of file gtkdatabox_graph.c.

References GTK_DATABOX_IS_GRAPH, and _GtkDataboxGraphPrivate::size.

Referenced by gtk_databox_graph_get_property(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), and gtk_databox_points_real_draw().

◆ gtk_databox_graph_get_type()

GType gtk_databox_graph_get_type ( void  )

◆ gtk_databox_graph_set_color()

void gtk_databox_graph_set_color ( GtkDataboxGraph graph,
GdkRGBA *  color 
)

gtk_databox_graph_set_color: @graph: A GtkDataboxGraph object @color: Color which is to be used by the graph object

Sets the color which the GtkDataboxGraph object is supposed to be using when drawing itself.

Definition at line 278 of file gtkdatabox_graph.c.

References _GtkDataboxGraphPrivate::color, and GTK_DATABOX_IS_GRAPH.

Referenced by G_DEFINE_TYPE_WITH_PRIVATE().

◆ gtk_databox_graph_set_hide()

void gtk_databox_graph_set_hide ( GtkDataboxGraph graph,
gboolean  hide 
)

gtk_databox_graph_set_hide: @graph: A GtkDataboxGraph object @hide: Declares whether should be hidden (true) or not (false).

Hidden graphs are not shown, when the GtkDatabox containing them is redrawn.

Definition at line 349 of file gtkdatabox_graph.c.

References GTK_DATABOX_IS_GRAPH, and _GtkDataboxGraphPrivate::hide.

Referenced by G_DEFINE_TYPE_WITH_PRIVATE().

◆ gtk_databox_graph_set_rgba()

void gtk_databox_graph_set_rgba ( GtkDataboxGraph graph,
GdkRGBA *  rgba 
)

◆ gtk_databox_graph_set_size()

void gtk_databox_graph_set_size ( GtkDataboxGraph graph,
gint  size 
)

gtk_databox_graph_set_size: @graph: A GtkDataboxGraph object @size: Size of graph elements for the graph object

Sets the size (e.g. line width) which the GtkDataboxGraph object is supposed to be using when drawing itself.

Definition at line 314 of file gtkdatabox_graph.c.

References GTK_DATABOX_IS_GRAPH, and _GtkDataboxGraphPrivate::size.

Referenced by G_DEFINE_TYPE_WITH_PRIVATE().