aboutsummaryrefslogtreecommitdiffstats
path: root/gui/layout/layout.go
blob: 4d8e6166ec481879cd09b78015248cae26b9d749 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package layout

import (
	"image"
)

// Layout represents any graphical layout
//
// Lay represents the way to divide space among your childs.
// It takes a parameter of how much space is available,
// and returns where exactly to put its childs.
//
// Intercept transforms an Env channel to another.
// This way the Layout can emit its own Events, re-emit previous ones,
// or even stop an event from propagating, think win.MoScroll.
// It can be a no-op.
type Layout interface {
	Lay(image.Rectangle) []image.Rectangle
	Intercepter
}