NAME
Tickit::Widget::HSplit
- an adjustable horizontal split between two widgets
SYNOPSIS
use Tickit;
use Tickit::Widget::HSplit;
use Tickit::Widget::Static;
my $hsplit = Tickit::Widget::HSplit->new
->set_top_child ( Tickit::Widget::Static->new( text => "Text above" ) )
->set_bottom_child( Tickit::Widget::Static->new( text => "Text below" ) );
Tickit->new( root => $hsplit )->run;
DESCRIPTION
This container widget holds two child widgets, displayed one above the other. The two widgets are displayed with a horizontal split bar between them, which reacts to mouse click-drag events, allowing the user to adjust the proportion of space given to the two widgets.
STYLE
The default style pen is used as the widget pen. The following style pen prefixes are also used:
The following style keys are used:
The following style tags are used:
CONSTRUCTOR
new
$hsplit = Tickit::Widget::HSplit->new( %args )
Constructs a new Tickit::Widget::HSplit
object.
ACCESSORS
top_child
set_top_child
$child = $hsplit->top_child
$hsplit->set_top_child( $child )
Accessor for the child widget used in the top half of the display.
bottom_child
set_bottom_child
$child = $hsplit->bottom_child
$hsplit->set_bottom_child( $child )
Accessor for the child widget used in the bottom half of the display.
These mutators returning the container widget itself making them suitable to use as chaining mutators; e.g.
my $container = Tickit::Widget::HSplit->new( ... )
->set_top_child ( Tickit::Widget::Box->new ... )
->set_bottom_child( Tickit::Widget::Box->new ... );
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>