Documentation ¶
Index ¶
- func Run(opts Options)
- type LineDrawer
- type Options
- type ScreenDrawer
- func (d *ScreenDrawer) FillLine(r rune, style tcell.Style)
- func (d *ScreenDrawer) FillUntil(r rune, style tcell.Style, limit int)
- func (d *ScreenDrawer) GoToBottom()
- func (d *ScreenDrawer) Goto(x, y int)
- func (d *ScreenDrawer) NL()
- func (d *ScreenDrawer) Print(s string, style tcell.Style)
- func (d *ScreenDrawer) Println(s string, style tcell.Style)
- func (d *ScreenDrawer) Screen() tcell.Screen
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LineDrawer ¶
type LineDrawer struct {
// contains filtered or unexported fields
}
func NewLineDrawer ¶
func NewLineDrawer(row int, s tcell.Screen) *LineDrawer
func (*LineDrawer) Draw ¶
func (d *LineDrawer) Draw(s string, style tcell.Style)
type Options ¶
type Options struct { DebugMode bool PollInterval time.Duration RedisConnOpt asynq.RedisConnOpt }
type ScreenDrawer ¶
type ScreenDrawer struct {
// contains filtered or unexported fields
}
ScreenDrawer is used to draw contents on screen.
Usage example:
d := NewScreenDrawer(s) d.Println("Hello world", mystyle) d.NL() // adds newline d.Print("foo", mystyle.Bold(true)) d.Print("bar", mystyle.Italic(true))
func NewScreenDrawer ¶
func NewScreenDrawer(s tcell.Screen) *ScreenDrawer
func (*ScreenDrawer) FillLine ¶
func (d *ScreenDrawer) FillLine(r rune, style tcell.Style)
FillLine prints the given rune until the end of the current line and adds a newline.
func (*ScreenDrawer) FillUntil ¶
func (d *ScreenDrawer) FillUntil(r rune, style tcell.Style, limit int)
func (*ScreenDrawer) GoToBottom ¶
func (d *ScreenDrawer) GoToBottom()
Go to the bottom of the screen.
func (*ScreenDrawer) Goto ¶
func (d *ScreenDrawer) Goto(x, y int)
Goto moves the screendrawer to the specified cell.
func (*ScreenDrawer) NL ¶
func (d *ScreenDrawer) NL()
NL adds a newline (i.e., moves to the next line).
func (*ScreenDrawer) Print ¶
func (d *ScreenDrawer) Print(s string, style tcell.Style)
func (*ScreenDrawer) Println ¶
func (d *ScreenDrawer) Println(s string, style tcell.Style)
func (*ScreenDrawer) Screen ¶
func (d *ScreenDrawer) Screen() tcell.Screen
Source Files ¶
Click to show internal directories.
Click to hide internal directories.