1 /* psppire-data-store.h
3 PSPPIRE --- A Graphical User Interface for PSPP
4 Copyright (C) 2006 Free Software Foundation
5 Written by John Darrington
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef __PSPPIRE_DATA_STORE_H__
23 #define __PSPPIRE_DATA_STORE_H__
25 #include <gtksheet/gsheetmodel.h>
26 #include "psppire-dict.h"
27 #include "psppire-case-file.h"
31 #endif /* __cplusplus */
33 #define GTK_TYPE_DATA_STORE (psppire_data_store_get_type ())
35 #define PSPPIRE_DATA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
36 GTK_TYPE_DATA_STORE, PsppireDataStore))
38 #define PSPPIRE_DATA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
39 GTK_TYPE_DATA_STORE, \
40 PsppireDataStoreClass))
42 #define PSPPIRE_IS_DATA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATA_STORE))
44 #define PSPPIRE_IS_DATA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA_STORE))
46 #define PSPPIRE_DATA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
47 GTK_TYPE_DATA_STORE, \
48 PsppireDataStoreClass))
50 typedef struct _PsppireDataStore PsppireDataStore;
51 typedef struct _PsppireDataStoreClass PsppireDataStoreClass;
55 struct _PsppireDataStore
61 PsppireCaseFile *case_file;
62 const PangoFontDescription *font_desc;
64 /* The width of an upper case 'M' rendered in the current font */
73 struct _PsppireDataStoreClass
75 GObjectClass parent_class;
77 /* Padding for future expansion */
78 void (*_gtk_reserved1) (void);
79 void (*_gtk_reserved2) (void);
80 void (*_gtk_reserved3) (void);
81 void (*_gtk_reserved4) (void);
85 inline GType psppire_data_store_get_type (void) G_GNUC_CONST;
86 PsppireDataStore *psppire_data_store_new (PsppireDict *dict);
88 void psppire_data_store_set_dictionary(PsppireDataStore *data_store,
91 void psppire_data_store_set_font(PsppireDataStore *store,
92 const PangoFontDescription *fd);
94 void psppire_data_store_show_labels(PsppireDataStore *store,
95 gboolean show_labels);
97 void psppire_data_store_clear(PsppireDataStore *data_store);
101 void psppire_data_store_create_system_file (PsppireDataStore *store,
102 struct file_handle *handle);
104 gboolean psppire_data_store_insert_new_case (PsppireDataStore *ds, gint posn);
110 #endif /* __cplusplus */
113 #endif /* __PSPPIRE_DATA_STORE_H__ */