X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-window.h;h=a578501fc2518a52f9b9d9bbf3c3a425173ac91a;hb=dad7c7dcd682f51141da4dc13ee6f75ff3f304c6;hp=0100254386adf3dd9085a0d9954555bbfe51fa76;hpb=119d57cbddc317d9bde6831787026c84a6e7415f;p=pspp diff --git a/src/ui/gui/psppire-data-window.h b/src/ui/gui/psppire-data-window.h index 0100254386..a578501fc2 100644 --- a/src/ui/gui/psppire-data-window.h +++ b/src/ui/gui/psppire-data-window.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010 Free Software Foundation + Copyright (C) 2008, 2010, 2011, 2012, 2013, 2014 Free Software Foundation 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 @@ -18,16 +18,24 @@ #ifndef __PSPPIRE_DATA_WINDOW_H__ #define __PSPPIRE_DATA_WINDOW_H__ +/* PsppireDataWindow is a top-level window for editing a PSPP dataset. + + PsppireDataWindow contains a PsppireDataEditor. + + PsppireDataWindow's own functionality basically amounts to managing menus + and toolbars. In addition to maintaining some menu itema and toolbar items + of its own, it merges in menu and toolbar items provided by its child + PsppireDataEditor (based on the "ui-manager" property of PsppireDataEditor). + */ #include #include #include +#include "libpspp/ll.h" #include "ui/gui/psppire-window.h" #include "ui/gui/psppire-data-editor.h" -struct dataset; - G_BEGIN_DECLS #define PSPPIRE_DATA_WINDOW_TYPE (psppire_data_window_get_type ()) @@ -44,6 +52,12 @@ typedef struct _PsppireDataWindow PsppireDataWindow; typedef struct _PsppireDataWindowClass PsppireDataWindowClass; +enum PsppireDataWindowFormat { + PSPPIRE_DATA_WINDOW_SAV, + PSPPIRE_DATA_WINDOW_ZSAV, + PSPPIRE_DATA_WINDOW_POR +}; + struct _PsppireDataWindow { PsppireWindow parent; @@ -51,20 +65,20 @@ struct _PsppireDataWindow /* */ PsppireDataEditor *data_editor; GtkBuilder *builder; + GtkUIManager *ui_manager; - PsppireVarStore *var_store; + PsppireDict *dict; struct dataset *dataset; PsppireDataStore *data_store; - GtkAction *invoke_goto_dialog; + enum PsppireDataWindowFormat format; - GtkAction *insert_variable; - GtkAction *insert_case; - GtkAction *delete_variables; - GtkAction *delete_cases; + struct ll ll; /* In global 'all_data_windows' list. */ + unsigned long int lazy_serial; + unsigned int dataset_seqno; - - gboolean save_as_portable; + GtkUIManager *uim; + guint merge_id; }; struct _PsppireDataWindowClass @@ -72,9 +86,23 @@ struct _PsppireDataWindowClass PsppireWindowClass parent_class; }; +extern struct session *the_session; +extern struct ll_list all_data_windows; + GType psppire_data_window_get_type (void); GtkWidget* psppire_data_window_new (struct dataset *); + PsppireDataWindow *psppire_default_data_window (void); +void psppire_data_window_set_default (PsppireDataWindow *); +void psppire_data_window_undefault (PsppireDataWindow *); + +PsppireDataWindow *psppire_data_window_for_dataset (struct dataset *); +PsppireDataWindow *psppire_data_window_for_data_store (PsppireDataStore *); + +bool psppire_data_window_is_empty (PsppireDataWindow *); +void create_data_window (void); +void open_data_window (PsppireWindow *victim, const char *file_name, + const char *encoding, gpointer hint); G_END_DECLS