Added custom psppire-selector widget.
[pspp-builds.git] / src / ui / gui / dict-display.h
1 /*
2    PSPPIRE --- A Graphical User Interface for PSPP
3    Copyright (C) 2007  Free Software Foundation
4
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.
9
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.
14
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
18    02110-1301, USA. */
19
20
21 /* This module provides various functions necessary for displaying a
22    dictionary in  GTK widgets.
23 */
24
25 #include <gtk/gtk.h>
26
27 #include "psppire-selector.h"
28 #include "psppire-dict.h"
29 #include <data/variable.h>
30
31 /* Sets up TREEVIEW to display the variables of DICT.
32    MODE is the selection mode for TREEVIEW.
33    PREDICATE determines which variables should be visible, or NULL if
34    all are to be visible.
35  */
36 void attach_dictionary_to_treeview (GtkTreeView *treeview, PsppireDict *dict,
37                                     GtkSelectionMode mode,
38                                     var_predicate_func *predicate
39                                     );
40
41
42 /* A SelectItemsFunc function for GtkTreeView widgets */
43 void insert_source_row_into_tree_view (GtkTreeIter source_iter,
44                                        GtkWidget *dest,
45                                        GtkTreeModel *source_model
46                                        );
47
48
49 /* A SelectItemsFunc function for GtkEntry widgets */
50 void insert_source_row_into_entry (GtkTreeIter source_iter,
51                                    GtkWidget *dest,
52                                    GtkTreeModel *source_model
53                                    );
54
55
56
57 /* A FilterItemsFunc function for GtkEntry widgets */
58 gboolean is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter,
59                                 PsppireSelector *selector);