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_xyc_graph.c File Reference
Include dependency graph for gtkdatabox_xyc_graph.c:

Go to the source code of this file.

Data Structures

struct  _GtkDataboxXYCGraphPrivate
 

Typedefs

typedef struct _GtkDataboxXYCGraphPrivate GtkDataboxXYCGraphPrivate
 

Enumerations

enum  {
  PROP_X = 1 , PROP_Y , PROP_LEN , PROP_MAXLEN ,
  PROP_XSTART , PROP_YSTART , PROP_XSTRIDE , PROP_YSTRIDE ,
  PROP_XTYPE , PROP_YTYPE
}
 

Functions

static gint gtk_databox_xyc_graph_real_calculate_extrema (GtkDataboxGraph *xyc_graph, gfloat *min_x, gfloat *max_x, gfloat *min_y, gfloat *max_y)
 
 G_DEFINE_TYPE_WITH_PRIVATE (GtkDataboxXYCGraph, gtk_databox_xyc_graph, GTK_DATABOX_TYPE_GRAPH)
 
static void gtk_databox_xyc_graph_set_X (GtkDataboxXYCGraph *xyc_graph, gfloat *X)
 
static void gtk_databox_xyc_graph_set_Y (GtkDataboxXYCGraph *xyc_graph, gfloat *Y)
 
static void gtk_databox_xyc_graph_set_length (GtkDataboxXYCGraph *xyc_graph, guint len)
 
static void gtk_databox_xyc_graph_set_maxlen (GtkDataboxXYCGraph *xyc_graph, guint maxlen)
 
static void gtk_databox_xyc_graph_set_xstart (GtkDataboxXYCGraph *xyc_graph, guint xstart)
 
static void gtk_databox_xyc_graph_set_ystart (GtkDataboxXYCGraph *xyc_graph, guint ystart)
 
static void gtk_databox_xyc_graph_set_xstride (GtkDataboxXYCGraph *xyc_graph, guint xstride)
 
static void gtk_databox_xyc_graph_set_ystride (GtkDataboxXYCGraph *xyc_graph, guint ystride)
 
static void gtk_databox_xyc_graph_set_xtype (GtkDataboxXYCGraph *xyc_graph, GType xtype)
 
static void gtk_databox_xyc_graph_set_ytype (GtkDataboxXYCGraph *xyc_graph, GType ytype)
 
static void gtk_databox_xyc_graph_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
 
gfloat * gtk_databox_xyc_graph_get_X (GtkDataboxXYCGraph *xyc_graph)
 
gfloat * gtk_databox_xyc_graph_get_Y (GtkDataboxXYCGraph *xyc_graph)
 
guint gtk_databox_xyc_graph_get_length (GtkDataboxXYCGraph *xyc_graph)
 
guint gtk_databox_xyc_graph_get_maxlen (GtkDataboxXYCGraph *xyc_graph)
 
guint gtk_databox_xyc_graph_get_xstart (GtkDataboxXYCGraph *xyc_graph)
 
guint gtk_databox_xyc_graph_get_ystart (GtkDataboxXYCGraph *xyc_graph)
 
guint gtk_databox_xyc_graph_get_xstride (GtkDataboxXYCGraph *xyc_graph)
 
guint gtk_databox_xyc_graph_get_ystride (GtkDataboxXYCGraph *xyc_graph)
 
GType gtk_databox_xyc_graph_get_xtype (GtkDataboxXYCGraph *xyc_graph)
 
GType gtk_databox_xyc_graph_get_ytype (GtkDataboxXYCGraph *xyc_graph)
 
static void gtk_databox_xyc_graph_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
 
static void gtk_databox_xyc_graph_class_init (GtkDataboxXYCGraphClass *klass)
 
static void gtk_databox_xyc_graph_init (GtkDataboxXYCGraph *xyc_graph)
 

Typedef Documentation

◆ GtkDataboxXYCGraphPrivate

GtkDataboxXYCGraphPrivate

A private data structure used by the GtkDataboxXYCGraph. It shields all internal things from developers who are just using the object.

