Tickit...Border(3pm)

πŸ’– Tickit::Widget::Border β€” the perl manual, but make it cute πŸ’–

okay bestie, so you know Tickit::Widget::Border? It's the little icon that draws a fixed-size border around a widget πŸŽ€ like it literally just wraps your fave widget in a cute lil frame and says "you're the moment". It lives in the User Contributed Perl Documentation, manual section 3pm, iykyk.


✨ SYNOPSIS ✨

use Tickit;
use Tickit::Widget::Border;
use Tickit::Widget::Static;

my $border = Tickit::Widget::Border->new
   ->set_child(
      Tickit::Widget::Static->new(
         text   => "Hello, world",
         align  => "centre",
         valign => "middle",
      )
   );

Tickit->new( root => $border )->run;

no cap, that's the whole vibe right there 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

This container widget holds a single child widget β€” one (1) child, that's it, it's giving monogamy πŸ’… β€” and it implements a border by using Tickit::WidgetRole::Borderable.


🌈 STYLE 🌈

The default style pen is used as the widget pen. that's it, that's the tea β˜•


πŸŽ€ CONSTRUCTOR πŸŽ€

new

$border = Tickit::Widget::Border->new( %args );

Constructs a new Tickit::Widget::Border object ✨ iconic behavior.

It takes arguments having the names of any of the set_* methods listed below β€” just without the set_ prefix 🫢 so if you see set_top_border down there, you just pass top_border.


πŸ‘‘ ACCESSSORS πŸ‘‘

top_border / set_top_border

$lines = $border->top_border;

$border->set_top_border( $lines );

Return or set the number of lines of border at the top of the widget πŸ’–

bottom_border / set_bottom_border

$lines = $border->bottom_border;

$border->set_bottom_border( $lines );

Return or set the number of lines of border at the bottom of the widget πŸ’–

left_border / set_left_border

$cols = $border->left_border;

$border->set_left_border( $cols );

Return or set the number of cols of border at the left of the widget πŸ’…

right_border / set_right_border

$cols = $border->right_border;

$border->set_right_border( $cols );

Return or set the number of cols of border at the right of the widget πŸ’…

set_h_border

$border->set_h_border( $cols );

Set the number of cols of both horizontal (left and right) borders simultaneously β€” one call, two borders, ate πŸ“

set_v_border

$border->set_v_border( $cols );

Set the number of lines of both vertical (top and bottom) borders simultaneously β€” yeah bestie it says $cols in the signature, we don't question the ancestors, we just copy it exactly πŸ™ˆ

set_border

$border->set_border( $count );

Set the number of cols or lines in all four borders simultaneously. all four. at once. main character energy πŸ”₯


🌸 AUTHOR 🌸

Paul Evans <leonerd@leonerd.org.uk> β€” king behavior, thank you for your service πŸ‘‘


and that's the whole page, bestie!! πŸ’œ this one came from perl v5.40.0, dated 2024-09-16, and it's filed under the name Tickit...Border(3pm) β€” you're welcome, go forth and draw borders πŸ§šβœ¨πŸŽ€

πŸ“¦ where this page comes from