diff options
author | Anders Carlsson <andersca@gnome.org> | 2001-07-22 20:09:00 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@src.gnome.org> | 2001-07-22 20:09:00 +0000 |
commit | f4ca329027a0fa5b96738bec5b099f08cb168355 (patch) | |
tree | 9ed81a604a73de8d4402562c07cb3f3928988d09 /gtk/gtkstyle.h | |
parent | 5751ed9e167df757c5ebb74f8be1943b844a78dc (diff) | |
download | gtk+-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/gtkstyle.h')
-rw-r--r-- | gtk/gtkstyle.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkstyle.h b/gtk/gtkstyle.h index e49e4704b2..291dfdc392 100644 --- a/gtk/gtkstyle.h +++ b/gtk/gtkstyle.h @@ -379,7 +379,7 @@ struct _GtkStyleClass const gchar *detail, gint x, gint y, - gboolean is_open); + GtkExpanderStyle expander_style); void (*draw_layout) (GtkStyle *style, GdkWindow *window, GtkStateType state_type, @@ -587,7 +587,7 @@ void gtk_draw_expander (GtkStyle *style, GtkStateType state_type, gint x, gint y, - gboolean is_open); + GtkExpanderStyle expander_style); void gtk_draw_layout (GtkStyle *style, GdkWindow *window, GtkStateType state_type, @@ -804,7 +804,7 @@ void gtk_paint_expander (GtkStyle *style, const gchar *detail, gint x, gint y, - gboolean is_open); + GtkExpanderStyle expander_style); void gtk_paint_layout (GtkStyle *style, GdkWindow *window, GtkStateType state_type, |