Tickit::Term - terminal formatting abstraction
Tickit::Term
Provides terminal control primatives for Tickit; a number of methods that control the terminal by writing control strings. This object itself performs no acutal IO work; it writes bytes to a delegated object given to the constructor called the writer.
This object is not normally constructed directly by the containing application; instead it is used indirectly by other parts of the Tickit distribution.
Tickit
Constructs a new Tickit::Term object.
Takes the following named arguments at construction time:
Optional. If supplied, applies the named encoding to the Unicode string supplied to the print and penprint methods.
print
penprint
An object delegated to for sending strings of terminal control bytes to the terminal itself. This object must support a single method, write, taking a string of bytes.
write
$writer->write( $data )
Such an interface is supported by an IO::Handle object.
IO::Handle
Print the given text to the terminal at the current cursor position
Move the cursor to the given position on the screen. If only one parameter is defined, does not alter the other. Both $line and $col are 0-based.
$line
$col
Move the cursor relative to where it currently is.
Scroll the region of the screen that starts on line $from until (and including) line $to down, $by lines (upwards if negative).
$from
$to
$by
Changes the current pen attributes to those given. Any attribute whose value is given as undef is reset. Any attributes not named are unchanged.
undef
For details of the supported pen attributes, see Tickit::Pen.
Similar to chpen, but completely defines the state of the terminal pen. Any attribute not given will be reset to its default value.
chpen
Erase the entire screen
Clear the current line from the cursor onwards.
Erase $count characters forwards. If $moveend is true, the cursor is moved to the end of the erased region. If false, the cursor will remain where it is.
$count
$moveend
Using $moveend may be more efficient than separate erasech and goto calls on terminals that do not have an erase function, as it will be implemented by printing spaces. This removes the need for two cursor jumps.
erasech
goto
Insert $count blank characters, shifting following text to the right.
Delete the following $count characters, shifting the remaining text to the left. The terminal will fill the empty region with blanks.
Set or clear the DEC Alternate Screen mode
Set or clear the cursor visible mode
Set or clear the mouse tracking mode
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit
CPAN shell
perl -MCPAN -e shell install Tickit
For more information on module installation, please visit the detailed CPAN module installation guide.