Definition at line 22 of file gtkdatabox_xyc_graph.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROP_X 
PROP_Y 
PROP_LEN 
PROP_MAXLEN 
PROP_XSTART 
PROP_YSTART 
PROP_XSTRIDE 
PROP_YSTRIDE 
PROP_XTYPE 
PROP_YTYPE 

Definition at line 30 of file gtkdatabox_xyc_graph.c.

Function Documentation

◆ G_DEFINE_TYPE_WITH_PRIVATE()

G_DEFINE_TYPE_WITH_PRIVATE ( GtkDataboxXYCGraph  ,
gtk_databox_xyc_graph  ,
GTK_DATABOX_TYPE_GRAPH   
)

◆ gtk_databox_xyc_graph_class_init()

◆ gtk_databox_xyc_graph_get_length()

guint gtk_databox_xyc_graph_get_length ( GtkDataboxXYCGraph xyc_graph)

◆ gtk_databox_xyc_graph_get_maxlen()

guint gtk_databox_xyc_graph_get_maxlen ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_maxlen: @xyc_graph: A GtkDataboxXYCGraph object

Gets the the maxlen of the X and Y values arrays.

Return value: Size of X/Y arrays.

Definition at line 290 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::maxlen.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_property()

◆ gtk_databox_xyc_graph_get_X()

gfloat* gtk_databox_xyc_graph_get_X ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_X: @xyc_graph: A GtkDataboxXYCGraph object

Gets the X values of the @xzc_graph.

Return value: Pointer to X values

Definition at line 242 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::X.

Referenced by G_DEFINE_TYPE(), gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_xstart()

guint gtk_databox_xyc_graph_get_xstart ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_xstart: @xyc_graph: A GtkDataboxXYCGraph object

Gets the the start offset of the X values array. This is the element in the array pointed to by X that will be the first element plotted. If X is a pointer to a gfloat array, and xstart is 5, then x[5] will be the first data element. If Xstride is 1, then x[6] will be the second element. x[5 + len - 1] will be last element. Usually, xstart will be 0. It can be nonzero to allow for interleaved X/Y samples, or if the data is stored as a matrix, then X can point to the start of the matrix, xstart can be the column number, and xstride the number of columns.

Return value: The xstart value.

Definition at line 310 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::xstart.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_xstride()

guint gtk_databox_xyc_graph_get_xstride ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_xstride: @xyc_graph: A GtkDataboxXYCGraph object

Gets the the stride offset of the X values array. This is the element in the array pointed to by X that will be the first element plotted. If X is a pointer to a gfloat array, and xstart is 5, then x[5] will be the first data element. If Xstride is 1, then x[6] will be the second element. x[5 + len - 1] will be last element. Usually, xstride will be 1. It can be nonzero to allow for interleaved X/Y samples, or if the data is stored as a matrix, then X can point to the start of the matrix, xstart can be the column number, and xstride the number of columns.

Return value: The xstride value.

Definition at line 350 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::xstride.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_xtype()

GType gtk_databox_xyc_graph_get_xtype ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_xtype: @xyc_graph: A GtkDataboxXYCGraph object

Gets the the GType of the X array elements. This may be G_TYPE_FLOAT, G_TYPE_DOUBLE, or similar.

Return value: A GType, usually this is G_TYPE_FLOAT.

Definition at line 386 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::xtype.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_Y()

gfloat* gtk_databox_xyc_graph_get_Y ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_Y: @xyc_graph: A GtkDataboxXYCGraph object

Gets the Y values of the @xzc_graph.

Return value: Pointer to Y values

Definition at line 258 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::Y.

Referenced by G_DEFINE_TYPE(), gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_ystart()

guint gtk_databox_xyc_graph_get_ystart ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_ystart: @xyc_graph: A GtkDataboxXYCGraph object

Gets the the start offset of the Y values array. This is the element in the array pointed to by Y that will be the first element plotted. If Y is a pointer to a gfloat array, and ystart is 5, then y[5] will be the first data element. If Ystride is 1, then y[6] will be the second element. y[5 + len - 1] will be last element. Usually, ystart will be 0. It can be nonzero to allow for interleaved X/Y samples, or if the data is stored as a matrix, then Y can point to the start of the matrix, ystart can be the column number, and ystride the number of columns.

