Revised layout interface
This commit is contained in:
parent
d6baf82a94
commit
9efeaef8a8
10
object.go
10
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.
|
||||
|
|
Loading…
Reference in New Issue