1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2008, 2010, 2011 Free Software Foundation
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 #ifndef __PSPPIRE_DATA_WINDOW_H__
19 #define __PSPPIRE_DATA_WINDOW_H__
23 #include <glib-object.h>
26 #include "libpspp/ll.h"
27 #include "ui/gui/psppire-window.h"
28 #include "ui/gui/psppire-data-editor.h"
32 #define PSPPIRE_DATA_WINDOW_TYPE (psppire_data_window_get_type ())
33 #define PSPPIRE_DATA_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_DATA_WINDOW_TYPE, PsppireDataWindow))
34 #define PSPPIRE_DATA_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
35 PSPPIRE_DATA_WINDOW_TYPE, PsppireData_WindowClass))
36 #define PSPPIRE_IS_DATA_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
37 PSPPIRE_DATA_WINDOW_TYPE))
38 #define PSPPIRE_IS_DATA_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
39 PSPPIRE_DATA_WINDOW_TYPE))
42 typedef struct _PsppireDataWindow PsppireDataWindow;
43 typedef struct _PsppireDataWindowClass PsppireDataWindowClass;
46 struct _PsppireDataWindow
51 PsppireDataEditor *data_editor;
54 PsppireVarStore *var_store;
55 struct dataset *dataset;
56 PsppireDataStore *data_store;
58 GtkAction *invoke_goto_dialog;
60 GtkAction *insert_variable;
61 GtkAction *insert_case;
62 GtkAction *delete_variables;
63 GtkAction *delete_cases;
66 gboolean save_as_portable;
68 struct ll ll; /* In global 'all_data_windows' list. */
69 unsigned long int lazy_serial;
70 unsigned int dataset_seqno;
73 struct _PsppireDataWindowClass
75 PsppireWindowClass parent_class;
78 extern struct session *the_session;
79 extern struct ll_list all_data_windows;
81 GType psppire_data_window_get_type (void);
82 GtkWidget* psppire_data_window_new (struct dataset *);
84 PsppireDataWindow *psppire_default_data_window (void);
85 void psppire_data_window_set_default (PsppireDataWindow *);
86 void psppire_data_window_undefault (PsppireDataWindow *);
88 PsppireDataWindow *psppire_data_window_for_dataset (struct dataset *);
90 bool psppire_data_window_is_empty (PsppireDataWindow *);
91 void create_data_window (void);
92 void open_data_window (PsppireWindow *victim, const char *file_name);
96 #endif /* __PSPPIRE_DATA_WINDOW_H__ */