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