components

package
v0.0.0-...-a1bc16a Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutocompleteView

type AutocompleteView struct {
	*tview.TreeView
}

AutocompleteView is a simple treeview meant for displaying autocomplete choices. The speccial part about this component is, that it can redirect certain events to a different component, as only certain events are treated directly.

func NewAutocompleteView

func NewAutocompleteView() *AutocompleteView

NewAutocompleteView creates a ready-to-use AutocompleteView.

func (*AutocompleteView) InputHandler

func (a *AutocompleteView) InputHandler() tview.InputHandlerFunc

InputHandler returns the handler for this primitive.

func (*AutocompleteView) WrapInputHandler

func (a *AutocompleteView) WrapInputHandler(inputHandler tview.InputHandlerFunc) tview.InputHandlerFunc

WrapInputHandler unlike Box.WrapInputHandler calls the default handler first, as all other shortcuts are meant to be forwarded. However, not all events are handled by the TreeView, as some features aren't desired.

type BottomBar

type BottomBar struct {
	*sync.Mutex
	*tview.Box
	// contains filtered or unexported fields
}

BottomBar custom simple component to render static information at the bottom of the application.

func NewBottomBar

func NewBottomBar() *BottomBar

NewBottomBar creates a new bar to be put at the bottom aplication. It contains static information and hints.

func (*BottomBar) AddItem

func (b *BottomBar) AddItem(text string)

AddItem adds a new item to the right side of the already existing items.

func (*BottomBar) Draw

func (b *BottomBar) Draw(screen tcell.Screen) bool

Draw draws this primitive onto the screen. Implementers can call the screen's ShowCursor() function but should only do so when they have focus. (They will need to keep track of this themselves.)

func (*BottomBar) InsertItemAtStart

func (b *BottomBar) InsertItemAtStart(text string)

func (*BottomBar) RemoveItemAtIndex

func (b *BottomBar) RemoveItemAtIndex(index int)

Jump to

Keyboard shortcuts

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