Documentation
¶
Index ¶
- Constants
- type AutoComplete
- type AutoCompleteOptions
- type Container
- type Field
- func (f *Field) GetContent() string
- func (f *Field) GetInputType() InputType
- func (f *Field) HandleEvent(ev tcell.Event) bool
- func (f *Field) HasFocus() bool
- func (f *Field) OnFocus(cb func() bool) func()
- func (f *Field) OnKeyPress(cb func(ev *tcell.EventKey) bool) func()
- func (f *Field) SetFocus(on bool)
- func (f *Field) SetInputType(t InputType)
- type FieldOptions
- type Focusable
- type Form
- type Input
- func (i *Input) GetContent() string
- func (i *Input) GetInputType() InputType
- func (i *Input) HandleEvent(ev tcell.Event) bool
- func (i *Input) HasFocus() bool
- func (i *Input) Init()
- func (i *Input) OnChange(cb func(ev tcell.Event) bool) func()
- func (i *Input) OnFocus(cb func() bool) func()
- func (i *Input) OnKeyPress(cb func(ev *tcell.EventKey) bool) func()
- func (i *Input) SetContent(text string)
- func (i *Input) SetFocus(on bool)
- func (i *Input) SetInputType(t InputType)
- type InputOptions
- type InputType
- type Status
- type Text
- type Title
- type WithFocusables
Constants ¶
View Source
const EMPTY_CELL = 0
View Source
const EMPTY_NOTIFICATION = " "
View Source
const MIN_WIDTH = 80
View Source
const NOTIFICATION_MIN_DURATION_IN_SECONDS = 5
Notifications will be cleared upon the first interaction after NOTIFICATION_MIN_DURATION_IN_SECONDS seconds
View Source
const PASSWORD_FIELD_LENGTH = 8
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoComplete ¶
func NewAutoComplete ¶
func NewAutoComplete(options AutoCompleteOptions) *AutoComplete
func (*AutoComplete) HasFocus ¶
func (ac *AutoComplete) HasFocus() bool
func (*AutoComplete) OnFocus ¶
func (ac *AutoComplete) OnFocus(cb func() bool) func()
func (*AutoComplete) SetFocus ¶
func (ac *AutoComplete) SetFocus(on bool)
type AutoCompleteOptions ¶
type Container ¶
type Container struct { Orientation views.Orientation views.BoxLayout // contains filtered or unexported fields }
func NewContainer ¶
func NewContainer(screen tcell.Screen) *Container
func (*Container) InsertWidget ¶
func (c *Container) InsertWidget()
func (*Container) RemoveWidget ¶
func (c *Container) RemoveWidget()
func (*Container) SetContent ¶
type Field ¶
func NewField ¶
func NewField(options *FieldOptions) *Field
func (*Field) GetContent ¶
func (*Field) GetInputType ¶
func (*Field) HandleEvent ¶
func (*Field) OnKeyPress ¶
func (*Field) SetInputType ¶
type FieldOptions ¶
type Input ¶
func NewInput ¶
func NewInput(options *InputOptions) *Input
func (*Input) GetContent ¶
func (*Input) GetInputType ¶
func (*Input) HandleEvent ¶
func (*Input) OnKeyPress ¶
func (*Input) SetContent ¶
func (*Input) SetInputType ¶
type InputOptions ¶
type WithFocusables ¶
func (*WithFocusables) Focusables ¶
func (wf *WithFocusables) Focusables() []Focusable
Returns the subset of Widgets that can have focus
func (*WithFocusables) HandleEvent ¶
func (wf *WithFocusables) HandleEvent(ev tcell.Event) bool
func (*WithFocusables) MoveFocus ¶
func (wf *WithFocusables) MoveFocus(offset int)
Moves focus by `offset` focusables
Click to show internal directories.
Click to hide internal directories.