Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseWidget ¶
type BaseWidget struct {
Cfg config.Config
Width int
Height int
// contains filtered or unexported fields
}
BaseWidget provides common functionality
func (*BaseWidget) Error ¶
func (b *BaseWidget) Error() error
func (*BaseWidget) SetSize ¶
func (b *BaseWidget) SetSize(w, h int)
func (*BaseWidget) Value ¶
func (b *BaseWidget) Value() string
type ChecklistWidget ¶
type ChecklistWidget struct {
BaseWidget
Theme theme.Theme
Cursor int
Selected map[int]bool
Viewport struct {
Start int
End int
}
}
func NewChecklist ¶
func NewChecklist(cfg config.Config) *ChecklistWidget
func (*ChecklistWidget) Init ¶
func (c *ChecklistWidget) Init() tea.Cmd
func (*ChecklistWidget) View ¶
func (c *ChecklistWidget) View() string
type InputWidget ¶
func (*InputWidget) Init ¶
func (i *InputWidget) Init() tea.Cmd
func (*InputWidget) View ¶
func (i *InputWidget) View() string
type MenuWidget ¶
type MenuWidget struct {
BaseWidget
Theme theme.Theme
Cursor int
Viewport struct {
Start int
End int
}
}
func NewMenu ¶
func NewMenu(cfg config.Config) *MenuWidget
func (*MenuWidget) Init ¶
func (m *MenuWidget) Init() tea.Cmd
func (*MenuWidget) View ¶
func (m *MenuWidget) View() string
type MsgBoxWidget ¶
type MsgBoxWidget struct {
BaseWidget
Theme theme.Theme
}
func NewMsgBox ¶
func NewMsgBox(cfg config.Config) *MsgBoxWidget
func (*MsgBoxWidget) Init ¶
func (m *MsgBoxWidget) Init() tea.Cmd
func (*MsgBoxWidget) View ¶
func (m *MsgBoxWidget) View() string
type RadiolistWidget ¶
type RadiolistWidget struct {
BaseWidget
Theme theme.Theme
Cursor int
Selected int // -1 if none
Viewport struct {
Start int
End int
}
}
func NewRadiolist ¶
func NewRadiolist(cfg config.Config) *RadiolistWidget
func (*RadiolistWidget) Init ¶
func (r *RadiolistWidget) Init() tea.Cmd
func (*RadiolistWidget) View ¶
func (r *RadiolistWidget) View() string
type Widget ¶
type Widget interface {
tea.Model
Value() string // Returns selected value/output
Error() error // Returns cancellation or other errors
SetSize(w, h int) // Handle terminal resize
}
Widget is the common interface for all dialogs
type YesNoWidget ¶
type YesNoWidget struct {
BaseWidget
Theme theme.Theme
Focused int // 0 = Yes, 1 = No
}
func NewYesNo ¶
func NewYesNo(cfg config.Config) *YesNoWidget
func (*YesNoWidget) Init ¶
func (y *YesNoWidget) Init() tea.Cmd
func (*YesNoWidget) View ¶
func (y *YesNoWidget) View() string
Click to show internal directories.
Click to hide internal directories.