1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2005, 2011, 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 #ifndef PSPPIRE_VAR_TYPE_DIALOG_H
19 #define PSPPIRE_VAR_TYPE_DIALOG_H 1
21 #include "data/format.h"
22 #include "psppire-dialog.h"
26 #define PSPPIRE_TYPE_VAR_TYPE_DIALOG (psppire_var_type_dialog_get_type())
27 #define PSPPIRE_VAR_TYPE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialog))
28 #define PSPPIRE_VAR_TYPE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialogClass))
29 #define PSPPIRE_IS_VAR_TYPE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG))
30 #define PSPPIRE_IS_VAR_TYPE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class),PSPPIRE_TYPE_VAR_TYPE_DIALOG))
31 #define PSPPIRE_VAR_TYPE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialogClass))
33 typedef struct _PsppireVarTypeDialog PsppireVarTypeDialog;
34 typedef struct _PsppireVarTypeDialogClass PsppireVarTypeDialogClass;
36 /* This module describes the behaviour of the Variable Type dialog box,
37 used for input of the variable type parameter in the var sheet */
54 struct _PsppireVarTypeDialog {
57 /* Format being edited. */
58 struct fmt_spec base_format;
60 /* Current version of format. */
61 struct fmt_spec fmt_l;
64 GtkWidget *radioButton[num_BUTTONS];
67 GtkWidget *label_decimals;
68 GtkWidget *entry_decimals;
69 GtkAdjustment *adj_decimals;
72 GtkWidget *entry_width;
73 GtkAdjustment *adj_width;
75 /* Container for width/decimals entry/labels */
76 GtkWidget *width_decimals;
79 GtkWidget *date_format_list;
80 GtkTreeView *date_format_treeview;
83 GtkWidget *dollar_window;
84 GtkTreeView *dollar_treeview;
87 GtkWidget *custom_currency_hbox;
88 GtkTreeView *custom_treeview;
89 GtkWidget *label_psample;
90 GtkWidget *label_nsample;
98 struct _PsppireVarTypeDialogClass {
99 PsppireDialogClass parent_class;
102 GType psppire_var_type_dialog_get_type (void) G_GNUC_CONST;
103 PsppireVarTypeDialog* psppire_var_type_dialog_new (const struct fmt_spec *);
105 gint psppire_var_type_dialog_run (GtkWindow *parent_window,
106 struct fmt_spec *format);
110 #endif /* PSPPIRE_VAR_TYPE_DIALOG_H */