filterable_viewport

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterableViewport

type FilterableViewport[T viewport.RenderableComparable] struct {
	Filter filter.Model
	// contains filtered or unexported fields
}

func (FilterableViewport[T]) GetSelection

func (fv FilterableViewport[T]) GetSelection() *T

func (FilterableViewport[T]) GetSelectionIdx

func (fv FilterableViewport[T]) GetSelectionIdx() int

func (FilterableViewport[T]) HighjackingInput

func (fv FilterableViewport[T]) HighjackingInput() bool

func (*FilterableViewport[T]) SetAllRows

func (fv *FilterableViewport[T]) SetAllRows(allRows []T)

func (*FilterableViewport[T]) SetAllRowsAndMatchesFilter added in v0.2.0

func (fv *FilterableViewport[T]) SetAllRowsAndMatchesFilter(allRows []T, matchesFilter func(T, filter.Model) bool)

func (*FilterableViewport[T]) SetBottomSticky

func (fv *FilterableViewport[T]) SetBottomSticky(bottomSticky bool)

func (*FilterableViewport[T]) SetFocus added in v0.4.0

func (fv *FilterableViewport[T]) SetFocus(focused bool)

func (*FilterableViewport[T]) SetMaintainSelection

func (fv *FilterableViewport[T]) SetMaintainSelection(maintainSelection bool)

func (FilterableViewport[T]) SetSelectedContentIdx

func (fv FilterableViewport[T]) SetSelectedContentIdx(idx int)

func (*FilterableViewport[T]) SetStyles added in v0.5.0

func (fv *FilterableViewport[T]) SetStyles(styles style.Styles)

func (*FilterableViewport[T]) SetTopHeader added in v0.4.0

func (fv *FilterableViewport[T]) SetTopHeader(topHeader string)

func (*FilterableViewport[T]) SetTopSticky

func (fv *FilterableViewport[T]) SetTopSticky(topSticky bool)

func (*FilterableViewport[T]) SetUpDownMovementWithShift

func (fv *FilterableViewport[T]) SetUpDownMovementWithShift()

func (*FilterableViewport[T]) ToggleShowContext added in v0.5.0

func (fv *FilterableViewport[T]) ToggleShowContext()

func (FilterableViewport[T]) Update

func (fv FilterableViewport[T]) Update(msg tea.Msg) (FilterableViewport[T], tea.Cmd)

func (FilterableViewport[T]) View

func (fv FilterableViewport[T]) View() string

func (FilterableViewport[T]) WithDimensions

func (fv FilterableViewport[T]) WithDimensions(width, height int) FilterableViewport[T]

type FilterableViewportConfig added in v0.5.0

type FilterableViewportConfig[T viewport.RenderableComparable] struct {
	TopHeader            string
	StartShowContext     bool
	CanToggleShowContext bool
	SelectionEnabled     bool
	StartWrapOn          bool
	KeyMap               keymap.KeyMap
	Width                int
	Height               int
	AllRows              []T
	MatchesFilter        func(T, filter.Model) bool
	ViewWhenEmpty        string
	Styles               style.Styles
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL