Change license from GPLv2+ to GPLv3+.
[pspp-builds.git] / src / ui / gui / psppire-var-store.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2006  Free Software Foundation
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef __PSPPIRE_VAR_STORE_H__
18 #define __PSPPIRE_VAR_STORE_H__
19
20 #include <gtksheet/gsheetmodel.h>
21 #include "psppire-dict.h"
22 #include <gdk/gdk.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27
28 #define GTK_TYPE_VAR_STORE             (psppire_var_store_get_type ())
29
30 #define PSPPIRE_VAR_STORE(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
31                                                                     GTK_TYPE_VAR_STORE, PsppireVarStore))
32
33 #define PSPPIRE_VAR_STORE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), \
34                                                                  GTK_TYPE_VAR_STORE, \
35                                                                  PsppireVarStoreClass))
36
37 #define PSPPIRE_IS_VAR_STORE(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VAR_STORE))
38
39 #define PSPPIRE_IS_VAR_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VAR_STORE))
40
41 #define PSPPIRE_VAR_STORE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
42                                                                    GTK_TYPE_VAR_STORE, \
43                                                                    PsppireVarStoreClass))
44
45 typedef struct _PsppireVarStore       PsppireVarStore;
46 typedef struct _PsppireVarStoreClass  PsppireVarStoreClass;
47
48 struct _PsppireVarStore
49 {
50   GObject parent;
51
52   /*< private >*/
53   PsppireDict *dict;
54   GdkColor disabled;
55   const PangoFontDescription *font_desc;
56 };
57
58 struct _PsppireVarStoreClass
59 {
60   GObjectClass parent_class;
61
62   /* Padding for future expansion */
63   void (*_gtk_reserved1) (void);
64   void (*_gtk_reserved2) (void);
65   void (*_gtk_reserved3) (void);
66   void (*_gtk_reserved4) (void);
67 };
68
69
70 GType         psppire_var_store_get_type         (void) G_GNUC_CONST;
71 PsppireVarStore *psppire_var_store_new              (PsppireDict *dict);
72 struct variable * psppire_var_store_get_var (PsppireVarStore *store, gint row);
73
74 void psppire_var_store_set_dictionary (PsppireVarStore *var_store, PsppireDict *dict);
75
76
77 /* Return the number of variables */
78 gint psppire_var_store_get_var_cnt (PsppireVarStore      *var_store);
79
80 void psppire_var_store_set_font (PsppireVarStore *store, const PangoFontDescription *fd);
81
82
83 #ifdef __cplusplus
84 }
85 #endif /* __cplusplus */
86
87
88 #endif /* __PSPPIRE_VAR_STORE_H__ */