Documentation ¶
Overview ¶
Package tcell provides a gruid Driver for making terminal apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { StyleManager StyleManager // for cell styling (required) DisableMouse bool // disable mouse-related messages RuneManager RuneManager // optional custom mapping for runes Tty tcell.Tty // optional Tty (see tcell documentation) }
Config contains configurations options for the driver.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements gruid.Driver using the tcell terminal library.
func (*Driver) Close ¶
func (dr *Driver) Close()
Close implements gruid.Driver.Close. It finalizes the screen and releases resources.
func (*Driver) Init ¶
Init implements gruid.Driver.Init. It initializes a screen using the tcell terminal library.
func (*Driver) PollMsgs ¶
PollMsgs implements gruid.Driver.PollMsgs. It does not report KP_5 keypad key when numlock is off.
func (*Driver) PreventQuit ¶
func (dr *Driver) PreventQuit()
PreventQuit will make next call to Close keep the same tcell screen. It can be used to chain two applications with the same screen. It is then your reponsibility to either run another application or call Close manually to properly quit.
type RuneManager ¶
RuneManager is optional and allows for custom mapping of runes.
type StyleManager ¶
type StyleManager interface { // GetAttributes returns a mask of text attributes for a given cell // style. GetStyle(gruid.Style) tcell.Style }
StyleManager allows for retrieving of styling information.