1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2007 Free Software Foundation, Inc.
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/>. */
17 /* Some common routines used in the implementation of dialog boxes */
20 #ifndef DIALOG_COMMON_H
21 #define DIALOG_COMMON_H
24 #include "psppire-dict.h"
26 /* A (*GtkTreeCellDataFunc) function.
27 This function expects TREEMODEL to hold G_TYPE_INT. The ints it holds
28 are the indices of the variables in the dictionary, which DATA points to.
29 It renders the name of the variable into CELL.
31 void XXX_cell_var_name (GtkTreeViewColumn *tree_column,
32 GtkCellRenderer *cell,
33 GtkTreeModel *tree_model,
38 /* Returns FALSE if the variables represented by the union of the rows
39 currently selected by SOURCE widget, and contents of the DEST
40 widget, are of different types.
42 In other words, this function when passed as the argument to
43 psppire_selector_set_allow, ensures that the selector selects only
44 string variables, or only numeric variables, not a mixture.
46 gboolean homogeneous_types (GtkWidget *source, GtkWidget *dest);
48 /* Returns TRUE if all of the variable(s) represented by the rows
49 currently selected by SOURCE widget, are numeric. DEST is ignored.
51 In other words, this function when passed as the argument to
52 psppire_selector_set_allow, ensures that the selector selects only
55 gboolean numeric_only (GtkWidget *source, GtkWidget *dest);