1 /* psppire-data-store.h
3 PSPPIRE --- A Graphical User Interface for PSPP
4 Copyright (C) 2006 Free Software Foundation
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.
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.
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
21 #ifndef __PSPPIRE_DATA_STORE_H__
22 #define __PSPPIRE_DATA_STORE_H__
24 #include <gtksheet/gsheetmodel.h>
25 #include "psppire-dict.h"
26 #include "psppire-case-file.h"
30 #endif /* __cplusplus */
32 #define GTK_TYPE_DATA_STORE (psppire_data_store_get_type ())
34 #define PSPPIRE_DATA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
35 GTK_TYPE_DATA_STORE, PsppireDataStore))
37 #define PSPPIRE_DATA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
38 GTK_TYPE_DATA_STORE, \
39 PsppireDataStoreClass))
41 #define PSPPIRE_IS_DATA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATA_STORE))
43 #define PSPPIRE_IS_DATA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA_STORE))
45 #define PSPPIRE_DATA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
46 GTK_TYPE_DATA_STORE, \
47 PsppireDataStoreClass))
49 typedef struct _PsppireDataStore PsppireDataStore;
50 typedef struct _PsppireDataStoreClass PsppireDataStoreClass;
54 struct _PsppireDataStore
60 PsppireCaseFile *case_file;
61 const PangoFontDescription *font_desc;
63 /* The width of an upper case 'M' rendered in the current font */
72 struct _PsppireDataStoreClass
74 GObjectClass parent_class;
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);
84 inline GType psppire_data_store_get_type (void) G_GNUC_CONST;
85 PsppireDataStore *psppire_data_store_new (PsppireDict *dict);
87 void psppire_data_store_set_dictionary (PsppireDataStore *data_store,
90 void psppire_data_store_set_font (PsppireDataStore *store,
91 const PangoFontDescription *fd);
93 void psppire_data_store_show_labels (PsppireDataStore *store,
94 gboolean show_labels);
96 void psppire_data_store_clear (PsppireDataStore *data_store);
100 void psppire_data_store_create_system_file (PsppireDataStore *store,
101 struct file_handle *handle);
103 gboolean psppire_data_store_insert_new_case (PsppireDataStore *ds, gint posn);
109 #endif /* __cplusplus */
112 #endif /* __PSPPIRE_DATA_STORE_H__ */