1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2008, 2010 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>
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 struct _PsppireDataWindow *data_window;
52 PsppireDataStore *data_store;
53 PsppireVarStore *var_store;
55 GtkWidget *sheet_bin[4];
56 GtkWidget *data_sheet[4];
63 PsppireAxis *vaxis[2];
65 /* There's only one horizontal axis, since the
66 column widths are parameters of the variables */
71 struct _PsppireDataEditorClass
73 GtkNotebookClass parent_class;
77 GType psppire_data_editor_get_type (void);
78 GtkWidget* psppire_data_editor_new (struct _PsppireDataWindow *, PsppireVarStore *, PsppireDataStore *);
79 void psppire_data_editor_clip_copy (PsppireDataEditor *);
80 void psppire_data_editor_clip_paste (PsppireDataEditor *);
81 void psppire_data_editor_clip_cut (PsppireDataEditor *);
82 void psppire_data_editor_sort_ascending (PsppireDataEditor *);
83 void psppire_data_editor_sort_descending (PsppireDataEditor *);
84 void psppire_data_editor_insert_variable (PsppireDataEditor *);
85 void psppire_data_editor_delete_variables (PsppireDataEditor *);
86 void psppire_data_editor_show_grid (PsppireDataEditor *, gboolean);
87 void psppire_data_editor_insert_case (PsppireDataEditor *);
88 void psppire_data_editor_delete_cases (PsppireDataEditor *);
89 void psppire_data_editor_set_font (PsppireDataEditor *, PangoFontDescription *);
90 void psppire_data_editor_delete_cases (PsppireDataEditor *);
91 void psppire_data_editor_split_window (PsppireDataEditor *, gboolean );
96 enum {PSPPIRE_DATA_EDITOR_DATA_VIEW = 0, PSPPIRE_DATA_EDITOR_VARIABLE_VIEW};
99 #endif /* __PSPPIRE_DATA_EDITOR_H__ */