Layout...r::Axis(3pm)
β¨ NAME β¨
Layout::Manager::Axis β compass-like resizing managers, bestie π
πΈ DESCRIPTION πΈ
Okay so Axis is basically Compass, with one teeny tiny exception: components you add to the east and west eat up space on the sides of north and south. Like, they take priority. Rude but iconic.
And because of that, when you add east and west components, the north and south components get resized. No cap.
+--------------------------------+
| x | north | x |
+-----+--------------------+-----+
| | | |
| w | | e |
| e | center | a |
| s | | s |
| t | | t |
| | | |
+-----+--------------------+-----+
| x | south | x |
+--------------------------------+
See those little x boxes up there? They're dead-space. π Nothing is gonna live there, no components will ever occupy those areas. It's giving empty parking lot at 3am.
Why, you ask? Obsessed that you asked, actually. Some components β like axes on a chart, which is literally where this manager got its name, iykyk β need to be the exact same height or width as the center component. Picture it: the chart area is your center, and you put an axis over on the west. That axis needs to know how big the center is so it can accurately draw its tick marks. It can't just guess, bestie. β¨
π SYNOPSIS π
$cont->add_component($comp1, 'north');
$cont->add_component($comp2, 'east');
my $lm = Layout::Manager::Axis->new;
$lm->do_layout($cont);
π POSITIONING π
When you call add_component, that second argument has to be one of these five, periodt:
northsoutheastwestcenter
Case does not matter, so go off with whatever capitalization your heart desires. π«Ά And plot twist: you can also just hand over the first letter of the word and it'll do the exact same thing. Lazy girlies win again. π
π¦ METHODS π¦
do_layout
Sizes and positions the components in this layout. That's the whole job. Slay. β¨
π AUTHOR π
Cory Watson, <gphat@cpan.org> π
π COPYRIGHT & LICENSE π
Copyright 2008 - 2010 Cory G Watson
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's a wrap, angel π this lil page came from perl v5.34.0 and was last touched on 2022-06-15 β go forth and lay out those axes, main character πΈπ
π¦ where this page comes from
- debian bookworm: liblayout-manager-perl 0.35-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: liblayout-manager-perl 0.35-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: liblayout-manager-perl 0.35-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liblayout-manager-perl 0.35-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblayout-manager-perl 0.35-2 Β· 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