1 /* $Id: gtkdatabox_xyc_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_xyc_graph
22  * @short_description: An abstract anchestor for all graphs which display xy-values in one color.
23  * @include: gtkdatabox_xyc_graph.h
24  * @see_also: #GtkDatabox, #GtkDataboxGraph, #GtkDataboxPoints, #GtkDataboxLines, #GtkDataboxBars
25  *
26  * GtkDataboxXYCGraphs are an abstract class for displaying XY-data in one color. The values for the data are represented
27  * as an array of X values and a second array of Y values. In order to actually display data, you should
28  * use one of the derived classes.
29  *
30  */
31 
32 #ifndef __GTK_DATABOX_XYC_GRAPH_H__
33 #define __GTK_DATABOX_XYC_GRAPH_H__
34 
35 #include <gtkdatabox_graph.h>
36 
37 G_BEGIN_DECLS
38 #define GTK_DATABOX_TYPE_XYC_GRAPH		  (gtk_databox_xyc_graph_get_type ())
39 #define GTK_DATABOX_XYC_GRAPH(obj)		  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
40                                            GTK_DATABOX_TYPE_XYC_GRAPH, \
41                                            GtkDataboxXYCGraph))
42 #define GTK_DATABOX_XYC_GRAPH_CLASS(klass)	  (G_TYPE_CHECK_CLASS_CAST ((klass), \
43                                            GTK_DATABOX_TYPE_XYC_GRAPH, \
44                                            GtkDataboxXYCGraphClass))
45 #define GTK_DATABOX_IS_XYC_GRAPH(obj)	  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
46                                            GTK_DATABOX_TYPE_XYC_GRAPH))
47 #define GTK_DATABOX_IS_XYC_GRAPH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
48                                            GTK_DATABOX_TYPE_XYC_GRAPH))
49 #define GTK_DATABOX_XYC_GRAPH_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
50                                            GTK_DATABOX_TYPE_XYC_GRAPH, \
51                                            GtkDataboxXYCGraphClass))
52 #define GTK_DATABOX_XYC_GRAPH_GET_PRIVATE(obj) \
53 	G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_DATABOX_TYPE_XYC_GRAPH, GtkDataboxXYCGraphPrivate)
54 
55 /**
56  * GtkDataboxXYCGraph:
57  *
58  * GtkDataboxXYCGraphs are an abstract class for displaying XY-data in one color. The values for the data are represented
59  * as an array of X values and a second array of Y values. In order to actually display data, you should
60  * use one of the derived classes.
61  *
62  */
63    typedef struct _GtkDataboxXYCGraph GtkDataboxXYCGraph;
64 
65    typedef struct _GtkDataboxXYCGraphClass GtkDataboxXYCGraphClass;
66 
67    struct _GtkDataboxXYCGraph
68    {
69       /*< private >*/
70       GtkDataboxGraph parent;
71    };
72 
73    struct _GtkDataboxXYCGraphClass
74    {
75       GtkDataboxGraphClass parent_class;
76    };
77 
78    GType gtk_databox_xyc_graph_get_type (void);
79 
80    guint gtk_databox_xyc_graph_get_length (GtkDataboxXYCGraph * xyc_graph);
81    guint gtk_databox_xyc_graph_get_maxlen (GtkDataboxXYCGraph * xyc_graph);
82    gfloat *gtk_databox_xyc_graph_get_X (GtkDataboxXYCGraph * xyc_graph);
83    gfloat *gtk_databox_xyc_graph_get_Y (GtkDataboxXYCGraph * xyc_graph);
84    guint gtk_databox_xyc_graph_get_xstart (GtkDataboxXYCGraph * xyc_graph);
85    guint gtk_databox_xyc_graph_get_ystart (GtkDataboxXYCGraph * xyc_graph);
86    guint gtk_databox_xyc_graph_get_xstride (GtkDataboxXYCGraph * xyc_graph);
87    guint gtk_databox_xyc_graph_get_ystride (GtkDataboxXYCGraph * xyc_graph);
88    GType gtk_databox_xyc_graph_get_xtype (GtkDataboxXYCGraph * xyc_graph);
89    GType gtk_databox_xyc_graph_get_ytype (GtkDataboxXYCGraph * xyc_graph);
90 
91    void gtk_databox_xyc_graph_set_X_Y_length(GtkDataboxXYCGraph * xyc_graph, gfloat * X, gfloat * Y, guint len);
92 
93 G_END_DECLS
94 #endif				/* __GTK_DATABOX_XYC_GRAPH_H__ */
95