2019-03-05 20:52:18 +00:00
|
|
|
package ui
|
|
|
|
|
|
|
|
import (
|
|
|
|
"opslag.de/schobers/geom"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Control interface {
|
2019-04-11 21:38:32 +00:00
|
|
|
Arrange(Context, geom.RectangleF32, geom.PointF32, Control)
|
2020-05-16 13:37:53 +00:00
|
|
|
DesiredSize(Context, geom.PointF32) geom.PointF32
|
2020-05-15 17:00:43 +00:00
|
|
|
Handle(Context, Event) bool
|
2019-03-05 20:52:18 +00:00
|
|
|
Render(Context)
|
|
|
|
|
|
|
|
Bounds() geom.RectangleF32
|
2020-05-16 11:46:07 +00:00
|
|
|
Disable()
|
|
|
|
Enable()
|
|
|
|
IsDisabled() bool
|
2019-04-11 21:38:32 +00:00
|
|
|
IsInBounds(p geom.PointF32) bool
|
|
|
|
IsOver() bool
|
2019-03-05 21:42:57 +00:00
|
|
|
Offset() geom.PointF32
|
2020-05-15 17:00:43 +00:00
|
|
|
|
2019-04-11 21:38:32 +00:00
|
|
|
Parent() Control
|
2019-03-05 20:52:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type RootControl interface {
|
|
|
|
Control
|
|
|
|
|
2019-05-01 07:40:59 +00:00
|
|
|
Init(Context) error
|
2019-03-05 20:52:18 +00:00
|
|
|
}
|