Tickit...VSplit(3pm)
π Tickit::Widget::VSplit β the perl one, from User Contributed Perl Documentation π
okay bestie, so Tickit::Widget::VSplit is literally just an adjustable vertical split between two widgets. that's the whole vibe. two widgets, one lil bar between them, you drag it, everything slays. β¨
π SYNOPSIS π
use Tickit;
use Tickit::Widget::VSplit;
use Tickit::Widget::Static;
my $vsplit = Tickit::Widget::VSplit->new
->set_left_child ( Tickit::Widget::Static->new( text => "Text above" ) ),
->set_right_child( Tickit::Widget::Static->new( text => "Text below" ) );
Tickit->new( root => $vsplit )->run;
like. look at her. main character energy fr fr π«Ά
π¦ DESCRIPTION π¦
so this is a container widget (a girl who holds other widgets, iconic) and she holds two child widgets, and the way she shows them is side by side. π
between them there's a vertical split bar, and that bar is not just decorative β it reacts to mouse click-drag events, so the user can literally adjust the proportion of space handed to each of the two widgets. drag it, the split moves, that's it, no cap. π
β¨ STYLE β¨
the default style pen is used as the widget pen. that's just how she is. π
the following style pen prefixes are also used:
split=> PEN β the pen used to render the vertical split area πΈ
the following style keys are used:
spacing=> INT β the number of columns of spacing between the left and right child widgets π§
the following style tags are used:
:activeβ set when a mouse drag resize operation is occurring π
π CONSTRUCTOR π
new
$vsplit = Tickit::Widget::VSplit->new( %args );
constructs a new Tickit::Widget::VSplit object. brand new, fresh out the box, obsessed. π
π ACCESSORS π
left_child
set_left_child
$child = $hsplit->left_child;
$vsplit->set_left_child( $child );
accessor for the child widget used in the left half of the display. πΈ
right_child
set_right_child
$child = $hsplit->right_child;
$vsplit->set_right_child( $child );
accessor for the child widget used in the right half of the display. π¦
okay and the tea on these mutators: they return the container widget itself, which makes them suitable to use as chaining mutators. so you can just keep stacking calls, one after another, no middleman variable needed. e.g. β¨
my $container = Tickit::Widget::VSplit->new( ... )
->set_left_child ( Tickit::Widget::Box->new ... )
->set_right_child( Tickit::Widget::Box->new ... );
the way that chains... it's giving effortless. ππ«Ά
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk> β the legend herself, we love her, periodt. π
and that's a wrap bestie!! this page came to you courtesy ofperl v5.40.0, dated2024-09-16, and yes it's still filed underTickit...VSplit(3pm)π©· go forth and split some widgets, you got this πβ¨π
π¦ where this page comes from
- ubuntu resolute: libtickit-widgets-perl 0.42-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtickit-widgets-perl 0.42-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms