ui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DetailModel = "detail"
View Source
const PrimaryModel = "primaryModel"

PrimaryModel is a list of task models.

View Source
const TasksTableModel = "tasks-table"

Variables

This section is empty.

Functions

This section is empty.

Types

type Containerized

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

func NewContainerized

func NewContainerized(focused string, children []string) *Containerized

func (*Containerized) Children

func (c *Containerized) Children() []string

func (*Containerized) FocusChild

func (c *Containerized) FocusChild(child string)

func (*Containerized) Focused

func (c *Containerized) Focused() string

func (*Containerized) Next

func (c *Containerized) Next() string

type ContainerizedInterface

type ContainerizedInterface interface {
	Focused() string
	Next() string
	FocusChild(string)
	Children() []string
}

ContainerizedInterface is a component that can contain other components.

type Focusable

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

func (*Focusable) Blur

func (f *Focusable) Blur()

func (*Focusable) Focus

func (f *Focusable) Focus()

func (*Focusable) IsFocused

func (f *Focusable) IsFocused() bool

type FocusableInterface

type FocusableInterface interface {
	// TODO add return tea.Cmd
	Focus()
	// TODO add return tea.Cmd
	Blur()
}

type Notifier

type Notifier interface {
	Info(msg string)
	Warn(msg string)
	Error(msg string)
}

Notifier is a component that can notify to the parent component.

type Refreshable

type Refreshable interface {
	FetchTasks(isHardRefresh bool) tea.Cmd
}

type Resizable

type Resizable struct {
	Height   int
	Width    int
	Viewport viewport.Model
}

Resizable managed the size of the component, Viewpoint is inner viewport of the component, which is used to render the content Viewport' size is the size of the component minus the border size.

func (*Resizable) Resize

func (r *Resizable) Resize(width, height int, border lipgloss.Border)

type ResizeInterface

type ResizeInterface interface {
	Resize(width, height int)
}

type Visible added in v0.1.1

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

func NewVisible added in v0.1.1

func NewVisible(visible bool) Visible

func (*Visible) Hide added in v0.1.1

func (v *Visible) Hide()

func (*Visible) IsVisible added in v0.1.1

func (v *Visible) IsVisible() bool

func (*Visible) Show added in v0.1.1

func (v *Visible) Show()

func (*Visible) Toggle added in v0.1.1

func (v *Visible) Toggle()

type VisibleInterface added in v0.1.1

type VisibleInterface interface {
	IsVisible() bool
	Show()
	Hide()
}

VisibleInterface is a component that can be shown or hidden.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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