Class
GtkViewport
[−]
Description [src]
final class Gtk.Viewport : Gtk.Widget
implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Scrollable {
/* No available fields */
}
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.
CSS nodes
GtkViewport
has a single CSS node with name viewport
.
Accessibility
Until GTK 4.10, GtkViewport
used the GTK_ACCESSIBLE_ROLE_GROUP
role.
Starting from GTK 4.12, GtkViewport
uses the GTK_ACCESSIBLE_ROLE_GENERIC
role.
[−]
Instance methods
gtk_viewport_get_scroll_to_focus
Gets whether the viewport is scrolling to keep the focused child in view.
gtk_viewport_set_scroll_to_focus
Sets whether the viewport should automatically scroll to keep the focused child in view.
[+]
Methods inherited from GtkAccessible (20)
[+]
Methods inherited from GtkBuildable (1)
[+]
Methods inherited from GtkScrollable (9)
[−]
Properties
[+]
Properties inherited from GtkAccessible (1)
[+]