1
/* GTK - The GIMP Toolkit
2
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library 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 GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
21
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22
* file for a list of people on the GTK+ Team. See the ChangeLog
23
* files for a list of changes. These files are distributed with
24
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27
#ifdef GTK_ENABLE_BROKEN
29
#ifndef __GTK_TREE_H__
30
#define __GTK_TREE_H__
33
#include <gtk/gtkcontainer.h>
38
/* set this flag to enable tree debugging output */
39
/* #define TREE_DEBUG */
41
#define GTK_TYPE_TREE (gtk_tree_get_type ())
42
#define GTK_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE, GtkTree))
43
#define GTK_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE, GtkTreeClass))
44
#define GTK_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE))
45
#define GTK_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE))
46
#define GTK_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE, GtkTreeClass))
49
#define GTK_IS_ROOT_TREE(obj) ((GtkObject*) GTK_TREE(obj)->root_tree == (GtkObject*)obj)
50
#define GTK_TREE_ROOT_TREE(obj) (GTK_TREE(obj)->root_tree ? GTK_TREE(obj)->root_tree : GTK_TREE(obj))
51
#define GTK_TREE_SELECTION_OLD(obj) (GTK_TREE_ROOT_TREE(obj)->selection)
55
GTK_TREE_VIEW_LINE, /* default view mode */
59
typedef struct _GtkTree GtkTree;
60
typedef struct _GtkTreeClass GtkTreeClass;
64
GtkContainer container;
68
GtkTree* root_tree; /* owner of selection list */
69
GtkWidget* tree_owner;
74
guint selection_mode : 2;
81
GtkContainerClass parent_class;
83
void (* selection_changed) (GtkTree *tree);
84
void (* select_child) (GtkTree *tree,
86
void (* unselect_child) (GtkTree *tree,
91
GType gtk_tree_get_type (void) G_GNUC_CONST;
92
GtkWidget* gtk_tree_new (void);
93
void gtk_tree_append (GtkTree *tree,
94
GtkWidget *tree_item);
95
void gtk_tree_prepend (GtkTree *tree,
96
GtkWidget *tree_item);
97
void gtk_tree_insert (GtkTree *tree,
100
void gtk_tree_remove_items (GtkTree *tree,
102
void gtk_tree_clear_items (GtkTree *tree,
105
void gtk_tree_select_item (GtkTree *tree,
107
void gtk_tree_unselect_item (GtkTree *tree,
109
void gtk_tree_select_child (GtkTree *tree,
110
GtkWidget *tree_item);
111
void gtk_tree_unselect_child (GtkTree *tree,
112
GtkWidget *tree_item);
113
gint gtk_tree_child_position (GtkTree *tree,
115
void gtk_tree_set_selection_mode (GtkTree *tree,
116
GtkSelectionMode mode);
117
void gtk_tree_set_view_mode (GtkTree *tree,
118
GtkTreeViewMode mode);
119
void gtk_tree_set_view_lines (GtkTree *tree,
122
/* deprecated function, use gtk_container_remove instead.
124
void gtk_tree_remove_item (GtkTree *tree,
130
#endif /* __GTK_TREE_H__ */
132
#endif /* GTK_ENABLE_BROKEN */