Removed my authorship lines.
[pspp] / src / ui / gui / psppire-data-store.h
1 /* psppire-data-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_DATA_STORE_H__
22 #define __PSPPIRE_DATA_STORE_H__
23
24 #include <gtksheet/gsheetmodel.h>
25 #include "psppire-dict.h"
26 #include "psppire-case-file.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 #define GTK_TYPE_DATA_STORE            (psppire_data_store_get_type ())
33
34 #define PSPPIRE_DATA_STORE(obj)        (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
35                                                                     GTK_TYPE_DATA_STORE, PsppireDataStore))
36
37 #define PSPPIRE_DATA_STORE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), \
38                                                                  GTK_TYPE_DATA_STORE, \
39                                                                  PsppireDataStoreClass))
40
41 #define PSPPIRE_IS_DATA_STORE(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATA_STORE))
42
43 #define PSPPIRE_IS_DATA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA_STORE))
44
45 #define PSPPIRE_DATA_STORE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
46                                                                    GTK_TYPE_DATA_STORE, \
47                                                                    PsppireDataStoreClass))
48
49 typedef struct _PsppireDataStore       PsppireDataStore;
50 typedef struct _PsppireDataStoreClass  PsppireDataStoreClass;
51
52 struct dictionary;
53
54 struct _PsppireDataStore
55 {
56   GObject parent;
57
58   /*< private >*/
59   PsppireDict *dict;
60   PsppireCaseFile *case_file;
61   const PangoFontDescription *font_desc;
62
63   /* The width of an upper case 'M' rendered in the current font */
64   gint width_of_m ; 
65   
66   gboolean show_labels;
67
68   /* Geometry */
69   gint margin_width;
70 };
71
72 struct _PsppireDataStoreClass
73 {
74   GObjectClass parent_class;
75
76   /* Padding for future expansion */
77   void (*_gtk_reserved1) (void);
78   void (*_gtk_reserved2) (void);
79   void (*_gtk_reserved3) (void);
80   void (*_gtk_reserved4) (void);
81 };
82
83
84 inline GType psppire_data_store_get_type (void) G_GNUC_CONST;
85 PsppireDataStore *psppire_data_store_new     (PsppireDict *dict);
86
87 void psppire_data_store_set_dictionary(PsppireDataStore *data_store, 
88                                        PsppireDict *dict);
89
90 void psppire_data_store_set_font(PsppireDataStore *store, 
91                                  const PangoFontDescription *fd);
92
93 void psppire_data_store_show_labels(PsppireDataStore *store, 
94                                     gboolean show_labels);
95   
96 void psppire_data_store_clear(PsppireDataStore *data_store);
97
98 struct file_handle;
99
100 void psppire_data_store_create_system_file (PsppireDataStore *store,
101                                             struct file_handle *handle);
102
103 gboolean psppire_data_store_insert_new_case (PsppireDataStore *ds, gint posn);
104
105
106
107 #ifdef __cplusplus
108 }
109 #endif /* __cplusplus */
110
111
112 #endif /* __PSPPIRE_DATA_STORE_H__ */