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.
LayoutGidBuilder builder() static nothrowGet builder for [gtk.layout.Layout] Returns: New builder objectgdk.window.Window getBinWindow() nothrowRetrieve the bin window of the layout used for drawing operations. Returns: a #GdkWindowgtk.adjustment.Adjustment getHadjustment() nothrowThis 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) nothrowGets the size that has been set on the layout, and that determines the total extents of the layout’s scrollbar area. See gtk_layout_set_size ().gtk.adjustment.Adjustment getVadjustment() nothrowThis 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) nothrowMoves a current child of layout to a new position.void put(gtk.widget.Widget childWidget, int x, int y) nothrowAdds child_widget to layout, at position (`x`,`y`). layout becomes the new parent container of child_widget.void setHadjustment(gtk.adjustment.Adjustment adjustment = null) nothrowSets the horizontal scroll adjustment for the layout.void setVadjustment(gtk.adjustment.Adjustment adjustment = null) nothrowSets 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 implementation template for gtk.layout.Layout
Fluent builder for gtk.layout.Layout