gtk.layout
Module for [Layout] class
Types 3
#GtkLayout is similar to #GtkDrawingArea in that it’s a “blank slate” and doesn’t do anything except paint a blank background by default. It’s different in that it supports scrolling natively due to implementing #GtkScrollable, and can contain child widgets since it’s a #GtkContainer.
If you just want to draw, a #GtkDrawingArea is a better choice since it has lower overhead. If you just need to position child widgets at specific points, then #GtkFixed provides that functionality on its own.
When handling expose events on a #GtkLayout, you must draw to the #GdkWindow returned by [gtk.layout.Layout.getBinWindow], rather than to the one returned by [gtk.widget.Widget.getWindow] as you would for a #GtkDrawingArea.
Layout self()Returns `this`, for use in `with` statements.LayoutGidBuilder builder()Get builder for [gtk.layout.Layout] Returns: New builder objectuint height() @propertyvoid height(uint propval) @propertyuint width() @propertyvoid width(uint propval) @propertygdk.window.Window getBinWindow()Retrieve the bin window of the layout used for drawing operations. Returns: a #GdkWindowgtk.adjustment.Adjustment getHadjustment()This function should only be called after the layout has been placed in a #GtkScrolledWindow or otherwise configured for scrolling. It returns the #GtkAdjustment used for communication between the ...void getSize(out uint width, out uint height)Gets the size that has been set on the layout, and that determines the total extents of the layout’s scrollbar area. See gtklayoutset_size ().gtk.adjustment.Adjustment getVadjustment()This function should only be called after the layout has been placed in a #GtkScrolledWindow or otherwise configured for scrolling. It returns the #GtkAdjustment used for communication between the ...void move(gtk.widget.Widget childWidget, int x, int y)Moves a current child of layout to a new position.void put(gtk.widget.Widget childWidget, int x, int y)Adds childwidget to layout, at position (`x`,`y`). layout becomes the new parent container of childwidget.void setHadjustment(gtk.adjustment.Adjustment adjustment = null)Sets the horizontal scroll adjustment for the layout.void setSize(uint width, uint height)Sets the size of the scrollable area of the layout.void setVadjustment(gtk.adjustment.Adjustment adjustment = null)Sets the vertical scroll adjustment for the layout.this(gtk.adjustment.Adjustment hadjustment = null, gtk.adjustment.Adjustment vadjustment = null)Creates a new #GtkLayout. Unless you have a specific adjustment you’d like the layout to use for scrolling, pass null for hadjustment and vadjustment.Fluent builder for [gtk.layout.Layout]
Layout build()