input

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Zone

type Zone struct {
	Metadata map[string]interface{}
	OnClick  func() tea.Cmd
	ID       string
	Type     ZoneType
	X        int
	Y        int
	Width    int
	Height   int
}

Zone represents an interactive clickable/hoverable area in the UI

type ZoneManager

type ZoneManager interface {
	Register(zone Zone)
	FindZoneAt(x, y int) *Zone
	GetHoveredZone() *Zone
	IsHovered(zoneID string) bool
	UpdateMousePos(x, y int) tea.Cmd
	Clear()
	GetZones() []Zone
}

ZoneManager defines the interface for managing interactive zones

func NewZoneManager

func NewZoneManager() ZoneManager

NewZoneManager creates a new ZoneManager instance

type ZoneType

type ZoneType int

ZoneType categorizes different types of interactive zones

const (
	ZoneTypeGeneric ZoneType = iota
	ZoneTypeButton
	ZoneTypeTab
	ZoneTypeListItem
	ZoneTypeMenuItem
	ZoneTypeLink
)

func (ZoneType) String

func (z ZoneType) String() string

String returns the string representation of a ZoneType

Jump to

Keyboard shortcuts

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