X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-editor.h;h=941d7a4997a83b3ee75a3f8367c1962a4558410d;hb=17339b8ef2b6c9c403ceccb9f0ab534a943f92e1;hp=9b81c223fdcce1e3c28f7a161efb7e0162bef873;hpb=3015887c05c52fbb85ecc016339fe66cf4f75ba1;p=pspp diff --git a/src/ui/gui/psppire-data-editor.h b/src/ui/gui/psppire-data-editor.h index 9b81c223fd..941d7a4997 100644 --- a/src/ui/gui/psppire-data-editor.h +++ b/src/ui/gui/psppire-data-editor.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,13 +17,21 @@ #ifndef __PSPPIRE_DATA_EDITOR_H__ #define __PSPPIRE_DATA_EDITOR_H__ +/* PsppireDataEditor is a GtkNotebook for editing a single PSPP dataset. + + PsppireDataEditor has two tabs that normally contain a PsppireDataSheet and + a PsppireVarSheet. The user can choose to "split" the PsppireDataSheet view + into four views within the single tab. PsppireDataEditor also adds some + decorations above the PsppireDataSheet to note the current cell and allow + the current cell to be edited. + + PsppireDataEditor's normal parent in the widget hierarchy is + PsppireDataWindow. */ #include #include -#include +#include -#include -#include "psppire-var-store.h" #include "psppire-data-store.h" G_BEGIN_DECLS @@ -44,29 +52,24 @@ struct _PsppireDataEditor GtkNotebook parent; /* */ - gboolean dispose_has_run; - GtkWidget *cell_ref_entry; - GtkWidget *datum_entry; - GtkWidget *var_sheet; PsppireDataStore *data_store; - PsppireVarStore *var_store; + PsppireDict *dict; - GtkWidget *sheet_bin[4]; - GtkWidget *data_sheet[4]; + /* Font to use in var sheet and data sheet(s), NULL to use system default. */ + struct _PangoFontDescription *font; - GtkWidget *data_vbox; - - GtkWidget *paned; - gboolean split; + /* Variable sheet tab. */ + GtkWidget *var_sheet; + GtkWidget *data_sheet; - PsppireAxisImpl *vaxis[2]; + /* Data sheet tab. */ + GtkWidget *vbox; /* Top-level widget in tab. */ + GtkWidget *cell_ref_label; /* GtkLabel that shows selected case and var. */ + GtkWidget *datum_entry; /* PsppireValueEntry for editing current cell. */ - /* There's only one horizontal axis, since the - column widths are parameters of the variables */ - PsppireAxisImpl *haxis; + gboolean split; /* True if the sheets are in split view. */ }; - struct _PsppireDataEditorClass { GtkNotebookClass parent_class; @@ -74,25 +77,23 @@ struct _PsppireDataEditorClass GType psppire_data_editor_get_type (void); -GtkWidget* psppire_data_editor_new (PsppireVarStore *, PsppireDataStore *); -void psppire_data_editor_clip_copy (PsppireDataEditor *); -void psppire_data_editor_clip_paste (PsppireDataEditor *); -void psppire_data_editor_clip_cut (PsppireDataEditor *); -void psppire_data_editor_sort_ascending (PsppireDataEditor *); -void psppire_data_editor_sort_descending (PsppireDataEditor *); -void psppire_data_editor_insert_variable (PsppireDataEditor *); -void psppire_data_editor_delete_variables (PsppireDataEditor *); +GtkWidget* psppire_data_editor_new (PsppireDict *, PsppireDataStore *); void psppire_data_editor_show_grid (PsppireDataEditor *, gboolean); -void psppire_data_editor_insert_case (PsppireDataEditor *); -void psppire_data_editor_delete_cases (PsppireDataEditor *); void psppire_data_editor_set_font (PsppireDataEditor *, PangoFontDescription *); -void psppire_data_editor_delete_cases (PsppireDataEditor *); void psppire_data_editor_split_window (PsppireDataEditor *, gboolean ); +void psppire_data_editor_goto_variable (PsppireDataEditor *, gint dict_index); +void psppire_data_editor_data_delete_variables (PsppireDataEditor *de); +void psppire_data_editor_var_delete_variables (PsppireDataEditor *de); +void psppire_data_editor_insert_new_case_at_posn (PsppireDataEditor *de, gint posn); +void psppire_data_editor_insert_new_variable_at_posn (PsppireDataEditor *de, gint posn); -G_END_DECLS +struct _PsppireDataSheet *psppire_data_editor_get_active_data_sheet (PsppireDataEditor *); enum {PSPPIRE_DATA_EDITOR_DATA_VIEW = 0, PSPPIRE_DATA_EDITOR_VARIABLE_VIEW}; +void psppire_data_editor_paste (PsppireDataEditor *de); + +G_END_DECLS #endif /* __PSPPIRE_DATA_EDITOR_H__ */