summaryrefslogtreecommitdiff
path: root/gtk/gtktreeprivate.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@gnome.org>2001-07-22 20:09:00 +0000
committerAnders Carlsson <andersca@src.gnome.org>2001-07-22 20:09:00 +0000
commitf4ca329027a0fa5b96738bec5b099f08cb168355 (patch)
tree9ed81a604a73de8d4402562c07cb3f3928988d09 /gtk/gtktreeprivate.h
parent5751ed9e167df757c5ebb74f8be1943b844a78dc (diff)
downloadgtk+-f4ca329027a0fa5b96738bec5b099f08cb168355.tar.gz
Add support for animating expanders.
2001-07-22 Anders Carlsson <andersca@gnome.org> * gtk/gtktreeview.c (gtk_tree_view_class_init): Replace the expander_height and expander_width properties with a single property, expander_size. (gtk_tree_view_init): Set the tab_offset to expander_size plus some padding. (gtk_tree_view_unrealize): Remove the expand/collapse timeout if it exists. (coords_are_over_arrow): Fix a small bug. (gtk_tree_view_motion_draw_column_motion_arrow): Use expander_size. (gtk_tree_view_draw_focus): Use "treeview" instead of "add-mode" as detail when drawing the focus. (gtk_tree_view_bin_expose): Use "treeview-drop-indicator" instead of "add-mode" as detail when drawing the focus. (gtk_tree_view_deleted): If we have a node currently being expanded or collapsed, remove the timeout and set the node to NULL. (gtk_tree_view_queue_draw_arrow): New function that just redraws the arrow of a node. (gtk_tree_view_draw_arrow): Use expander_size instead of expander_width/expander_height, also pass a different expander_style to gtk_paint_expander depending on the state of the node being drawn. (expand_collapse_timeout): New function for expanding or collapsing a node depending on the previous state. (gtk_tree_view_real_expand_row): Add timeout and set correct state for node being expanded. (gtk_tree_view_real_collapse_row): Add timeout and set correct state for node being collapsed. * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): Add information about the node currently being expanded or collapsed, and also a timeout id. * gtk/gtkstyle.h (struct _GtkStyleClass): Replace is_open with expander_style for draw_expander. * gtk/gtkstyle.c (gtk_draw_expander): Replace is_open with expander_style. (create_expander_affine): New function for creating an expander affine. (apply_affine_on_point): New function for applying an affine to a point. (gtk_default_draw_expander): Modified to take expander_style instead of is_open, and to draw the rectangle rotated differently depending on the expander style. (gtk_paint_expander): Replace is_open with expander_style. * gtk/gtkrbtree.h: Add expander states to GtkRBNodeColor. * gtk/gtkenums.h: Add expander style enum.
Diffstat (limited to 'gtk/gtktreeprivate.h')
-rw-r--r--gtk/gtktreeprivate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtktreeprivate.h b/gtk/gtktreeprivate.h
index 9ca4240c8d..bf76f19645 100644
--- a/gtk/gtktreeprivate.h
+++ b/gtk/gtktreeprivate.h
@@ -121,6 +121,11 @@ struct _GtkTreeViewPrivate
GtkRBNode *prelight_node;
GtkRBTree *prelight_tree;
+ /* The node that's currently being collapsed or expanded */
+ GtkRBNode *expanded_collapsed_node;
+ GtkRBTree *expanded_collapsed_tree;
+ guint expand_collapse_timeout;
+
/* Selection information */
GtkTreeSelection *selection;