2 PSPPIRE --- A Graphical User Interface for PSPP
3 Copyright (C) 2005 Free Software Foundation
4 Written by John Darrington
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef __PSPPIRE_VAR_TYPE_DIALOG_H
23 #define __PSPPIRE_VAR_TYPE_DIALOG_H
26 /* This module describes the behaviour of the Variable Type dialog box,
27 used for input of the variable type parameter in the var sheet */
29 #include <data/format.h>
46 typedef void (*variable_changed_func)(struct variable *var);
48 struct var_type_dialog
52 /* Variable to be updated */
53 struct PsppireVariable *pv;
57 /* Function to be run when the dialog changes a variable */
58 variable_changed_func var_change_func;
61 /* Local copy of format specifier */
62 struct fmt_spec fmt_l;
65 GtkWidget *radioButton[num_BUTTONS];
68 GtkWidget *label_decimals;
69 GtkWidget *entry_decimals;
72 GtkWidget *entry_width;
74 /* Container for width/decimals entry/labels */
75 GtkWidget *width_decimals;
78 GtkWidget *date_format_list;
79 GtkTreeView *date_format_treeview;
82 GtkWidget *dollar_window;
83 GtkTreeView *dollar_treeview;
86 GtkWidget *custom_currency_hbox;
87 GtkTreeView *custom_treeview;
88 GtkWidget *label_psample;
89 GtkWidget *label_nsample;
98 struct var_type_dialog * var_type_dialog_create(GladeXML *xml);
101 void var_type_dialog_set_variable(struct var_type_dialog *dialog,
102 variable_changed_func set_variable_changed,
103 struct variable *var);
105 void var_type_dialog_show(struct var_type_dialog *dialog);