Tickit...::HLine(3pm)

πŸ“¦
version 0.42 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ Tickit::Widget::HLine β€” the manual page, bestie edition ✨

okay so you're reading the Tickit...::HLine(3pm) page from the User Contributed Perl Documentation, and honestly? it's giving horizontal line excellence πŸ’… let's go


🌈 NAME 🌈

Tickit::Widget::HLine β€” a widget displaying a horizontal line πŸŽ€


⭐ SYNOPSIS ⭐

use Tickit::Widget::VBox;
use Tickit::Widget::HLine;

my $vbox = Tickit::Widget::VBox->new;

$vbox->add( ... );

$vbox->add( Tickit::Widget::HLine->new );

$vbox->add( ... );

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

πŸ’– DESCRIPTION πŸ’–

so this class hands you a widget that draws one single horizontal line, and it does it with line-drawing characters β€” yes, the pretty box-drawing ones, not some sad little hyphen situation πŸ™ˆ

it consumes the full width of the window its parent gives it. like, all of it. every column. no crumbs left. πŸ‘‘

by default it's drawn in the vertical middle of the window, but bestie you can absolutely adjust that with the valign style value ✨


🌸 STYLE 🌸

the default style pen is used as the widget pen, no cap.

and then these extra style keys are in the mix:

  • line_style => INT β€” the style to draw the line in πŸ–ŠοΈ it must be one of the LINE_* constants from Tickit::RenderBuffer, so don't be out here making up your own numbers, iykyk.
  • valign => NUM | STR β€” a fraction giving a position within the window to draw the line. defaults to 0.5, which puts it right in the middle 🎯

symbolic names of "top", "middle" and "bottom" are also accepted β€” very demure, very mindful 🌸


πŸ¦‹ CONSTRUCTOR πŸ¦‹

new

$hline = Tickit::Widget::HLine->new( %args );

constructs a new Tickit::Widget::HLine object πŸ’« that's it, that's the whole job, and it ate.


πŸ‘‘ AUTHOR πŸ‘‘

Paul Evans <leonerd@leonerd.org.uk>


ok that's the whole page, you're basically a Tickit::Widget::HLine expert now 🫢 go draw a line, main character πŸ’œ

this was perl v5.40.0, dated 2024-09-16, and it's the Tickit...::HLine(3pm) page β€” mwah, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from