diff --git a/object.go b/object.go index 2d0187f..80712fc 100644 --- a/object.go +++ b/object.go @@ -179,9 +179,17 @@ type ContainerBox interface { SetLayout (Layout) } +// LayoutHints are passed to a layout to tell it how to arrange child boxes. +type LayoutHints struct { + Min image.Point + Max *image.Point + Gap image.Point +} + // Layout can be given to a ContainerBox to arrange child objects. type Layout interface { - Arrange (image.Rectangle, Gap, []Box) + MinimumSize (LayoutHints, []Box) image.Point + Arrange (LayoutHints, []Box) } // Window is an operating system window. It can contain one object.