Documentation
¶
Index ¶
- type List
- func (m *List) Blur()
- func (list *List) CursorName() string
- func (list *List) EntryNames() []string
- func (m *List) Focus()
- func (m *List) Focused() bool
- func (list *List) Init() tea.Cmd
- func (list *List) IsEmpty() bool
- func (list *List) SelectedEntries() map[string]struct{}
- func (list *List) SelectedEntry() entry.Entry
- func (list *List) SelectedEntryName() string
- func (list *List) SetHeight(height int)
- func (list *List) SetWidth(width int)
- func (list *List) Update(msg tea.Msg) (List, tea.Cmd)
- func (list *List) View() string
- type Table
- func (m *Table) ClearSelected()
- func (m Table) Cursor() int
- func (m *Table) GoToBottom()
- func (m *Table) GoToTop()
- func (m Table) Height() int
- func (m *Table) MoveDown(n int, multi bool)
- func (m *Table) MoveUp(n int, multi bool)
- func (m *Table) MultiSelectToBottom()
- func (m *Table) MultiSelectToTop()
- func (m Table) NRows() int
- func (m Table) SelectedRows() []int
- func (m *Table) SetCursor(n int)
- func (m *Table) SetHeight(h int)
- func (m *Table) SetNRows(n int)
- func (m *Table) SetSelected(idxs []int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) CursorName ¶
func (*List) EntryNames ¶
EntryNames returns a slice of the names of the entries in the list
func (*List) Focus ¶
func (m *List) Focus()
Focus focuses the table, allowing the user to move around the rows and interact.
func (*List) SelectedEntries ¶
TODO: Change this when reimplementing the list
func (*List) SelectedEntry ¶
THIS CAN CAUSE A PANIC IF THE LIST IS EMPTY The zero value of an entry is has a nil pointer for fs.FileInfo
func (*List) SelectedEntryName ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table defines a state for the table widget.
func (*Table) GoToBottom ¶
func (m *Table) GoToBottom()
GoToBottom moves the cursor to the last row.
func (*Table) MoveDown ¶
MoveDown moves the selection down by any number of rows. It can not go below the last row.
func (*Table) MoveUp ¶
MoveUp moves the selection up by any number of rows. It can not go above the first row.
func (*Table) MultiSelectToBottom ¶
func (m *Table) MultiSelectToBottom()
MultiSelectToBottom selects all rows from the cursor to the bottom. And sets the cursor to the final row.
func (*Table) MultiSelectToTop ¶
func (m *Table) MultiSelectToTop()
MultiSelectToTop selects all rows from the cursor to the top. And sets the cursor to the first row.
func (Table) SelectedRows ¶
SelectedRows returns the indexes of the selected rows.
func (*Table) SetCursor ¶
SetCursor sets the cursor position in the table. If you only want one item selected, call ClearSelected before this method.
func (*Table) SetSelected ¶
SetSelected sets the rows at the given indexes as selected.