make-containers-better #10

Merged
sashakoshka merged 20 commits from make-containers-better into main 2023-03-04 14:26:34 -07:00
Showing only changes of commit 285cb4810f - Show all commits

View File

@ -18,18 +18,17 @@ type Layout interface {
// and changes the position of the entiries in the slice so that they
// are properly laid out. The given width and height should not be less
// than what is returned by MinimumSize.
Arrange (entries []LayoutEntry, margin int, bounds image.Rectangle)
Arrange (entries []LayoutEntry, bounds image.Rectangle)
// MinimumSize returns the minimum width and height that the layout
// needs to properly arrange the given slice of layout entries.
MinimumSize (entries []LayoutEntry, margin int) (width, height int)
MinimumSize (entries []LayoutEntry) (width, height int)
// FlexibleHeightFor Returns the minimum height the layout needs to lay
// out the specified elements at the given width, taking into account
// flexible elements.
FlexibleHeightFor (
entries []LayoutEntry,
margin int,
squeeze int,
) (
height int,