logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

"Tickit::Widget::VSplit" - an adjustable vertical split between two widgets

Accessors

left_childset_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_childset_right_child
          $child = $hsplit->right_child;

          $vsplit->set_right_child( $child );

       Accessor for the child widget used in the right 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::VSplit->new( ... )
             ->set_left_child ( Tickit::Widget::Box->new ... )
             ->set_right_child( Tickit::Widget::Box->new ... );

Author

       Paul Evans <leonerd@leonerd.org.uk>

perl v5.40.0                                       2024-09-16                        Tickit::Widget::VSplit(3pm)

Constructor

new
          $vsplit = Tickit::Widget::VSplit->new( %args );

       Constructs a new "Tickit::Widget::VSplit" object.

Description

       This container widget holds two child widgets, displayed side by side. The two widgets are displayed with
       a vertical 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.

Name

       "Tickit::Widget::VSplit" - an adjustable vertical split between two widgets

Style

       The default style pen is used as the widget pen. 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

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;

See Also