Documentation ¶
Index ¶
- Constants
- type Item
- type ItemDelegate
- func (d ItemDelegate) Add(key Item)
- func (d ItemDelegate) Clear()
- func (d ItemDelegate) Delete(key Item)
- func (d ItemDelegate) GetAll() map[Item]struct{}
- func (d ItemDelegate) Height() int
- func (d ItemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)
- func (d ItemDelegate) Spacing() int
- func (d ItemDelegate) Update(_ tea.Msg, _ *list.Model) tea.Cmd
- type ItemList
- type SOption
- type Selector
- type SelectorModel
Constants ¶
View Source
const ( DefaultWidth = 20 DefaultHeight = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemDelegate ¶
type ItemDelegate struct {
// contains filtered or unexported fields
}
func (ItemDelegate) Add ¶ added in v0.4.3
func (d ItemDelegate) Add(key Item)
func (ItemDelegate) Clear ¶ added in v0.4.3
func (d ItemDelegate) Clear()
func (ItemDelegate) Delete ¶ added in v0.4.3
func (d ItemDelegate) Delete(key Item)
func (ItemDelegate) GetAll ¶ added in v0.4.3
func (d ItemDelegate) GetAll() map[Item]struct{}
func (ItemDelegate) Height ¶
func (d ItemDelegate) Height() int
func (ItemDelegate) Spacing ¶
func (d ItemDelegate) Spacing() int
type ItemList ¶
type ItemList struct {
List *gtree.RedBlackTree
}
func NewItemList ¶
func NewItemList() (li *ItemList)
type SOption ¶
type SOption func(sm *SelectorModel)
func WidthEnableMulti ¶ added in v0.4.3
func WithEnbleInfinite ¶
func WithFilteringEnabled ¶
func WithHeight ¶
func WithShowStatusBar ¶
type Selector ¶
func NewSelector ¶
type SelectorModel ¶
type SelectorModel struct {
// contains filtered or unexported fields
}
func NewSelectorModel ¶
func NewSelectorModel(items []Item, opts ...SOption) (sm *SelectorModel)
func (*SelectorModel) ChosenList ¶
func (that *SelectorModel) ChosenList() (r []string)
func (*SelectorModel) Init ¶
func (that *SelectorModel) Init() tea.Cmd
func (*SelectorModel) View ¶
func (that *SelectorModel) View() string
Click to show internal directories.
Click to hide internal directories.