container

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Unlicense Imports: 4 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
}

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) GetElementByID added in v1.3.0

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

func (ComplexContainer) Hide added in v1.3.0

func (cc ComplexContainer) Hide() Component

implementing 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
	Enable() Component
	Disable() Component
	Focus() Component
	FocusFromStart() Component
	FocusFromEnd() Component
	Blur() Component
	FocusNext() (Component, tea.Cmd)
	FocusPrev() (Component, tea.Cmd)
	GetElementByID(int) (Component, 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) GetElementByID added in v1.3.0

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

func (SimpleContainer) Hide added in v1.3.0

func (sc SimpleContainer) Hide() Component

implementing Component

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
}

Jump to

Keyboard shortcuts

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