Documentation ¶
Index ¶
- func Confirm(x, y int, fg, bg termbox.Attribute, msg string) (bool, termbox.Event)
- func Label(x, y, width int, fg, bg termbox.Attribute, text string)
- func Text(x, y, width, height int, fg, bg termbox.Attribute, text string)
- type Editbox
- func (ebox *Editbox) AddExitKeys(keys ...termbox.Key)
- func (ebox *Editbox) GetCursor() (int, int)
- func (ebox *Editbox) HandleEvent(ev termbox.Event)
- func (ebox *Editbox) Render()
- func (ebox *Editbox) SetCursor(x, y int)
- func (ebox *Editbox) SetText(s string)
- func (ebox *Editbox) Text() string
- func (ebox *Editbox) WaitExit() termbox.Event
- type SelectBox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Label ¶
Output line of text at x, y with specified width and fg/bg colors If width > 0 it will truncate text if it is longer than width or fill the rest of the width with spaces if text is shorter than width
Types ¶
type Editbox ¶
type Editbox struct {
// contains filtered or unexported fields
}
Base type for all editbox widgets except Select
func (*Editbox) AddExitKeys ¶
func (ebox *Editbox) AddExitKeys(keys ...termbox.Key)
func (*Editbox) HandleEvent ¶
func (ebox *Editbox) HandleEvent(ev termbox.Event)
Processes termbox events. Useful if you poll them by yourself.
type SelectBox ¶
type SelectBox struct {
// contains filtered or unexported fields
}
func Select ¶
func Select( x, y, width, height int, fg, bg, sfg, sbg termbox.Attribute, items []string, ) *SelectBox
Create new Select widget. This DOES NOT call termbox.Flush().
func (*SelectBox) HandleEvent ¶
Processes termbox events. Useful if you poll them by yourself. Returns false on unknown event.
func (*SelectBox) SelectedIndex ¶
Click to show internal directories.
Click to hide internal directories.