footer

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HelpInfoWidth = 7 // width of the help info in the footer

Variables

This section is empty.

Functions

This section is empty.

Types

type FooterModel

type FooterModel struct {
	// contains filtered or unexported fields
}

FooterModel is the model for a header. The footer can collect input, and displays informationa about the apps state.

func InitialModel

func InitialModel(name string) FooterModel

InitialModel builds the model.

func (*FooterModel) Delete

func (m *FooterModel) Delete() tea.Cmd

Delete deletes the rune in front of the cursor.

func (FooterModel) Init

func (m FooterModel) Init() tea.Cmd

Init initializes the model.

func (FooterModel) InputMode

func (m FooterModel) InputMode() bool

InputMode returns whether the footer is accepting input or not.

func (FooterModel) InputName

func (m FooterModel) InputName() string

InputName is the name of the underlying input.

func (*FooterModel) Insert

func (m *FooterModel) Insert(runes []rune) tea.Cmd

Insert inserts runes in front of the cursor.

func (*FooterModel) MoveLeft

func (m *FooterModel) MoveLeft()

MoveLeft moves the cursor the left once space.

func (*FooterModel) MoveRight

func (m *FooterModel) MoveRight()

MoveRight moves the cursor to right once space.

func (*FooterModel) Resize

func (m *FooterModel) Resize(width int)

Resize changes the size of the footer.

func (*FooterModel) SetFilters

func (m *FooterModel) SetFilters(filters []string)

SetFilters sets the curently applied filters.

func (*FooterModel) StartInputMode

func (m *FooterModel) StartInputMode(prompt string, text string, maxChars int)

StartInputMode switches the footer into accepting input.

func (*FooterModel) StopInputMode

func (m *FooterModel) StopInputMode()

StopInputMode switches the footer out of accepting input.

func (FooterModel) Text

func (m FooterModel) Text() string

Text returns the text in the footers input.

func (FooterModel) Update

func (m FooterModel) Update(msg tea.Msg) (FooterModel, tea.Cmd)

Update handles a message.

func (FooterModel) View

func (m FooterModel) View() string

View renders the model.

Jump to

Keyboard shortcuts

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