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"
23 #include "psppire-var-store.h"
27 #define PSPPIRE_TYPE_VAR_TYPE_DIALOG (psppire_var_type_dialog_get_type())
28 #define PSPPIRE_VAR_TYPE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialog))
29 #define PSPPIRE_VAR_TYPE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialogClass))
30 #define PSPPIRE_IS_VAR_TYPE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG))
31 #define PSPPIRE_IS_VAR_TYPE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class),PSPPIRE_TYPE_VAR_TYPE_DIALOG))
32 #define PSPPIRE_VAR_TYPE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),PSPPIRE_TYPE_VAR_TYPE_DIALOG,PsppireVarTypeDialogClass))
34 typedef struct _PsppireVarTypeDialog PsppireVarTypeDialog;
35 typedef struct _PsppireVarTypeDialogClass PsppireVarTypeDialogClass;
37 /* This module describes the behaviour of the Variable Type dialog box,
38 used for input of the variable type parameter in the var sheet */
55 struct _PsppireVarTypeDialog {
58 /* Format being edited. */
59 struct fmt_spec base_format;
61 /* Current version of format. */
62 struct fmt_spec fmt_l;
65 GtkWidget *radioButton[num_BUTTONS];
68 GtkWidget *label_decimals;
69 GtkWidget *entry_decimals;
70 GtkAdjustment *adj_decimals;
73 GtkWidget *entry_width;
74 GtkAdjustment *adj_width;
76 /* Container for width/decimals entry/labels */
77 GtkWidget *width_decimals;
80 GtkWidget *date_format_list;
81 GtkTreeView *date_format_treeview;
84 GtkWidget *dollar_window;
85 GtkTreeView *dollar_treeview;
88 GtkWidget *custom_currency_hbox;
89 GtkTreeView *custom_treeview;
90 GtkWidget *label_psample;
91 GtkWidget *label_nsample;
99 struct _PsppireVarTypeDialogClass {
100 PsppireDialogClass parent_class;
103 GType psppire_var_type_dialog_get_type (void) G_GNUC_CONST;
104 PsppireVarTypeDialog* psppire_var_type_dialog_new (const struct fmt_spec *);
106 void psppire_var_type_dialog_set_format (PsppireVarTypeDialog *,
107 const struct fmt_spec *);
108 const struct fmt_spec *psppire_var_type_dialog_get_format (
109 const PsppireVarTypeDialog *);
111 void psppire_var_type_dialog_run (GtkWindow *parent_window,
112 struct fmt_spec *format);
116 #endif /* PSPPIRE_VAR_TYPE_DIALOG_H */