:right-sidebar: True CustomLayout =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: CustomLayout(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.LayoutManager`, :class:`~gi.repository.GObject.Object` ``GtkCustomLayout`` uses closures for size negotiation. A `GtkCustomLayout `uses closures matching to the old ``GtkWidget`` virtual functions for size negotiation, as a convenience API to ease the porting towards the corresponding `GtkLayoutManager virtual functions. Constructors ------------ .. rst-class:: interim-class .. class:: CustomLayout :no-index: .. classmethod:: new(request_mode: ~typing.Callable[[~gi.repository.Gtk.Widget], ~gi.repository.Gtk.SizeRequestMode] | None, measure: ~typing.Callable[[~gi.repository.Gtk.Widget, ~gi.repository.Gtk.Orientation, int], tuple[int, int, int, int]], allocate: ~typing.Callable[[~gi.repository.Gtk.Widget, int, int, int], None]) -> ~gi.repository.Gtk.LayoutManager Creates a new legacy layout manager. Legacy layout managers map to the old ``GtkWidget`` size negotiation virtual functions, and are meant to be used during the transition from layout containers to layout manager delegates. :param request_mode: a function to retrieve the ``GtkSizeRequestMode`` of the widget using the layout; the default request mode is :const:`~gi.repository.Gtk.SizeRequestMode.CONSTANT_SIZE` :param measure: a function to measure the widget using the layout manager :param allocate: a function to allocate the children of the widget using the layout manager