|
NAME"Tickit::Widget::Frame" - draw a frame around another widget SYNOPSIS use Tickit;
use Tickit::Widget::Frame;
use Tickit::Widget::Static;
my $frame = Tickit::Widget::Frame->new(
style => { linetype => "single" },
)
->set_child(
Tickit::Widget::Static->new(
text => "Hello, world",
align => "centre",
valign => "middle",
)
);
Tickit->new( root => $frame )->run;
DESCRIPTIONThis container widget draws a frame around a single child widget. STYLEThe default style pen is used as the widget pen. The following style pen prefixes are also used:
The following style keys are used:
CONSTRUCTORnew$frame = Tickit::Widget::Frame->new( %args ); Constructs a new "Tickit::Widget::Static" object. Takes the following named arguments in addition to those taken by the base Tickit::SingleChildWidget constructor:
For more details see the accessors below. ACCESSORStitle$title = $frame->title; set_title$frame->set_title( $title ); Accessor for the "title" property, a string written in the top of the frame. title_alignset_title_align$title_align = $frame->title_align; $frame->set_title_align( $title_align ); Accessor for the "title_align" property. Gives a vlaue in the range 0.0 to 1.0 to align the title in the top of the frame. See also Tickit::WidgetRole::Alignable. TODO
AUTHORPaul Evans <leonerd@leonerd.org.uk>
|