2019-03-05 20:52:18 +00:00
|
|
|
package ui
|
|
|
|
|
|
|
|
import "opslag.de/schobers/geom"
|
|
|
|
|
|
|
|
var _ Control = &Proxy{}
|
|
|
|
|
|
|
|
type Proxy struct {
|
|
|
|
Content Control
|
|
|
|
}
|
|
|
|
|
2019-04-11 21:38:32 +00:00
|
|
|
func (p *Proxy) Arrange(ctx Context, bounds geom.RectangleF32, offset geom.PointF32, parent Control) {
|
|
|
|
p.Content.Arrange(ctx, bounds, offset, parent)
|
2019-03-05 20:52:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Proxy) DesiredSize(ctx Context) geom.PointF32 {
|
|
|
|
return p.Content.DesiredSize(ctx)
|
|
|
|
}
|
|
|
|
|
2020-05-15 17:00:43 +00:00
|
|
|
func (p *Proxy) Handle(ctx Context, e Event) bool {
|
|
|
|
return p.Content.Handle(ctx, e)
|
2019-03-05 20:52:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Proxy) Render(ctx Context) {
|
|
|
|
p.Content.Render(ctx)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Proxy) Bounds() geom.RectangleF32 {
|
|
|
|
return p.Content.Bounds()
|
|
|
|
}
|
|
|
|
|
2019-04-11 21:38:32 +00:00
|
|
|
func (p *Proxy) IsInBounds(pt geom.PointF32) bool { return p.Content.IsInBounds(pt) }
|
|
|
|
|
|
|
|
func (p *Proxy) IsOver() bool { return p.Content.IsOver() }
|
|
|
|
|
2019-03-05 21:42:57 +00:00
|
|
|
func (p *Proxy) Offset() geom.PointF32 { return p.Content.Offset() }
|
|
|
|
|
2019-04-11 21:38:32 +00:00
|
|
|
func (p *Proxy) Parent() Control { return p.Content.Parent() }
|