Documentation
¶
Index ¶
- type AbstractComponent
- type Collection
- type ComplexContainer
- func (cc ComplexContainer) AddComponents(components ...Component) Collection
- func (cc ComplexContainer) Blur() Component
- func (cc ComplexContainer) Components() []Component
- func (cc ComplexContainer) Disable() Component
- func (cc ComplexContainer) Enable() Component
- func (cc ComplexContainer) Focus() Component
- func (cc ComplexContainer) FocusFromEnd() Component
- func (cc ComplexContainer) FocusFromStart() Component
- func (cc ComplexContainer) FocusNext() (Component, tea.Cmd)
- func (cc ComplexContainer) FocusPrev() (Component, tea.Cmd)
- func (cc ComplexContainer) GetContainerByID(id int) Component
- func (cc ComplexContainer) GetElementByID(id int) obj.Accessor
- func (cc ComplexContainer) HasVisible() bool
- func (cc ComplexContainer) Hidden() bool
- func (cc ComplexContainer) Hide() Component
- func (cc ComplexContainer) Type() utils.ContainerType
- func (cc ComplexContainer) Unhide() Component
- func (cc ComplexContainer) Update(msg tea.Msg) (obj.Element, tea.Cmd)
- func (cc ComplexContainer) View(bool) string
- type Component
- type Container
- type SimpleContainer
- func (sc SimpleContainer) Blur() Component
- func (sc SimpleContainer) Disable() Component
- func (sc SimpleContainer) Element() obj.Element
- func (sc SimpleContainer) Enable() Component
- func (sc SimpleContainer) Focus() Component
- func (sc SimpleContainer) FocusFromEnd() Component
- func (sc SimpleContainer) FocusFromStart() Component
- func (sc SimpleContainer) FocusNext() (Component, tea.Cmd)
- func (sc SimpleContainer) FocusPrev() (Component, tea.Cmd)
- func (sc SimpleContainer) GetContainerByID(id int) Component
- func (sc SimpleContainer) GetElementByID(id int) obj.Accessor
- func (sc SimpleContainer) Hide() Component
- func (sc SimpleContainer) Set(args ...interface{}) Wrapper
- func (sc SimpleContainer) Unhide() Component
- func (sc SimpleContainer) Update(msg tea.Msg) (obj.Element, tea.Cmd)
- func (sc SimpleContainer) View(bool) string
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractComponent ¶ added in v1.3.0
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
func (cc ComplexContainer) Type() utils.ContainerType
implementing Collection
func (ComplexContainer) Unhide ¶ added in v1.3.0
func (cc ComplexContainer) Unhide() Component
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 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) View ¶ added in v1.3.0
func (sc SimpleContainer) View(bool) string
Click to show internal directories.
Click to hide internal directories.