Tickit - Terminal Interface Construction KIT
Tickit
use Tickit; my $tickit = Tickit->new; # Create some widgets # ... $tickit->set_root_widget( $rootwidget ); $tickit->run;
Constructs a new Tickit framework container object.
Takes the following named arguments at construction time:
IO handle for terminal input. Will default to STDIN.
STDIN
IO handle for terminal output. Will default to STDOUT.
STDOUT
Runs the given CODE reference at some time soon in the future. It will not be invoked yet, but will be invoked at some point before the next round of input events are processed.
Returns the underlying Tickit::Term object.
Query the current size of the terminal. Will be cached and updated on receipt of SIGWINCH signals.
SIGWINCH
Installs a callback to invoke if the given key is pressed, overwriting any previous callback for the same key. The code block is invoked as
$code->( $tickit, $key )
If $code is missing or undef, any existing callback is removed.
$code
undef
As a convenience for the common application use case, the Ctrl-C key is bound to the _STOP method.
Ctrl-C
_STOP
To remove this binding, simply bind another callback, or remove the binding entirely by setting undef.
Returns the Tickit::RootWindow.
Sets the root widget for the application's display. This must be a subclass of Tickit::Widget.
Set up the screen and generally prepare to start running
Shut down the screen after running
Calls the start method, then processes IO events until stopped, by the _STOP method, SIGINT, SIGTERM or the Ctrl-C key. Then runs the stop method, and returns.
start
SIGINT
SIGTERM
stop
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.