button

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Label   string
	Style   StyleSet
	OnClick func() (vxfw.Command, error)
	// contains filtered or unexported fields
}

func New

func New(label string, onClick func() (vxfw.Command, error)) *Button

func (*Button) Draw

func (b *Button) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error)

func (*Button) HandleEvent

func (b *Button) HandleEvent(ev vaxis.Event, ph vxfw.EventPhase) (vxfw.Command, error)

type StyleSet

type StyleSet struct {
	Default   vaxis.Style
	MouseDown vaxis.Style
	Hover     vaxis.Style
	Focus     vaxis.Style
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL