Documentation ¶
Index ¶
- type AutoComplete
- type MenuComplete
- type Model
- func (m *Model) Characters() []vaxis.Character
- func (m *Model) CursorPosition() int
- func (m *Model) Draw(win vaxis.Window)
- func (m *Model) SetContent(s string) *Model
- func (m *Model) SetInvisibleChar(s string) *Model
- func (m *Model) SetPrompt(s string) *Model
- func (m *Model) String() string
- func (m *Model) Update(msg vaxis.Event)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoComplete ¶
type AutoComplete struct {
// contains filtered or unexported fields
}
func NewAutoComplete ¶
func NewAutoComplete(vx *vaxis.Vaxis, complete func(string) []string) *AutoComplete
func (*AutoComplete) Draw ¶
func (a *AutoComplete) Draw(win vaxis.Window)
func (*AutoComplete) Update ¶
func (a *AutoComplete) Update(msg vaxis.Event)
type MenuComplete ¶
type MenuComplete struct {
// contains filtered or unexported fields
}
func NewMenuComplete ¶
func NewMenuComplete(complete func(string) []string) *MenuComplete
func (*MenuComplete) Draw ¶
func (m *MenuComplete) Draw(win vaxis.Window)
func (*MenuComplete) Update ¶
func (m *MenuComplete) Update(msg vaxis.Event)
type Model ¶
type Model struct { Content vaxis.Style Prompt vaxis.Style // HideCursor tells the textinput not to draw the cursor HideCursor bool // contains filtered or unexported fields }
func (*Model) Characters ¶ added in v0.5.0
Characters returns the characters of the content
func (*Model) CursorPosition ¶ added in v0.5.0
CursorPosition returns the cursor position, in characters. A cursor position of '0' means the cursor is at the beginning of the line
func (*Model) SetContent ¶
func (*Model) SetInvisibleChar ¶ added in v0.6.3
SetInvisibleChar will use the first character of s to be displayed in the textinput field instead of the pressed keys (password mode).
Click to show internal directories.
Click to hide internal directories.