Package: gtk

Class gtk:viewport

Superclasses

gtk:bin, gtk:container, gtk:widget, gtk:buildable, gtk:scrollable, gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

shadow-type
The shadow-type property of type gtk:shadow-type (Read / Write)
Determines how the shadowed box around the viewport is drawn.
Default value: :in

Details

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

If a widget has native scrolling abilities, such as the gtk:text-view, gtk:tree-view or gtk:icon-view widgets, it can be added to a gtk:scrolled-window widget with the gtk:container-add function. If a widget does not, you must first add the widget to a gtk:viewport widget, then add the viewport to the scrolled window. The gtk:container-add function does this automatically if a child that does not implement the gtk:scrollable interface is added to a gtk:scrolled-window widget, so you can ignore the presence of the viewport.

The gtk:viewport widget will start scrolling content only if allocated less than the child widget's minimum size in a given orientation.

CSS nodes

The gtk:viewport widget has a single CSS node with name viewport.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

#2023-3-29