It derives from <GtkWidget>.
Implements scrollability for widgets that don’t support scrolling on their own.
Use <GtkViewport> to scroll child widgets such as
<GtkGrid>, <GtkBox>, and so on.
The <GtkViewport> will start scrolling content
only if allocated less than the child widget’s minimum size in a given
orientation.
<GtkViewport> has a single CSS node with name
viewport.
Until GTK 4.10, <GtkViewport> used the
Gtk.AccessibleRole.group role.
Starting from GTK 4.12, <GtkViewport> uses the
Gtk.AccessibleRole.generic role.
The child widget.
Its value is a <GtkWidget>, or #f.
Set it with (set! (viewport:child self) value).
Whether to scroll when the focus changes.
Before 4.6.2, this property was mistakenly defaulting to FALSE, so if your code needs to work with older versions, consider setting it explicitly to TRUE.
Its value is a boolean.
Set it with (set! (viewport:scroll-to-focus self) value).
Gets the child widget of self.
Passed: a <GtkViewport>.
Returned: a <GtkWidget>, or #f.
the child widget of self
Gets whether the viewport is scrolling to keep the focused child in view.
Passed: a <GtkViewport>.
Returned: a boolean.
#t if the viewport keeps the focus child scrolled to view
Creates a new <GtkViewport>.
The new viewport uses the given adjustments, or default adjustments if none are given.
Passed, or left out: a <GtkAdjustment>, or
#f.
horizontal adjustment
Passed, or left out: a <GtkAdjustment>, or
#f.
vertical adjustment
Returned: a <GtkWidget>.
a new <GtkViewport>
Scrolls a descendant of the viewport into view.
The viewport and the descendant must be visible and mapped for this function to work, otherwise no scrolling will be performed.
Passed: a <GtkViewport>.
Passed: a <GtkWidget>.
a descendant widget of the viewport
Passed, or left out: a <GtkScrollInfo>, or
#f.
details of how to perform the scroll operation or NULL to scroll into view
Sets the child widget of self.
Passed: a <GtkViewport>.
Passed, or left out: a <GtkWidget>, or #f.
the child widget
Sets whether the viewport should automatically scroll to keep the focused child in view.
Passed: a <GtkViewport>.
Passed: a boolean.
whether to keep the focus widget scrolled to view