gtk.viewport
Module for [Viewport] class
Types 3
The #GtkViewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use GtkViewport to scroll child widgets such as #GtkGrid, #GtkBox, and so on.
If a widget has native scrolling abilities, such as #GtkTextView, #GtkTreeView or #GtkIconView, it can be added to a #GtkScrolledWindow with [gtk.container.Container.add]. If a widget does not, you must first add the widget to a #GtkViewport, then add the viewport to the scrolled window. [gtk.container.Container.add] does this automatically if a child that does not implement #GtkScrollable is added to a #GtkScrolledWindow, so you can ignore the presence of the viewport.
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.
ViewportGidBuilder builder()Get builder for [gtk.viewport.Viewport] Returns: New builder objectgtk.types.ShadowType shadowType() @propertyvoid shadowType(gtk.types.ShadowType propval) @propertygdk.window.Window getBinWindow()Gets the bin window of the #GtkViewport. Returns: a #GdkWindowgtk.adjustment.Adjustment getHadjustment()Returns the horizontal adjustment of the viewport. Returns: the horizontal adjustment of viewport.gtk.types.ShadowType getShadowType()Gets the shadow type of the #GtkViewport. See [gtk.viewport.Viewport.setShadowType]. Returns: the shadow typegtk.adjustment.Adjustment getVadjustment()Returns the vertical adjustment of the viewport. Returns: the vertical adjustment of viewport.gdk.window.Window getViewWindow()Gets the view window of the #GtkViewport. Returns: a #GdkWindowvoid setHadjustment(gtk.adjustment.Adjustment adjustment = null)Sets the horizontal adjustment of the viewport.void setShadowType(gtk.types.ShadowType type)Sets the shadow type of the viewport.void setVadjustment(gtk.adjustment.Adjustment adjustment = null)Sets the vertical adjustment of the viewport.this(gtk.adjustment.Adjustment hadjustment = null, gtk.adjustment.Adjustment vadjustment = null)Creates a new #GtkViewport with the given adjustments, or with default adjustments if none are given.T shadowType(gtk.types.ShadowType propval)