2 * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library 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.
20 #ifndef __GTK_TREE_STORE_H__
21 #define __GTK_TREE_STORE_H__
23 #include <gtk/gtktreemodel.h>
28 #endif /* __cplusplus */
30 #define GTK_TYPE_TREE_STORE (gtk_tree_store_get_type ())
31 #define GTK_TREE_STORE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_STORE, GtkTreeStore))
32 #define GTK_TREE_STORE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_STORE, GtkTreeStoreClass))
33 #define GTK_IS_TREE_STORE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_STORE))
34 #define GTK_IS_TREE_STORE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GTK_TYPE_TREE_STORE))
36 typedef struct _GtkTreeStore GtkTreeStore;
37 typedef struct _GtkTreeStoreClass GtkTreeStoreClass;
47 GType *column_headers;
50 struct _GtkTreeStoreClass
52 GtkObjectClass parent_class;
55 /* Will be moved into the GtkTreeModelIface eventually */
56 void (* changed) (GtkTreeModel *tree_model,
59 void (* inserted) (GtkTreeModel *tree_model,
62 void (* child_toggled) (GtkTreeModel *tree_model,
65 void (* deleted) (GtkTreeModel *tree_model,
70 GtkType gtk_tree_store_get_type (void);
71 GtkTreeStore *gtk_tree_store_new (void);
73 GtkTreeStore *gtk_tree_store_new_with_values (gint n_columns,
75 void gtk_tree_store_set_n_columns (GtkTreeStore *tree_store,
77 void gtk_tree_store_set_column_type (GtkTreeStore *store,
80 void gtk_tree_store_set_cell (GtkTreeStore *tree_store,
84 void gtk_tree_store_set (GtkTreeStore *tree_store,
87 void gtk_tree_store_setv (GtkTreeStore *tree_store,
90 void gtk_tree_store_get (GtkTreeStore *tree_store,
93 void gtk_tree_store_getv (GtkTreeStore *tree_store,
96 void gtk_tree_store_remove (GtkTreeStore *tree_store,
98 void gtk_tree_store_insert (GtkTreeStore *tree_store,
102 void gtk_tree_store_insert_before (GtkTreeStore *tree_store,
105 GtkTreeIter *sibling);
106 void gtk_tree_store_insert_after (GtkTreeStore *tree_store,
109 GtkTreeIter *sibling);
110 void gtk_tree_store_prepend (GtkTreeStore *tree_store,
112 GtkTreeIter *parent);
113 void gtk_tree_store_append (GtkTreeStore *tree_store,
115 GtkTreeIter *parent);
116 void gtk_tree_store_get_root_iter (GtkTreeStore *tree_store,
118 gboolean gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
120 GtkTreeIter *descendant);
121 gint gtk_tree_store_iter_depth (GtkTreeStore *tree_store,
127 #endif /* __cplusplus */
130 #endif /* __GTK_TREE_STORE_H__ */