
Gnome::Gtk4::CustomLayout
Description
Gnome::Gtk4::CustomLayout uses closures for size negotiation.
A Gnome::Gtk4::CustomLayout uses closures matching to the old Gnome::Gtk4::Widget virtual functions for size negotiation, as a convenience API to ease the porting towards the corresponding Gnome::Gtk4::LayoutManager virtual functions.
Uml Diagram

Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
new-customlayout
Creates a new legacy layout manager.
Legacy layout managers map to the old Gnome::Gtk4::Widget size negotiation virtual functions, and are meant to be used during the transition from layout containers to layout manager delegates.
method new-customlayout ( GtkCustomRequestModeFunc &request-mode, GtkCustomMeasureFunc &measure, GtkCustomAllocateFunc &allocate --> Gnome::Gtk4::CustomLayout )
GtkCustomRequestModeFunc &request-mode; a function to retrieve the
enumeration GtkSizeRequestMode defined in Gnome::Gtk4::T-enums
of the widget using the layout; the default request mode isGTK_SIZE_REQUEST_CONSTANT_SIZE
. The function must be specified with the following signature;:( N-Object $widget --
GEnum )>.GtkCustomMeasureFunc &measure; a function to measure the widget using the layout manager. The function must be specified with the following signature;
:( N-Object $widget, GEnum $orientation, gint $for-size, gint-ptr $minimum, gint-ptr $natural, gint-ptr $minimum-baseline, gint-ptr $natural-baseline )
.GtkCustomAllocateFunc &allocate; a function to allocate the children of the widget using the layout manager. The function must be specified with the following signature;
:( N-Object $widget, gint $width, gint $height, gint $baseline )
.