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
Go to the documentation of this file.
1 /* $Id: gtkdatabox_graph.h 4 2008-06-22 09:19:11Z rbock $ */
2 /* GtkDatabox - An extension to the gtk+ library
3  * Copyright (C) 1998 - 2008 Dr. Roland Bock
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation; either version 2.1
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 /**
21  * SECTION:gtkdatabox_graph
22  * @short_description: An abstract anchestor for all "real" graphs.
23  * @include: gtkdatabox_graph.h
24  * @see_also: #GtkDatabox, #GtkDataboxPoints, #GtkDataboxLines, #GtkDataboxBars, #GtkDataboxGrid, #GtkDataboxCrossSimple
25  *
26  * GtkDataboxGraphs can display data or other things in a #GtkDatabox widget.
27  *
28  * This class is just the basic interface. Other graph classes are derived from this
29  * class and implement some real things.
30  *
31  */
32 
33 
34 #ifndef __GTK_DATABOX_GRAPH_H__
35 #define __GTK_DATABOX_GRAPH_H__
36 
37 #include <gdk/gdk.h>
38 #include <pango/pango.h>
39 #include <gtkdatabox.h>
40 
41 G_BEGIN_DECLS
42 #define GTK_DATABOX_TYPE_GRAPH (gtk_databox_graph_get_type ())
43 #define GTK_DATABOX_GRAPH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
44  GTK_DATABOX_TYPE_GRAPH, \
45  GtkDataboxGraph))
46 #define GTK_DATABOX_GRAPH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
47  GTK_DATABOX_TYPE_GRAPH, \
48  GtkDataboxGraphClass))
49 #define GTK_DATABOX_IS_GRAPH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
50  GTK_DATABOX_TYPE_GRAPH))
51 #define GTK_DATABOX_IS_GRAPH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
52  GTK_DATABOX_TYPE_GRAPH))
53 #define GTK_DATABOX_GRAPH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
54  GTK_DATABOX_TYPE_GRAPH, \
55  GtkDataboxGraphClass))
56 
57 /**
58  * GtkDataboxGraphClass
59  *
60  * The object class of #GtkDataboxGraph.
61  *
62  **/
64 
66  {
67  GObjectClass parent_class;
68 
69  /*
70  * public virtual drawing function
71  */
72  void (*draw) (GtkDataboxGraph * graph, GtkDatabox * box);
73 
75  gfloat * min_x, gfloat * max_x,
76  gfloat * min_y, gfloat * max_y);
77  cairo_t* (*create_gc) (GtkDataboxGraph * graph, GtkDatabox * box);
78  };
79 
80  /**
81  * _GtkDataboxGraph
82  * @parent: the parent object
83  *
84  * Implementation of #GtkDataboxGraph
85  *
86  **/
88  {
89  /*< private >*/
90  GObject parent;
91  };
92 
93 
95 
96  void gtk_databox_graph_set_hide (GtkDataboxGraph * graph, gboolean hide);
98 
100  GdkRGBA * color);
101  GdkRGBA *gtk_databox_graph_get_color (GtkDataboxGraph * graph);
102 
104  GdkRGBA * rgba);
106 
107  void gtk_databox_graph_set_size (GtkDataboxGraph * graph, gint size);
109 
111  gfloat * min_x, gfloat * max_x,
112  gfloat * min_y, gfloat * max_y);
113  /* This function is called by GtkDatabox */
114  void gtk_databox_graph_draw (GtkDataboxGraph * graph, GtkDatabox * box);
115 
116  /* This function is called by derived graph classes */
117  cairo_t* gtk_databox_graph_create_gc (GtkDataboxGraph * graph, GtkDatabox * box);
118 
119 G_END_DECLS
120 #endif /* __GTK_DATABOX_GRAPH_H__ */
void gtk_databox_graph_set_rgba(GtkDataboxGraph *graph, GdkRGBA *rgba)
gint gtk_databox_graph_get_size(GtkDataboxGraph *graph)
void gtk_databox_graph_set_hide(GtkDataboxGraph *graph, gboolean hide)
GdkRGBA * gtk_databox_graph_get_color(GtkDataboxGraph *graph)
void gtk_databox_graph_set_size(GtkDataboxGraph *graph, gint size)
cairo_t * gtk_databox_graph_create_gc(GtkDataboxGraph *graph, GtkDatabox *box)
void gtk_databox_graph_set_color(GtkDataboxGraph *graph, GdkRGBA *color)
void gtk_databox_graph_draw(GtkDataboxGraph *graph, GtkDatabox *box)
GdkRGBA * gtk_databox_graph_get_rgba(GtkDataboxGraph *graph)
gint gtk_databox_graph_calculate_extrema(GtkDataboxGraph *graph, gfloat *min_x, gfloat *max_x, gfloat *min_y, gfloat *max_y)
GType gtk_databox_graph_get_type(void)
gboolean gtk_databox_graph_get_hide(GtkDataboxGraph *graph)
typedefG_BEGIN_DECLS struct _GtkDatabox GtkDatabox
void(* draw)(GtkDataboxGraph *graph, GtkDatabox *box)
gint(* calculate_extrema)(GtkDataboxGraph *graph, gfloat *min_x, gfloat *max_x, gfloat *min_y, gfloat *max_y)