![]() |
![]() |
This container accepts a single child widget. It adds scrollbars to the child widget and optionally draws a beveled frame around the child widget. The scrolled window can work in two ways: 1) Some widgets have native scrolling support; these widgets handle certain Gtk::Adjustment signals. Widgets with native scroll support include Gtk::TreeView, Gtk::TextView, and Gtk::Layout. 2) For widgets that lack native scrolling support, such as Gtk::Table, Gtk::Box, and so on, the widget will be placed inside a Gtk::Viewport.
The position of the scrollbars is controlled by the scroll adjustments. See Gtk::Adjustment for the fields in an adjustment - for Gtk::Scrollbar, used by Gtk::ScrolledWindow, the "value" field represents the position of the scrollbar, which must be between the "lower" field and "upper - page_size." The "page_size" field represents the size of the visible scrollable area. The "step_increment" and "page_increment" fields are used when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).
If a Gtk::ScrolledWindow doesn't behave quite as you would like, or doesn't have exactly the right layout, it's very possible to set up your own scrolling with Gtk::Scrollbar and, for example, a Gtk::Table.
Public Member Functions | |
virtual | ~ScrolledWindow () |
GtkScrolledWindow* | gobj () |
Provides access to the underlying C GtkObject. | |
const GtkScrolledWindow* | gobj () const |
Provides access to the underlying C GtkObject. | |
ScrolledWindow () | |
ScrolledWindow (Adjustment& hadjustment, Adjustment& vadjustment) | |
void | set_hadjustment (Gtk::Adjustment* hadjustment=0) |
void | set_vadjustment (Gtk::Adjustment* vadjustment=0) |
void | set_hadjustment (Gtk::Adjustment& hadjustment) |
void | set_vadjustment (Gtk::Adjustment& vadjustment) |
Gtk::Adjustment* | get_hadjustment () |
const Gtk::Adjustment* | get_hadjustment () const |
Gtk::Adjustment* | get_vadjustment () |
const Gtk::Adjustment* | get_vadjustment () const |
void | set_policy (PolicyType hscrollbar_policy, PolicyType vscrollbar_policy) |
void | get_policy (PolicyType& hscrollbar_policy, PolicyType& vscrollbar_policy) const |
Retrieves the current policy values for the horizontal and vertical scrollbars. | |
void | set_placement (CornerType window_placement) |
CornerType | get_placement () const |
Gets the placement of the scrollbars for the scrolled window. | |
void | set_shadow_type (ShadowType type) |
Changes the type of shadow drawn around the contents of scrolled_window . | |
ShadowType | get_shadow_type () const |
Gets the shadow type of the scrolled window. | |
virtual void | add (Gtk::Widget& widget) |
Puts the child inside a Gtk::Viewport if it doesn't have native scrolling capability. | |
bool | get_vscrollbar_visible () const |
bool | get_hscrollbar_visible () const |
Gtk::HScrollbar* | get_hscrollbar () |
const Gtk::HScrollbar* | get_hscrollbar () const |
Gtk::VScrollbar* | get_vscrollbar () |
const Gtk::VScrollbar* | get_vscrollbar () const |
Glib::SignalProxy2< void, ScrollType, bool > | signal_scroll_child () |
Glib::SignalProxy1< void, DirectionType > | signal_move_focus_out () |
Glib::PropertyProxy<Gtk::Adjustment*> | property_hadjustment () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<Gtk::Adjustment*> | property_vadjustment () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<PolicyType> | property_hscrollbar_policy () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<PolicyType> | property_vscrollbar_policy () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<CornerType> | property_window_placement () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<ShadowType> | property_shadow_type () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Protected Member Functions | |
virtual void | on_scroll_child (ScrollType scroll, bool horizontal) |
virtual void | on_move_focus_out (DirectionType direction) |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::ScrolledWindow* | wrap (GtkScrolledWindow* object, bool take_copy=false) |
|
|
|
|
|
|
|
Puts the child inside a Gtk::Viewport if it doesn't have native scrolling capability.
Reimplemented from Gtk::Container. |
|
|
|
|
|
|
|
|
|
|
|
Gets the placement of the scrollbars for the scrolled window. See set_placement().
|
|
Retrieves the current policy values for the horizontal and vertical scrollbars. See set_policy().
|
|
Gets the shadow type of the scrolled window. See set_shadow_type().
|
|
|
|
|
|
|
|
|
|
|
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Bin. |
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Bin. |
|
|
|
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
|
|
|
|
|
|
|
|
Changes the type of shadow drawn around the contents of scrolled_window .
|
|
|
|
|
|
|
|
|
|
|