1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2008 Free Software Foundation, Inc.
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/>. */
17 #ifndef __PSPPIRE_DATA_EDITOR_H__
18 #define __PSPPIRE_DATA_EDITOR_H__
22 #include <glib-object.h>
23 #include <gtk/gtknotebook.h>
25 #include <ui/gui/sheet/psppire-axis.h>
26 #include "psppire-var-store.h"
27 #include "psppire-data-store.h"
31 #define PSPPIRE_DATA_EDITOR_TYPE (psppire_data_editor_get_type ())
32 #define PSPPIRE_DATA_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_DATA_EDITOR_TYPE, PsppireDataEditor))
33 #define PSPPIRE_DATA_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_DATA_EDITOR_TYPE, PsppireDataEditorClass))
34 #define PSPPIRE_IS_DATA_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_DATA_EDITOR_TYPE))
35 #define PSPPIRE_IS_DATA_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_DATA_EDITOR_TYPE))
38 typedef struct _PsppireDataEditor PsppireDataEditor;
39 typedef struct _PsppireDataEditorClass PsppireDataEditorClass;
41 /* All members are private. */
42 struct _PsppireDataEditor
47 gboolean dispose_has_run;
48 GtkWidget *cell_ref_entry;
49 GtkWidget *datum_entry;
51 PsppireDataStore *data_store;
52 PsppireVarStore *var_store;
54 GtkWidget *sheet_bin[4];
55 GtkWidget *data_sheet[4];
62 PsppireAxis *vaxis[2];
64 /* There's only one horizontal axis, since the
65 column widths are parameters of the variables */
70 struct _PsppireDataEditorClass
72 GtkNotebookClass parent_class;
76 GType psppire_data_editor_get_type (void);
77 GtkWidget* psppire_data_editor_new (PsppireVarStore *, PsppireDataStore *);
78 void psppire_data_editor_clip_copy (PsppireDataEditor *);
79 void psppire_data_editor_clip_paste (PsppireDataEditor *);
80 void psppire_data_editor_clip_cut (PsppireDataEditor *);
81 void psppire_data_editor_sort_ascending (PsppireDataEditor *);
82 void psppire_data_editor_sort_descending (PsppireDataEditor *);
83 void psppire_data_editor_insert_variable (PsppireDataEditor *);
84 void psppire_data_editor_delete_variables (PsppireDataEditor *);
85 void psppire_data_editor_show_grid (PsppireDataEditor *, gboolean);
86 void psppire_data_editor_insert_case (PsppireDataEditor *);
87 void psppire_data_editor_delete_cases (PsppireDataEditor *);
88 void psppire_data_editor_set_font (PsppireDataEditor *, PangoFontDescription *);
89 void psppire_data_editor_delete_cases (PsppireDataEditor *);
90 void psppire_data_editor_split_window (PsppireDataEditor *, gboolean );
95 enum {PSPPIRE_DATA_EDITOR_DATA_VIEW = 0, PSPPIRE_DATA_EDITOR_VARIABLE_VIEW};
98 #endif /* __PSPPIRE_DATA_EDITOR_H__ */