Documentation ¶
Index ¶
- Constants
- Variables
- func AsKey(evt *tcell.EventKey) tcell.Key
- type Avatar
- type KeyHandler
- type KeyMap
- type KeyMaps
- type Loader
- type Section
- type Spinner
- func (s *Spinner) Display(display bool)
- func (s *Spinner) Draw(screen tcell.Screen)
- func (s *Spinner) IsDisplay() bool
- func (s *Spinner) SetCentral(x, y, width, height int)
- func (s *Spinner) SetRect(x, y, width, height int)
- func (s *Spinner) Start()
- func (s *Spinner) StartAndShow()
- func (s *Spinner) Stop()
- func (s *Spinner) StopAndHide()
Constants ¶
View Source
const ( Key0 tcell.Key = iota + 48 Key1 Key2 Key3 Key4 Key5 Key6 Key7 Key8 Key9 )
Defines numeric keys for container actions.
View Source
const ( KeyShift0 tcell.Key = 41 KeyShift1 tcell.Key = 33 KeyShift2 tcell.Key = 64 KeyShift3 tcell.Key = 35 KeyShift4 tcell.Key = 36 KeyShift5 tcell.Key = 37 KeyShift6 tcell.Key = 94 KeyShift7 tcell.Key = 38 KeyShift8 tcell.Key = 42 KeyShift9 tcell.Key = 40 )
Defines numeric keys for container actions.
View Source
const ( KeyA tcell.Key = iota + 97 KeyB KeyC KeyD KeyE KeyF KeyG KeyH KeyI KeyJ KeyK KeyL KeyM KeyN KeyO KeyP KeyQ KeyR KeyS KeyT KeyU KeyV KeyW KeyX KeyY KeyZ KeyHelp = 63 KeySlash = 47 KeyColon = 58 KeySpace = 32 )
Defines char keystrokes.
View Source
const ( KeyShiftA tcell.Key = iota + 65 KeyShiftB KeyShiftC KeyShiftD KeyShiftE KeyShiftF KeyShiftG KeyShiftH KeyShiftI KeyShiftJ KeyShiftK KeyShiftL KeyShiftM KeyShiftN KeyShiftO KeyShiftP KeyShiftQ KeyShiftR KeyShiftS KeyShiftT KeyShiftU KeyShiftV KeyShiftW KeyShiftX KeyShiftY KeyShiftZ )
Define Shift Keys.
View Source
const ( NAValue = "[dimgray]n/a[-]" EmptyValue = "" )
View Source
const ( ProgressBarWidth = 3 ProgressBarHeight = 1 ProgressBarCell = "▉" )
Variables ¶
View Source
var NumKeys = map[int]tcell.Key{ 0: Key0, 1: Key1, 2: Key2, 3: Key3, 4: Key4, 5: Key5, 6: Key6, 7: Key7, 8: Key8, 9: Key9, }
NumKeys tracks number keys.
Functions ¶
Types ¶
type Avatar ¶
func (*Avatar) SetAddress ¶
SetAddress binds an account to this avatar widget, displays an identicon generated by account's address.
type KeyHandler ¶
type KeyHandler func(*tcell.EventKey)
type KeyMap ¶
type KeyMap struct { Key tcell.Key Shortcut string Description string Handler KeyHandler }
func NewSimpleKey ¶
func NewSimpleKey(key tcell.Key, handler func()) KeyMap
NewSimpleKey creates a simple keymap with only key and handler.
type KeyMaps ¶
type KeyMaps []KeyMap
func (KeyMaps) FindHandler ¶
func (km KeyMaps) FindHandler(key tcell.Key) (KeyHandler, bool)
type Loader ¶
func NewLoader ¶
func NewLoader(app *tview.Application) *Loader
func (*Loader) SetCellColor ¶
func (l *Loader) SetCellColor(color tcell.Color)
func (*Loader) SetCentral ¶
SetRect implements tview.SetRect
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
func NewSection ¶
func NewSectionWithColor ¶
func NewSectionWithStyle ¶
func (*Section) GetTextCell ¶
func (*Section) GetTitleCell ¶
type Spinner ¶
func NewSpinner ¶
func NewSpinner(app *tview.Application) *Spinner
func (*Spinner) SetCentral ¶
func (*Spinner) StartAndShow ¶
func (s *Spinner) StartAndShow()
func (*Spinner) StopAndHide ¶
func (s *Spinner) StopAndHide()
Click to show internal directories.
Click to hide internal directories.