container

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractComponent added in v1.3.0

type AbstractComponent interface {
	Hidden() bool
	Focusable() bool
	Focused() bool
	Disabled() bool
}

type Collection added in v1.3.0

type Collection interface {
	Component
	Type() utils.ContainerType
	Components() []Component
	AddComponents(...Component) Collection
	HasVisible() bool
}

type ComplexContainer added in v1.3.0

type ComplexContainer struct {
	Container
	// contains filtered or unexported fields
}

func NewComplexContainer added in v1.3.0

func NewComplexContainer(
	focusable bool,
	containerType utils.ContainerType,
	components ...Component,
) ComplexContainer

func (ComplexContainer) AddComponents added in v1.3.0

func (cc ComplexContainer) AddComponents(components ...Component) Collection

func (ComplexContainer) Blur added in v1.3.0

func (cc ComplexContainer) Blur() Component

func (ComplexContainer) Components added in v1.3.0

func (cc ComplexContainer) Components() []Component

func (ComplexContainer) Disable added in v1.3.1

func (cc ComplexContainer) Disable() Component

func (ComplexContainer) Enable added in v1.3.1

func (cc ComplexContainer) Enable() Component

func (ComplexContainer) Focus added in v1.3.0

func (cc ComplexContainer) Focus() Component

func (ComplexContainer) FocusFromEnd added in v1.3.0

func (cc ComplexContainer) FocusFromEnd() Component

func (ComplexContainer) FocusFromStart added in v1.3.0

func (cc ComplexContainer) FocusFromStart() Component

func (ComplexContainer) FocusNext added in v1.3.0

func (cc ComplexContainer) FocusNext() (Component, tea.Cmd)

func (ComplexContainer) FocusPrev added in v1.3.0

func (cc ComplexContainer) FocusPrev() (Component, tea.Cmd)

func (ComplexContainer) GetContainerByID added in v1.4.0

func (cc ComplexContainer) GetContainerByID(id int) Component

func (ComplexContainer) GetElementByID added in v1.3.0

func (cc ComplexContainer) GetElementByID(id int) obj.Accessor

func (ComplexContainer) HasVisible added in v1.5.1

func (cc ComplexContainer) HasVisible() bool

func (ComplexContainer) Hidden added in v1.5.1

func (cc ComplexContainer) Hidden() bool

implementing Component

func (ComplexContainer) Hide added in v1.3.0

func (cc ComplexContainer) Hide() Component

func (ComplexContainer) Type added in v1.3.0

implementing Collection

func (ComplexContainer) Unhide added in v1.3.0

func (cc ComplexContainer) Unhide() Component

func (ComplexContainer) Update added in v1.3.0

func (cc ComplexContainer) Update(msg tea.Msg) (obj.Element, tea.Cmd)

implementing Element

func (ComplexContainer) View added in v1.3.0

func (cc ComplexContainer) View(bool) string

type Component added in v1.3.0

type Component interface {
	obj.Element
	AbstractComponent
	Hide() Component
	Unhide() Component
	Hidden() bool
	Enable() Component
	Disable() Component
	Focus() Component
	FocusFromStart() Component
	FocusFromEnd() Component
	Blur() Component
	FocusNext() (Component, tea.Cmd)
	FocusPrev() (Component, tea.Cmd)
	GetContainerByID(int) Component
	GetElementByID(int) obj.Accessor
}

type Container

type Container struct {
	// contains filtered or unexported fields
}

func (Container) Disabled added in v1.3.1

func (c Container) Disabled() bool

func (Container) Focusable

func (c Container) Focusable() bool

func (Container) Focused

func (c Container) Focused() bool

func (Container) Hidden added in v1.3.0

func (c Container) Hidden() bool

type SimpleContainer added in v1.3.0

type SimpleContainer struct {
	Container
	// contains filtered or unexported fields
}

func NewSimpleContainer

func NewSimpleContainer(focusable bool, element obj.Element) SimpleContainer

func (SimpleContainer) Blur added in v1.3.0

func (sc SimpleContainer) Blur() Component

func (SimpleContainer) Disable added in v1.3.1

func (sc SimpleContainer) Disable() Component

func (SimpleContainer) Element added in v1.3.0

func (sc SimpleContainer) Element() obj.Element

implementing Wrapper

func (SimpleContainer) Enable added in v1.3.1

func (sc SimpleContainer) Enable() Component

func (SimpleContainer) Focus added in v1.3.0

func (sc SimpleContainer) Focus() Component

func (SimpleContainer) FocusFromEnd added in v1.3.0

func (sc SimpleContainer) FocusFromEnd() Component

func (SimpleContainer) FocusFromStart added in v1.3.0

func (sc SimpleContainer) FocusFromStart() Component

func (SimpleContainer) FocusNext added in v1.3.0

func (sc SimpleContainer) FocusNext() (Component, tea.Cmd)

func (SimpleContainer) FocusPrev added in v1.3.0

func (sc SimpleContainer) FocusPrev() (Component, tea.Cmd)

func (SimpleContainer) GetContainerByID added in v1.4.0

func (sc SimpleContainer) GetContainerByID(id int) Component

func (SimpleContainer) GetElementByID added in v1.3.0

func (sc SimpleContainer) GetElementByID(id int) obj.Accessor

func (SimpleContainer) Hide added in v1.3.0

func (sc SimpleContainer) Hide() Component

implementing Component

func (SimpleContainer) Set added in v1.3.3

func (sc SimpleContainer) Set(args ...interface{}) Wrapper

*

  • Set works differently for different components
  • Button: Set label
  • Input: Set value
  • Radio: Toggle
  • Selector: Toggle specific option
  • Text: Set text

func (SimpleContainer) Unhide added in v1.3.0

func (sc SimpleContainer) Unhide() Component

func (SimpleContainer) Update added in v1.3.0

func (sc SimpleContainer) Update(msg tea.Msg) (obj.Element, tea.Cmd)

implementing Element

func (SimpleContainer) View added in v1.3.0

func (sc SimpleContainer) View(bool) string

type Wrapper added in v1.3.0

type Wrapper interface {
	Component
	Element() obj.Element
	Set(...interface{}) Wrapper
}

Jump to

Keyboard shortcuts

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