2 PSPPIRE --- A Graphical User Interface for PSPP
3 Copyright (C) 2007 Free Software Foundation
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 /* Some common routines used in the implementation of dialog boxes */
24 #ifndef DIALOG_COMMON_H
25 #define DIALOG_COMMON_H
28 #include "psppire-dict.h"
30 /* Append the names of selected variables to STRING.
31 TREEVIEW is the treeview containing the variables.
32 DICT is the dictionary for those variables.
34 gint append_variable_names (GString *, PsppireDict *, GtkTreeView *);
37 /* Returns the variable currently selected by the iterator
38 pointing to TREEMODEL */
39 struct variable * get_selected_variable (GtkTreeModel *treemodel,
45 /* A (*GtkTreeCellDataFunc) function.
46 This function expects TREEMODEL to hold G_TYPE_INT. The ints it holds
47 are the indices of the variables in the dictionary, which DATA points to.
48 It renders the name of the variable into CELL.
50 void cell_var_name (GtkTreeViewColumn *tree_column,
51 GtkCellRenderer *cell,
52 GtkTreeModel *tree_model,
57 /* Set a model for DEST, which is an GtkListStore of g_int's
58 whose values are the indices into DICT */
59 void set_dest_model (GtkTreeView *dest, PsppireDict *dict);