zntg/ui/control.go
2019-03-06 18:22:30 +01:00

26 lines
407 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
Offset() geom.PointF32
OnClick(ClickFn)
OnDragStart(DragStartFn)
OnDragMove(DragMoveFn)
OnDragEnd(DragEndFn)
}
type RootControl interface {
Control
Init(Context)
}