vanitea

package
v0.0.0-...-7ff6b7e Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentList

type ComponentList struct {

	/*
		The map of control keys
	*/
	KeyMap list.KeyMap
	// contains filtered or unexported fields
}

func NewComponentList

func NewComponentList(components []*con.Component) *ComponentList

Initializes a new ComponentList with default values

func (*ComponentList) FocusBackward

func (m *ComponentList) FocusBackward() *ComponentList

func (*ComponentList) FocusForward

func (m *ComponentList) FocusForward() *ComponentList

func (ComponentList) GetComponents

func (m ComponentList) GetComponents() []*con.Component

func (ComponentList) GetFocusedComponent

func (m ComponentList) GetFocusedComponent() (output *con.Component)

func (ComponentList) GetSize

func (m ComponentList) GetSize() tea.WindowSizeMsg

func (ComponentList) Init

func (m ComponentList) Init() tea.Cmd

func (ComponentList) IsEmpty

func (m ComponentList) IsEmpty() bool

func (*ComponentList) SetFocusIndex

func (m *ComponentList) SetFocusIndex(index int) *ComponentList

func (ComponentList) Update

func (m ComponentList) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ComponentList) View

func (m ComponentList) View() string

type KeyMap

type KeyMap struct {
	SelectDeselect key.Binding
	SelectAll      key.Binding
	DeselectAll    key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

type SelectableList

type SelectableList struct {
	ComponentList
	Selected         []*con.Component
	KeyMap           KeyMap
	SelectedString   string
	DeselectedString string
}

func NewSelectableList

func NewSelectableList(components []*con.Component) SelectableList

func (SelectableList) DeselectComponent

func (m SelectableList) DeselectComponent(comp *con.Component) SelectableList

func (SelectableList) DeselectIndex

func (m SelectableList) DeselectIndex(idx int) SelectableList

func (SelectableList) GetDeselectedString

func (m SelectableList) GetDeselectedString() string

func (SelectableList) GetSelected

func (m SelectableList) GetSelected() []*con.Component

func (SelectableList) GetSelectedString

func (m SelectableList) GetSelectedString() string

func (SelectableList) Init

func (m SelectableList) Init() tea.Cmd

func (SelectableList) IsSelected

func (m SelectableList) IsSelected(component *con.Component) bool

func (SelectableList) SelectComponent

func (m SelectableList) SelectComponent(comp *con.Component) SelectableList

func (SelectableList) SelectIndex

func (m SelectableList) SelectIndex(idx int) SelectableList

func (SelectableList) SetDeselectedString

func (m SelectableList) SetDeselectedString(input string) SelectableList

func (SelectableList) SetSelectedString

func (m SelectableList) SetSelectedString(input string) SelectableList

func (SelectableList) ToggleSelection

func (m SelectableList) ToggleSelection(comp *con.Component) SelectableList

func (SelectableList) Update

func (m SelectableList) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SelectableList) View

func (m SelectableList) View() string

Jump to

Keyboard shortcuts

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