Documentation
¶
Index ¶
- type Line
- type Terminal
- func (t *Terminal) Bottom() *Terminal
- func (t *Terminal) Clear() *Terminal
- func (t *Terminal) ClearLine() *Terminal
- func (t *Terminal) Close()
- func (t *Terminal) Column() int
- func (t *Terminal) Down(rows int) *Terminal
- func (t *Terminal) HideCursor()
- func (t *Terminal) Left(cols int) *Terminal
- func (t *Terminal) Line(n int) *Line
- func (t *Terminal) Move(row, col int) *Terminal
- func (t *Terminal) MoveColumn(col int) *Terminal
- func (t *Terminal) MoveRow(row int) *Terminal
- func (t *Terminal) Offset() (int, int)
- func (t *Terminal) Print(n int, args ...any) (int, error)
- func (t *Terminal) Printf(n int, format string, args ...any) (int, error)
- func (t *Terminal) Println(n int, args ...any) (int, error)
- func (t *Terminal) Right(cols int) *Terminal
- func (t *Terminal) Row() int
- func (t *Terminal) SetColumn(n int) *Terminal
- func (t *Terminal) SetPosition(row, col int) *Terminal
- func (t *Terminal) SetRow(n int) *Terminal
- func (t *Terminal) ShowCursor()
- func (t *Terminal) Top() *Terminal
- func (t *Terminal) Up(rows int) *Terminal
- func (t *Terminal) Width() int
- func (t *Terminal) Write(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
func New ¶
New constructs a terminal from the given writer, if it's a valid terminal.
If the writer is not a terminal, then terminal will be nil, and ok will be false.
func (*Terminal) Close ¶
func (t *Terminal) Close()
Close closes the terminal, and re-shows the cursor if it was hidden.
func (*Terminal) MoveColumn ¶
func (*Terminal) Offset ¶
Offset returns the current row and column of the cursor, offset from where the cursor was initially created.
func (*Terminal) Printf ¶
Printf prints the given arguments to the terminal, using the given format.
func (*Terminal) Println ¶
Println prints the given arguments to the terminal, followed by a newline.
func (*Terminal) SetPosition ¶
Click to show internal directories.
Click to hide internal directories.