46 lines
834 B
Go
46 lines
834 B
Go
package ui
|
|
|
|
import "opslag.de/schobers/geom"
|
|
|
|
var _ Control = &Proxy{}
|
|
|
|
type Proxy struct {
|
|
Content Control
|
|
}
|
|
|
|
func (p *Proxy) Arrange(ctx Context, bounds geom.RectangleF32, offset geom.PointF32) {
|
|
p.Content.Arrange(ctx, bounds, offset)
|
|
}
|
|
|
|
func (p *Proxy) DesiredSize(ctx Context) geom.PointF32 {
|
|
return p.Content.DesiredSize(ctx)
|
|
}
|
|
|
|
func (p *Proxy) Handle(ctx Context, e Event) {
|
|
p.Content.Handle(ctx, e)
|
|
}
|
|
|
|
func (p *Proxy) Render(ctx Context) {
|
|
p.Content.Render(ctx)
|
|
}
|
|
|
|
func (p *Proxy) Bounds() geom.RectangleF32 {
|
|
return p.Content.Bounds()
|
|
}
|
|
|
|
func (p *Proxy) OnClick(fn ClickFn) {
|
|
p.Content.OnClick(fn)
|
|
}
|
|
|
|
func (p *Proxy) OnDragStart(fn DragStartFn) {
|
|
p.Content.OnDragStart(fn)
|
|
}
|
|
|
|
func (p *Proxy) OnDragMove(fn DragMoveFn) {
|
|
p.Content.OnDragMove(fn)
|
|
}
|
|
|
|
func (p *Proxy) OnDragEnd(fn DragEndFn) {
|
|
p.Content.OnDragEnd(fn)
|
|
}
|