func (o WidgetOptions) CursorEnterHandler(f WidgetCursorEnterHandlerFunc) WidgetOpt {
	return func(w *Widget) {
		w.CursorEnterEvent.AddHandler(func(args interface{}) {
			f(args.(*WidgetCursorEnterEventArgs))
		})
	}
}
WithCursorEnterHandler configures a Widget with cursor enter event handler f.
package widget
import (
	"image"
	"github.com/blizzy78/ebitenui/event"
	"github.com/blizzy78/ebitenui/input"
	"github.com/hajimehoshi/ebiten/v2"
)
type Widget struct {
	Rect image.Rectangle
	LayoutData interface{}
	Disabled bool
	CursorEnterEvent *event.Event
	CursorExitEvent *event.Event
	MouseButtonPressedEvent *event.Event
	MouseButtonReleasedEvent *event.Event
	ScrolledEvent *event.Event
	FocusEvent *event.Event
	parent                     *Widget
	lastUpdateCursorEntered    bool
	lastUpdateMouseLeftPressed bool
	mouseLeftPressedInside     bool
	inputLayer                 *input.Layer
}
type WidgetOpt func(w *Widget)  
type HasWidget interface {
	GetWidget() *Widget
}
type Renderer interface {
	Render(screen *ebiten.Image, def DeferredRenderFunc)
}
type Focuser interface {
	Focus(focused bool)
}
type RenderFunc func(screen *ebiten.Image, def DeferredRenderFunc)
type DeferredRenderFunc func(r RenderFunc)
type PreferredSizer interface {
	PreferredSize() (int, int)
}
type WidgetCursorEnterEventArgs struct {  
	Widget *Widget
}
type WidgetCursorExitEventArgs struct {  
	Widget *Widget
}
type WidgetMouseButtonPressedEventArgs struct {  
	Widget *Widget
	Button ebiten.MouseButton
	OffsetX int
	OffsetY int
}
type WidgetMouseButtonReleasedEventArgs struct {  
	Widget *Widget
	Button ebiten.MouseButton
	Inside bool
	OffsetX int
	OffsetY int
}
type WidgetScrolledEventArgs struct {  
	Widget *Widget
	X      float64
	Y      float64
}
type WidgetFocusEventArgs struct {  
	Widget  *Widget
	Focused bool
}
type WidgetCursorEnterHandlerFunc func(args *WidgetCursorEnterEventArgs)  
type WidgetCursorExitHandlerFunc func(args *WidgetCursorExitEventArgs)  
type WidgetMouseButtonPressedHandlerFunc func(args *WidgetMouseButtonPressedEventArgs)  
type WidgetMouseButtonReleasedHandlerFunc func(args *WidgetMouseButtonReleasedEventArgs)  
type WidgetScrolledHandlerFunc func(args *WidgetScrolledEventArgs)  
type WidgetOptions struct {  
}
var WidgetOpts WidgetOptions
var deferredRenders []RenderFunc
func NewWidget(opts ...WidgetOpt) *Widget {
	w := &Widget{
		CursorEnterEvent:         &event.Event{},
		CursorExitEvent:          &event.Event{},
		MouseButtonPressedEvent:  &event.Event{},
		MouseButtonReleasedEvent: &event.Event{},
		ScrolledEvent:            &event.Event{},
		FocusEvent:               &event.Event{},
	}
	for _, o := range opts {
		o(w)
	}
	return w
}
func (o WidgetOptions) LayoutData(ld interface{}) WidgetOpt {
	return func(w *Widget) {
		w.LayoutData = ld
	}
}