Return value: The ystart value.

Definition at line 330 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::ystart.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_ystride()

guint gtk_databox_xyc_graph_get_ystride ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_ystride: @xyc_graph: A GtkDataboxXYCGraph object

Gets the the stride offset of the Y values array. This is the element in the array pointed to by Y that will be the first element plotted. If Y is a pointer to a gfloat array, and ystart is 5, then y[5] will be the first data element. If Ystride is 1, then y[6] will be the second element. y[5 + len - 1] will be last element. Usually, ystride will be 1. It can be nonzero to allow for interleaved X/Y samples, or if the data is stored as a matrix, then Y can point to the start of the matrix, ystart can be the column number, and ystride the number of columns.

Return value: The ystride value.

Definition at line 370 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::ystride.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_get_ytype()

GType gtk_databox_xyc_graph_get_ytype ( GtkDataboxXYCGraph xyc_graph)

gtk_databox_xyc_graph_get_ytype: @xyc_graph: A GtkDataboxXYCGraph object

Gets the the GType of the Y array elements. This may be G_TYPE_FLOAT, G_TYPE_DOUBLE, or similar.

Return value: A GType, usually this is G_TYPE_FLOAT.

Definition at line 402 of file gtkdatabox_xyc_graph.c.

References GTK_DATABOX_IS_XYC_GRAPH, and _GtkDataboxXYCGraphPrivate::ytype.

Referenced by gtk_databox_bars_real_draw(), gtk_databox_lines_real_draw(), gtk_databox_markers_real_draw(), gtk_databox_points_real_draw(), and gtk_databox_xyc_graph_get_property().

◆ gtk_databox_xyc_graph_init()

static void gtk_databox_xyc_graph_init ( GtkDataboxXYCGraph xyc_graph)
static

Definition at line 537 of file gtkdatabox_xyc_graph.c.

◆ gtk_databox_xyc_graph_real_calculate_extrema()

◆ gtk_databox_xyc_graph_set_length()

static void gtk_databox_xyc_graph_set_length ( GtkDataboxXYCGraph xyc_graph,
guint  len 
)
static

◆ gtk_databox_xyc_graph_set_maxlen()

static void gtk_databox_xyc_graph_set_maxlen ( GtkDataboxXYCGraph xyc_graph,
guint  maxlen 
)
static

◆ gtk_databox_xyc_graph_set_property()

◆ gtk_databox_xyc_graph_set_X()

static void gtk_databox_xyc_graph_set_X ( GtkDataboxXYCGraph xyc_graph,
gfloat *  X 
)
static

◆ gtk_databox_xyc_graph_set_xstart()

static void gtk_databox_xyc_graph_set_xstart ( GtkDataboxXYCGraph xyc_graph,
guint  xstart 
)
static

◆ gtk_databox_xyc_graph_set_xstride()

static void gtk_databox_xyc_graph_set_xstride ( GtkDataboxXYCGraph xyc_graph,
guint  xstride 
)
static

◆ gtk_databox_xyc_graph_set_xtype()

static void gtk_databox_xyc_graph_set_xtype ( GtkDataboxXYCGraph xyc_graph,
GType  xtype 
)
static

◆ gtk_databox_xyc_graph_set_Y()

static void gtk_databox_xyc_graph_set_Y ( GtkDataboxXYCGraph xyc_graph,
gfloat *  Y 
)
static

◆ gtk_databox_xyc_graph_set_ystart()

static void gtk_databox_xyc_graph_set_ystart ( GtkDataboxXYCGraph xyc_graph,
guint  ystart 
)
static

◆ gtk_databox_xyc_graph_set_ystride()

static void gtk_databox_xyc_graph_set_ystride ( GtkDataboxXYCGraph xyc_graph,
guint  ystride 
)
static

◆ gtk_databox_xyc_graph_set_ytype()

static void gtk_databox_xyc_graph_set_ytype ( GtkDataboxXYCGraph xyc_graph,
GType  ytype 
)
static