diff options
author | Shawn Amundson <amundson@src.gnome.org> | 1997-12-17 23:41:42 +0000 |
---|---|---|
committer | Shawn Amundson <amundson@src.gnome.org> | 1997-12-17 23:41:42 +0000 |
commit | 4de2665e8c3fc46afff354537d0d7b4566e5fcfe (patch) | |
tree | 13ae28c4e7170440c037e1a32d43506c66c2e7f3 /gtk/gtktree.h | |
parent | 865eab2445848f79cab42eb0872efa383937cf35 (diff) | |
download | gdk-pixbuf-4de2665e8c3fc46afff354537d0d7b4566e5fcfe.tar.gz |
Tree widget implementation by Bolliet Jerome.
There is also another tree widget implementation by
AOSASA Shigeru <aozasa@sakuranet.or.jp>:
ftp://ftp.gimp.org/pub/gtk/contrib/gtk-shige-971216-0.tar.gz
-Shawn
Diffstat (limited to 'gtk/gtktree.h')
-rw-r--r-- | gtk/gtktree.h | 64 |
1 files changed, 53 insertions, 11 deletions
diff --git a/gtk/gtktree.h b/gtk/gtktree.h index 1486a82ab..2dc5ece1b 100644 --- a/gtk/gtktree.h +++ b/gtk/gtktree.h @@ -32,6 +32,15 @@ extern "C" { #define GTK_TREE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_tree_get_type (), GtkTreeClass) #define GTK_IS_TREE(obj) GTK_CHECK_TYPE (obj, gtk_tree_get_type ()) +#define GTK_IS_ROOT_TREE(obj) (GTK_TREE(obj)->root_tree == NULL) +#define GTK_TREE_ROOT_TREE(obj) (GTK_TREE(obj)->root_tree ? GTK_TREE(obj)->root_tree : GTK_TREE(obj)) +#define GTK_TREE_SELECTION(obj) (GTK_TREE_ROOT_TREE(obj)->selection) + +typedef enum +{ + GTK_TREE_VIEW_LINE, /* default view mode */ + GTK_TREE_VIEW_ITEM +} GtkTreeViewMode; typedef struct _GtkTree GtkTree; typedef struct _GtkTreeClass GtkTreeClass; @@ -41,25 +50,58 @@ struct _GtkTree GtkContainer container; GList *children; + + GtkTree* root_tree; /* owner of selection list */ + GtkWidget* tree_owner; + GList *selection; + guint indent_value; + guint current_indent; + guint selection_mode : 2; + guint view_mode : 1; }; struct _GtkTreeClass { GtkContainerClass parent_class; -}; - -guint gtk_tree_get_type (void); -GtkWidget* gtk_tree_new (void); -void gtk_tree_append (GtkTree *tree, - GtkWidget *child); -void gtk_tree_prepend (GtkTree *tree, - GtkWidget *child); -void gtk_tree_insert (GtkTree *tree, - GtkWidget *child, - gint position); + void (* selection_changed) (GtkTree *tree); + void (* select_child) (GtkTree *tree, + GtkWidget *child); + void (* unselect_child) (GtkTree *tree, + GtkWidget *child); +}; +guint gtk_tree_get_type (void); +GtkWidget* gtk_tree_new (void); +void gtk_tree_append (GtkTree *tree, + GtkWidget *child); +void gtk_tree_prepend (GtkTree *tree, + GtkWidget *child); +void gtk_tree_insert (GtkTree *tree, + GtkWidget *child, + gint position); +void gtk_tree_remove_item (GtkTree *tree, + GtkWidget *child); +void gtk_tree_remove_items (GtkTree *tree, + GList *items); +void gtk_tree_clear_items (GtkTree *tree, + gint start, + gint end); +void gtk_tree_select_item (GtkTree *tree, + gint item); +void gtk_tree_unselect_item (GtkTree *tree, + gint item); +void gtk_tree_select_child (GtkTree *tree, + GtkWidget *child); +void gtk_tree_unselect_child (GtkTree *tree, + GtkWidget *child); +gint gtk_tree_child_position (GtkTree *tree, + GtkWidget *child); +void gtk_tree_set_selection_mode (GtkTree *tree, + GtkSelectionMode mode); +void gtk_tree_set_view_mode (GtkTree *tree, + GtkTreeViewMode mode); #ifdef __cplusplus } #endif /* __cplusplus */ |