Tickit::Widget::Static - a widget displaying static text
Tickit::Widget::Static
use Tickit; use Tickit::Widget::Static; my $tickit = Tickit->new; my $hello = Tickit::Widget::Static->new( text => "Hello, world", align => "centre", valign => "middle", ); $tickit->set_root_widget( $hello ); $tickit->run;
This class provides a widget which displays a single piece of static text.
Constructs a new Tickit::Widget::Static object.
Takes the following named arguments in addition to those taken by the base Tickit::Widget constructor:
The text to display
Optional. Defaults to 0.0 if unspecified.
0.0
For more details see the accessors below.
Accessor for text property; the actual text on display in the widget
text
Accessor for horizontal alignment value.
Gives a value in the range from 0.0 to 1.0 to align the text display within the window. If the window is larger than the width of the text, it will be aligned according to this value; with 0.0 on the left, 1.0 on the right, and other values inbetween.
1.0
The symbolic values left, centre and right can be supplied instead of 0.0, 0.5 and 1.0 respectively.
left
centre
right
0.5
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.