zntg/ui/control.go
Sander Schobers 19daffd110 Added UI elements.
Reversed order of operands when comparing with nil/0 .
2019-03-05 21:52:18 +01:00

25 lines
383 B
Go

package ui
import (
"opslag.de/schobers/geom"
)
type Control interface {
Arrange(Context, geom.RectangleF32, geom.PointF32)
DesiredSize(Context) geom.PointF32
Handle(Context, Event)
Render(Context)
Bounds() geom.RectangleF32
OnClick(ClickFn)
OnDragStart(DragStartFn)
OnDragMove(DragMoveFn)
OnDragEnd(DragEndFn)
}
type RootControl interface {
Control
Init(Context)
}