Pango::TabArray(3)
π Pango::TabArray β a Perl wrapper page, but make it cute
Okay bestie, this is from the User Contributed Perl Documentation section (manual page Pango::TabArray(3)), and it's literally just a lil' Perl wrapper situation. Let's get into it π«Ά
β¨ NAME β¨
Pango::TabArray β it's a wrapper for PangoTabArray. That's it, that's the whole vibe. Lowkey iconic for how straightforward it is.
πΈ HIERARCHY πΈ
Check the family tree, she's got lineage:
Glib::Boxed
+----Pango::TabArray
So Pango::TabArray is a Glib::Boxed girlie. Periodt.
π METHODS π
π tabarray = Pango::TabArray->new ($initial_size, $positions_in_pixels, ...)
Make a brand new one, slay. The args are:
$initial_size(integer)$positions_in_pixels(boolean)...(list) β pairs ofPango::TabAlign's and integers, i.e. the alignments and positions of the tab stops. One alignment, one position, one alignment, one position, you get it π
π tabarray = Pango::TabArray->new_with_positions ($initial_size, $positions_in_pixels, ...)
Same energy, different name. The args:
$initial_size(integer)$positions_in_pixels(boolean)...(list) β pairs ofPango::TabAlign's and integers, the alignments and positions of the tab stops.
It's an alias for new. Literally the same thing. Two names, one queen π
π boolean = $tab_array->get_positions_in_pixels
Tells you the $positions_in_pixels situation as a boolean. No args, she just answers. β¨
π $tab_array->resize ($new_size)
Resize the tab array. Args:
$new_size(integer)
Glow-up or shrink-down, your call π
π integer = $tab_array->get_size
Returns the size, as an integer. Chef's kiss, no notes.
π list = $tab_array->get_tab ($tab_index)
Grabs one tab. Args:
$tab_index(integer)
Returns a list, bestie. Remember that.
π $tab_array->set_tab ($tab_index, $alignment, $location)
Sets a tab. Args:
$tab_index(integer)$alignment(Pango::TabAlign)$location(integer)
π list = $tab_array->get_tabs
Returns a list of Pango::TabAlign's (the alignments) and integers (the locations).
Now listen, this part matters β and yes the original does say "elemtents", we're not fixing it, it's part of the lore π β the even elements are alignments and the odd elements are locations. So 0 is the first alignment, 1 is the first location, 2 is the second alignment, 3 is the second location, etc. Index math, but make it fashion π
π ENUMS AND FLAGS π
enum Pango::TabAlign
The whole menu of alignments, take your pick:
'left'/'PANGO_TAB_LEFT''right'/'PANGO_TAB_RIGHT''center'/'PANGO_TAB_CENTER''decimal'/'PANGO_TAB_DECIMAL'
Four options, all valid, all gorgeous π¦
π SEE ALSO π
Go look at Pango and Glib::Boxed if you want the full picture. Iykyk.
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team. Respect the elders π«Ά
This software is licensed under the LGPL. See Pango for a full notice β they've got the whole legal saga over there, go read it if that's your thing.
And that's the whole page!! Signing off with the receipts: this was perl v5.42.0, dated 2019-09-16 β vintage but still serving πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms