Documentation
¶
Index ¶
- Variables
- func PrefixSumBreak(list []int, valueToReach int) (int, int)
- func SuffixSumBreak(list []int, valueToReach int) (int, int)
- type KeyMap
- type ScrollingList
- func (sl *ScrollingList) FooterView() string
- func (sl *ScrollingList) GotoBottom()
- func (sl *ScrollingList) GotoTop()
- func (sl ScrollingList) Init() tea.Cmd
- func (sl *ScrollingList) Next()
- func (sl *ScrollingList) Prev()
- func (sl *ScrollingList) SetItems(items []fmt.Stringer)
- func (sl ScrollingList) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (sl *ScrollingList) UpdateItem(index int)
- func (sl ScrollingList) View() string
- func (sl *ScrollingList) VisibleLines() []string
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFocusedStyle = lipgloss.NewStyle(). Border(lipgloss.ThickBorder()). BorderForeground(lipgloss.Color("197")). BorderTop(false).BorderBottom(false).BorderRight(false). PaddingLeft(1). Foreground(lipgloss.Color("#EE6FF8"))
View Source
var DefaultUnfocusedStyle = lipgloss.NewStyle(). Border(lipgloss.HiddenBorder()). BorderTop(false).BorderBottom(false).BorderRight(false). PaddingLeft(1). Foreground(lipgloss.Color("#C2B8C2"))
Functions ¶
func PrefixSumBreak ¶
Find an index such that 0 to index just (over)fills valueToReach i.e. the appropriate value - 1
Types ¶
type KeyMap ¶
type KeyMap struct {
Down key.Binding
Up key.Binding
GotoBottom key.Binding
GotoTop key.Binding
Quit key.Binding
ShowFullHelp key.Binding
CloseFullHelp key.Binding
}
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
type ScrollingList ¶
type ScrollingList struct {
Items []fmt.Stringer
Focused int
UnfocusedStyle lipgloss.Style
FocusedStyle lipgloss.Style
ListAlignment lipgloss.Position
GlobalAlignment lipgloss.Position
FirstVisible int
FirstPartial int
LastVisible int
LastPartial int
NumLinesFromBorder int
Height int
Width int
// contains filtered or unexported fields
}
func NewScrollingList ¶
func NewScrollingList() ScrollingList
func (*ScrollingList) FooterView ¶
func (sl *ScrollingList) FooterView() string
func (*ScrollingList) GotoBottom ¶
func (sl *ScrollingList) GotoBottom()
func (*ScrollingList) GotoTop ¶
func (sl *ScrollingList) GotoTop()
func (ScrollingList) Init ¶
func (sl ScrollingList) Init() tea.Cmd
func (*ScrollingList) Next ¶
func (sl *ScrollingList) Next()
func (*ScrollingList) Prev ¶
func (sl *ScrollingList) Prev()
func (*ScrollingList) SetItems ¶
func (sl *ScrollingList) SetItems(items []fmt.Stringer)
Replace all items
func (*ScrollingList) UpdateItem ¶
func (sl *ScrollingList) UpdateItem(index int)
Updates/Replaces the item at one index
func (ScrollingList) View ¶
func (sl ScrollingList) View() string
func (*ScrollingList) VisibleLines ¶
func (sl *ScrollingList) VisibleLines() []string
Click to show internal directories.
Click to hide internal directories.