Call dictionary callbacks on replaced dictionary.
[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 _PsppireVarStore
53 {
54   GObject parent;
55
56   /*< private >*/
57   PsppireDict *dict;
58   GdkColor disabled;
59   const PangoFontDescription *font_desc;
60 };
61
62 struct _PsppireVarStoreClass
63 {
64   GObjectClass parent_class;
65
66   /* Padding for future expansion */
67   void (*_gtk_reserved1) (void);
68   void (*_gtk_reserved2) (void);
69   void (*_gtk_reserved3) (void);
70   void (*_gtk_reserved4) (void);
71 };
72
73
74 GType         psppire_var_store_get_type         (void) G_GNUC_CONST;
75 PsppireVarStore *psppire_var_store_new              (PsppireDict *dict);
76 struct variable * psppire_var_store_get_var (PsppireVarStore *store, gint row);
77
78 void psppire_var_store_set_dictionary (PsppireVarStore *var_store, PsppireDict *dict);
79
80
81 /* Return the number of variables */
82 gint psppire_var_store_get_var_cnt (PsppireVarStore      *var_store);
83
84 void psppire_var_store_set_font (PsppireVarStore *store, const PangoFontDescription *fd);
85
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91
92 #endif /* __PSPPIRE_VAR_STORE_H__ */