projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rework the spreadsheet import feature of the grapic user interface
[pspp]
/
src
/
ui
/
gui
/
psppire-import-assistant.h
diff --git
a/src/ui/gui/psppire-import-assistant.h
b/src/ui/gui/psppire-import-assistant.h
index 3e1d7e843300807411768540de5a739ba4df37ff..881fc5bad04427dd74aef0f96cc59d25a2e31913 100644
(file)
--- a/
src/ui/gui/psppire-import-assistant.h
+++ b/
src/ui/gui/psppire-import-assistant.h
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2015, 2017 Free Software Foundation
+ Copyright (C) 2015, 2017
, 2020
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
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
@@
-28,6
+28,8
@@
#include "psppire-text-file.h"
#include "psppire-delimited-text.h"
#include "psppire-text-file.h"
#include "psppire-delimited-text.h"
+#include <ssw-sheet.h>
+
G_BEGIN_DECLS
struct spreadsheet;
G_BEGIN_DECLS
struct spreadsheet;
@@
-58,18
+60,25
@@
struct spreadsheet;
typedef struct _PsppireImportAssistant PsppireImportAssistant;
typedef struct _PsppireImportAssistantClass PsppireImportAssistantClass;
typedef struct _PsppireImportAssistant PsppireImportAssistant;
typedef struct _PsppireImportAssistantClass PsppireImportAssistantClass;
-
-typedef void page_func (PsppireImportAssistant *, GtkWidget *page);
+enum IMPORT_ASSISTANT_DIRECTION {IMPORT_ASSISTANT_FORWARDS, IMPORT_ASSISTANT_BACKWARDS};
struct _PsppireImportAssistant
{
GtkAssistant parent;
struct _PsppireImportAssistant
{
GtkAssistant parent;
- GtkBuilder *builder;
+ gint previous_page;
+ gchar *file_name;
+ GMainLoop *main_loop;
+ GtkWidget *paste_button;
+ GtkWidget *reset_button;
+ int response;
- gint current_page;
+ struct dictionary *dict;
+ struct dictionary *casereader_dict;
+
+ GtkWidget *var_sheet;
+ GtkWidget *data_sheet;
- gchar *file_name;
/* START The chooser page of the assistant. */
GtkWidget *encoding_selector;
/* START The chooser page of the assistant. */
GtkWidget *encoding_selector;
@@
-77,6
+86,9
@@
struct _PsppireImportAssistant
/* END The chooser page of the assistant. */
/* END The chooser page of the assistant. */
+ GtkBuilder *text_builder;
+
+
/* START The introduction page of the assistant. */
GtkWidget *all_cases_button;
GtkWidget *n_cases_button;
/* START The introduction page of the assistant. */
GtkWidget *all_cases_button;
GtkWidget *n_cases_button;
@@
-86,7
+98,7
@@
struct _PsppireImportAssistant
/* END The introduction page of the assistant. */
/* END The introduction page of the assistant. */
-/* START Page where the user chooses field separators. */
+
/* START Page where the user chooses field separators. */
/* How to break lines into columns. */
struct string quotes; /* Quote characters. */
/* How to break lines into columns. */
struct string quotes; /* Quote characters. */
@@
-106,22
+118,15
@@
struct _PsppireImportAssistant
GtkWidget *variable_names_cb;
/* END first line page */
GtkWidget *variable_names_cb;
/* END first line page */
- GMainLoop *main_loop;
- GtkWidget *paste_button;
- GtkWidget *reset_button;
- int response;
-
PsppireTextFile *text_file;
PsppireDelimitedText *delimiters_model;
PsppireTextFile *text_file;
PsppireDelimitedText *delimiters_model;
- struct sheet_spec_page *sheet_spec;
-
- struct dictionary *dict;
-
- GtkWidget *var_sheet;
- GtkWidget *data_sheet;
-
+ /* START spreadsheet related things */
+ GtkBuilder *spread_builder;
+ GtkWidget *preview_sheet;
struct spreadsheet *spreadsheet;
struct spreadsheet *spreadsheet;
+ SswRange selection;
+ bool updating_selection;
};
struct _PsppireImportAssistantClass
};
struct _PsppireImportAssistantClass
@@
-138,6
+143,9
@@
gchar *psppire_import_assistant_generate_syntax (PsppireImportAssistant *);
int psppire_import_assistant_run (PsppireImportAssistant *asst);
int psppire_import_assistant_run (PsppireImportAssistant *asst);
+GtkWidget *add_page_to_assistant (PsppireImportAssistant *ia,
+ GtkWidget *page, GtkAssistantPageType type, const gchar *title);
+
G_END_DECLS
#endif /* __PSPPIRE_IMPORT_ASSISTANT_H__ */
G_END_DECLS
#endif /* __PSPPIRE_IMPORT_ASSISTANT_H__ */