]> Pileus Git - ~andy/gtk/commit
Add support for animating expanders.
authorAnders Carlsson <andersca@gnome.org>
Sun, 22 Jul 2001 20:09:00 +0000 (20:09 +0000)
committerAnders Carlsson <andersca@src.gnome.org>
Sun, 22 Jul 2001 20:09:00 +0000 (20:09 +0000)
commitf4ca329027a0fa5b96738bec5b099f08cb168355
tree9ed81a604a73de8d4402562c07cb3f3928988d09
parent5751ed9e167df757c5ebb74f8be1943b844a78dc
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.
13 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkenums.h
gtk/gtkrbtree.h
gtk/gtkstyle.c
gtk/gtkstyle.h
gtk/gtktreeprivate.h
gtk/gtktreeview.c