zntg/ui/control.go
Sander Schobers 75fce53716 Added Paragraph control.
Extended DesiredSize method with extra arguments that tells the control how much space is available for the parent control (note: this might not be the actual given size when Arrange is called on the control).
2020-05-16 15:37:53 +02:00

29 lines
460 B
Go

package ui
import (
"opslag.de/schobers/geom"
)
type Control interface {
Arrange(Context, geom.RectangleF32, geom.PointF32, Control)
DesiredSize(Context, geom.PointF32) geom.PointF32
Handle(Context, Event) bool
Render(Context)
Bounds() geom.RectangleF32
Disable()
Enable()
IsDisabled() bool
IsInBounds(p geom.PointF32) bool
IsOver() bool
Offset() geom.PointF32
Parent() Control
}
type RootControl interface {
Control
Init(Context) error
}