Package: gtk

Class gtk-scrolled-window

Superclasses

gtk-bin, gtk-container, gtk-widget, g-initially-unowned, gtk-buildable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

hadjustment
The "hadjustment" property of type gtk-adjustment (Read / Write / Construct)
The gtk-adjustment for the horizontal position.
hscrollbar-policy
The "hscrollbar-policy" property of type gtk-policy-type (Read / Write)
When the horizontal scrollbar is displayed.
Default value: :automatic
kinetic-scrolling
The "kinetic-scrolling" property of type :boolean (Read / Write]
The kinetic scrolling behavior flags. Kinetic scrolling only applies to devices with source :touchscreen
Default value: true
Since 3.4
min-content-height
The "min-content-height" property of type :int (Read / Write)
The minimum content height of scrolled-window, or -1 if not set.
Allowed values: >= G_MAXULONG
Default value: -1
Since 3.0
min-content-width
The "min-content-width" property of type :int (Read / Write)
The minimum content width of scrolled-window, or -1 if not set.
Allowed values: >= G_MAXULONG
Default value: -1
Since 3.0
shadow-type
The "shadow-type" property of type gtk-shadow-type (Read / Write)
Style of bevel around the contents.
Default value: :none
vadjustment
The "vadjustment" property of type gtk-adjustment (Read / Write / Construct)
The gtk-adjustment for the vertical position.
vscrollbar-policy
The "vscrollbar-policy" property of type gtk-policy-type (Read / Write)
When the vertical scrollbar is displayed.
Default value: :automatic
window-placement
The "window-placement" property of type gtk-corner-type (Read / Write)
Where the contents are located with respect to the scrollbars. This property only takes effect if "window-placement-set" is true.
Default value: :left
window-placement-set
The "window-placement-set" property of type :boolean (Read / Write)
Whether "window-placement" should be used to determine the location of the contents with respect to the scrollbars. Otherwise, the "gtk-scrolled-window-placement" setting is used.
Default value: nil
Since 2.10

Details

gtk-scrolled-window is a gtk-bin subclass: it is a container the accepts a single child widget. gtk-scrolled-window adds scrollbars to the child widget and optionally draws a beveled frame around the child widget.

The scrolled window can work in two ways. Some widgets have native scrolling support; these widgets implement the gtk-scrollable interface. Widgets with native scroll support include gtk-tree-view, gtk-text-view, and gtk-layout.

For widgets that lack native scrolling support, the gtk-viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use gtk-viewport to scroll child widgets such as gtk-grid, gtk-box, and so on.

If a widget has native scrolling abilities, it can be added to the gtk-scrolled-window with the function gtk-container-add. If a widget does not, you must first add the widget to a gtk-viewport, then add the gtk-viewport to the scrolled window. The convenience function gtk-scrolled-window-add-with-viewport does exactly this, so you can ignore the presence of the viewport.

The position of the scrollbars is controlled by the scroll adjustments. See the function gtk-adjustment for the fields in an adjustment - for gtk-scrollbar, used by gtk-scrolled-window, the value slot represents the position of the scrollbar, which must be between the lower slot and upper - page-size. The page-size slot represents the size of the visible scrollable area. The step-increment and page-increment slot 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-scrolled-window does not behave quite as you would like, or does not have exactly the right layout, it is very possible to set up your own scrolling with gtk-scrollbar and for example a gtk-grid.

Style Property Details

The "scrollbar-spacing" style property
"scrollbar-spacing" of type :int (Read)
Number of pixels between the scrollbars and the scrolled window.
Allowed values: >= 0
Default value: 3

The "scrollbars-within-bevel" style property
"scrollbars-within-bevel" of type :boolean (Read)
Whether to place scrollbars within the scrolled window's bevel.
Default value: nil
Since 2.12

Signal Details

The "move-focus-out" signal
 lambda (scrolled-window direction-type)   : Action      
The "move-focus-out" signal is a keybinding signal which gets emitted when focus is moved away from the scrolled window by a keybinding. The "move-focus" signal is emitted with direction-type on this scrolled windows toplevel parent in the container hierarchy. The default bindings for this signal are Tab+Ctrl and Tab+Ctrl+Shift.
scrolled-window
A gtk-scrolled-window.
direction-type
Either :forward or :backward.
The "scroll-child" signal
 lambda (scrolled-window scroll horizontal)   : Action        
The "scroll-child" signal is a keybinding signal which gets emitted when a keybinding that scrolls is pressed. The horizontal or vertical adjustment is updated which triggers a signal that the scrolled windows child may listen to and scroll itself.
scrolled-window
a gtk-scrolled-window.
scroll
A gtk-scroll-type describing how much to scroll.
horizontal
Whether the keybinding scrolls the child horizontally or not.
 

Slot Access Functions

Inherited Slot Access Functions

2013-6-20