be1ebaa40982be5c25efe9cf15de2fabd7ce1c99
[scdataviz] / graphwidget.h
1 /*
2 ** Graph.h
3 ** 
4 ** Made by Johnny Q. Hacker
5 ** Login   <solarion@johnathan>
6 ** 
7
8
9
10     Copyright (C) 2008 Joseph Pingenot
11
12     This program is free software: you can redistribute it and/or modify
13     it under the terms of the GNU Affero General Public License as published by
14     the Free Software Foundation, either version 3 of the License, or
15     (at your option) any later version.
16
17     This program is distributed in the hope that it will be useful,
18     but WITHOUT ANY WARRANTY; without even the implied warranty of
19     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20     GNU Affero General Public License for more details.
21
22     You should have received a copy of the GNU Affero General Public License
23     along with this program.  If not, see <http://www.gnu.org/licenses/>.
24
25 ** Started on  Thu Jul 17 10:51:32 2008 Johnny Q. Hacker
26 ** Last update Thu Jul 17 10:51:32 2008 Johnny Q. Hacker
27 */
28
29 #ifndef GRAPHWIDGET_H_
30 #define GRAPHWIDGET_H_
31
32 #include <gtk/gtkdrawingarea.h>
33 #include <graph.h>
34
35 typedef struct _GraphWidget {
36   GtkDrawingArea parent;
37   Graph *graph;
38 } GraphWidget;
39
40 typedef struct _GraphWidgetClass {
41   GtkDrawingAreaClass parent_class;
42   
43 } GraphWidgetClass;
44
45 #define GRAPH_WIDGET_TYPE (graph_widget_get_type())
46 #define GRAPH_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRAPH_WIDGET_TYPE, GraphWidget))
47 #define GRAPH_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GRAPH_WIDGET, GraphWidgetClass))
48 #define IS_GRAPH_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRAPH_WIDGET_TYPE))
49 #define IS_GRAPH_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GRAPH_WIDGET_CLASS_TYPE))
50 #define GRAPH_WIDGET_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAPH_WIDGET, GraphWidgetClass))
51
52 GtkWidget* graph_widget_new(void);
53
54 Graph* graph_widget_get_graph(GraphWidget* gw);
55
56 #endif      /* !GRAPHWIDGET_H_ */