diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-26 09:59:02 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-26 10:15:56 +0900 |
commit | 3fe0fb4ed95a3d5c51a049a24147e628e6965d62 (patch) | |
tree | 0f1d9594d0dc787643509012cac76fe3871a6b5e /gtk/gtkscrollable.h | |
parent | 04c1337bdae99b2c45e44e20c9432a72e5e6602c (diff) | |
download | gtk+-3fe0fb4ed95a3d5c51a049a24147e628e6965d62.tar.gz |
Added GtkScrollablePolicy property to scrollable interface
This patch adds the GtkScrollablePolicy type property to GtkScrollable
and implements it in all subclasses. GtkScrolledWindow observes this
property to make a good guess about when to show/hide scrollbars for
height-for-width content.
Most scrollable children do not do height-for-width *yet* but
most certainly will (toolpalette, treeview, iconview, textview
widgets all TODO), for scrollable widgets that do have a minimum
and natural size, it's important for them to observe the state
of this property in order to properly drive the scroll adjustments
according to the desired GtkScrollablePolicy. This patch makes
GtkViewport do this.
Patch also adds tests/testscrolledwindow.c to display the effects
of this property.
Diffstat (limited to 'gtk/gtkscrollable.h')
-rw-r--r-- | gtk/gtkscrollable.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gtk/gtkscrollable.h b/gtk/gtkscrollable.h index fdb1c11273..8f15a43d72 100644 --- a/gtk/gtkscrollable.h +++ b/gtk/gtkscrollable.h @@ -25,6 +25,7 @@ #define __GTK_SCROLLABLE_H__ #include <gtk/gtkadjustment.h> +#include <gtk/gtkenums.h> G_BEGIN_DECLS @@ -42,13 +43,19 @@ struct _GtkScrollableInterface }; /* Public API */ -GType gtk_scrollable_get_type (void) G_GNUC_CONST; -GtkAdjustment *gtk_scrollable_get_hadjustment (GtkScrollable *scrollable); -void gtk_scrollable_set_hadjustment (GtkScrollable *scrollable, - GtkAdjustment *hadjustment); -GtkAdjustment *gtk_scrollable_get_vadjustment (GtkScrollable *scrollable); -void gtk_scrollable_set_vadjustment (GtkScrollable *scrollable, - GtkAdjustment *vadjustment); +GType gtk_scrollable_get_type (void) G_GNUC_CONST; +GtkAdjustment *gtk_scrollable_get_hadjustment (GtkScrollable *scrollable); +void gtk_scrollable_set_hadjustment (GtkScrollable *scrollable, + GtkAdjustment *hadjustment); +GtkAdjustment *gtk_scrollable_get_vadjustment (GtkScrollable *scrollable); +void gtk_scrollable_set_vadjustment (GtkScrollable *scrollable, + GtkAdjustment *vadjustment); +GtkScrollablePolicy gtk_scrollable_get_hscroll_policy (GtkScrollable *scrollable); +void gtk_scrollable_set_hscroll_policy (GtkScrollable *scrollable, + GtkScrollablePolicy policy); +GtkScrollablePolicy gtk_scrollable_get_vscroll_policy (GtkScrollable *scrollable); +void gtk_scrollable_set_vscroll_policy (GtkScrollable *scrollable, + GtkScrollablePolicy policy); G_END_DECLS |