1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2012 Free Software Foundation
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/>. */
18 #include <glib-object.h>
21 #include "psppire-dialog-action.h"
23 #ifndef __PSPPIRE_DIALOG_ACTION_RECODE_H__
24 #define __PSPPIRE_DIALOG_ACTION_RECODE_H__
36 #define PSPPIRE_TYPE_DIALOG_ACTION_RECODE (psppire_dialog_action_recode_get_type ())
38 #define PSPPIRE_DIALOG_ACTION_RECODE(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
40 PSPPIRE_TYPE_DIALOG_ACTION_RECODE, PsppireDialogActionRecode))
42 #define PSPPIRE_DIALOG_ACTION_RECODE_CLASS(klass) \
43 (G_TYPE_CHECK_CLASS_CAST ((klass), \
44 PSPPIRE_TYPE_DIALOG_ACTION_RECODE, \
45 PsppireDialogActionRecodeClass))
48 #define PSPPIRE_IS_DIALOG_ACTION_RECODE(obj) \
49 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DIALOG_ACTION_RECODE))
51 #define PSPPIRE_IS_DIALOG_ACTION_RECODE_CLASS(klass) \
52 (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DIALOG_ACTION_RECODE))
55 #define PSPPIRE_DIALOG_ACTION_RECODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
56 PSPPIRE_TYPE_DIALOG_ACTION_RECODE, \
57 PsppireDialogActionRecodeClass))
59 typedef struct _PsppireDialogActionRecode PsppireDialogActionRecode;
60 typedef struct _PsppireDialogActionRecodeClass PsppireDialogActionRecodeClass;
63 struct _PsppireDialogActionRecode
65 PsppireDialogAction parent;
67 PsppireDialog *old_and_new_dialog;
69 GtkWidget *dict_treeview;
70 GtkWidget *variable_treeview;
71 GtkWidget *toggle[n_BUTTONS];
73 GtkWidget *strings_box;
74 GtkWidget *convert_button;
75 GtkWidget *new_copy_label;
78 GtkWidget *new_value_entry;
80 GtkWidget *old_value_chooser;
82 GtkListStore *value_map;
86 gboolean input_var_is_string;
88 GtkWidget *new_name_entry;
89 GtkWidget *new_label_entry;
90 GtkWidget *change_button;
92 GtkWidget *output_variable_box;
94 GtkWidget *string_button;
95 GtkWidget *width_entry;
99 struct _PsppireDialogActionRecodeClass
101 PsppireDialogActionClass parent_class;
103 gboolean (*target_is_string) (const PsppireDialogActionRecode *);
106 GType psppire_dialog_action_recode_get_type (void) ;
108 void psppire_dialog_action_recode_refresh (PsppireDialogAction *);
110 void psppire_dialog_action_recode_pre_activate (PsppireDialogActionRecode *act, void (*populate_treeview) (PsppireDialogActionRecode *) );
113 GType new_value_get_type (void);
116 char *psppire_dialog_action_recode_generate_syntax (const PsppireDialogAction *act,
117 void (*add_string_decls) (const PsppireDialogActionRecode *, struct string *),
118 void (*add_into_clause) (const PsppireDialogActionRecode *, struct string *),
119 void (*add_new_value_labels) (const PsppireDialogActionRecode *, struct string *));
123 #endif /* __PSPPIRE_DIALOG_ACTION_RECODE_H__ */