Documentation
¶
Index ¶
- Variables
- type KeyMap
- type ListItem
- type ListItemStyles
- type Model
- type ThemeChosenMsg
- type ThemePreviewMsg
- type TintItem
- func (ti *TintItem) Filter() string
- func (ti *TintItem) Finished() bool
- func (ti *TintItem) ID() string
- func (ti *TintItem) Render(width int) string
- func (ti *TintItem) SetFocused(focused bool)
- func (ti *TintItem) SetHideInfo(v bool)
- func (ti *TintItem) SetMatch(m fuzzy.Match)
- func (ti *TintItem) Tint() *tint.Tint
- func (ti *TintItem) WithAliases(aliases ...string) *TintItem
Constants ¶
This section is empty.
Variables ¶
View Source
var Keys = &KeyMap{ Up: key.NewBinding( key.WithKeys("up", "ctrl+p"), key.WithHelp("↑/ctrl+p", "prev theme"), ), Down: key.NewBinding( key.WithKeys("down", "ctrl+n"), key.WithHelp("↓/ctrl+n", "next theme"), ), Select: key.NewBinding( key.WithKeys("enter", "ctrl+y"), key.WithHelp("enter", "choose"), ), }
Functions ¶
This section is empty.
Types ¶
type ListItem ¶
type ListItem interface {
list.FilterableItem
list.Focusable
list.MatchSettable
// ID returns the unique identifier of the item.
ID() string
}
ListItem represents a selectable and searchable item in a dialog list.
type ListItemStyles ¶
type ThemeChosenMsg ¶
type ThemePreviewMsg ¶
type TintItem ¶
TintItem wraps a uicmd.Command to implement the ListItem interface.
func NewThemeItem ¶
func (*TintItem) Finished ¶
Finished implements list.Item. Command items are render-stable outside of explicit SetFocused / SetMatch.
func (*TintItem) SetFocused ¶
SetFocused implements ListItem.
func (*TintItem) SetHideInfo ¶
SetHideInfo controls whether the hint column is shown. The dialog hides it uniformly when it would crowd the command names.
func (*TintItem) WithAliases ¶
WithAliases returns the TintItem with the given aliases for filtering.
Click to show internal directories.
Click to hide internal directories.