Prima::...tIndents(3)

πŸ“¦
version 1.74000 Β· 5 versions
, in opensuse-leap 16.0

πŸ’… Prima::Widget::IntIndents β€” indenting support (yep, that's the Prima::...tIndents(3) page, bestie)

Okay so this is one of those pages where the title gets truncated by the man renderer and honestly? It's giving mystery. The real name is Prima::Widget::IntIndents, and it's pure Perl widget glue, no cap.


✨ NAME ✨

Prima::Widget::IntIndents β€” indenting support. That's it, that's the whole vibe check. πŸŽ€


🌸 DESCRIPTION 🌸

So like, this module gives you common functionality for widgets that delegate part of their surface to border elements. Think of it as the friend that holds your bag while you do your thing. 🫢

For example β€” and these are the actual examples, not me making stuff up β€” scroll bars and borders in a list box are such elements. Iconic behavior, honestly.


πŸ¦‹ Properties πŸ¦‹

  • indents ARRAY β€” holds four integers that say how wide the decoration elements are on each side. The order is very specific, so listen up:
    1. the first integer is the width of the left element
    2. the second is the height of the lower element
    3. the third is the width of the right element
    4. the fourth is the height of the upper element

And the tea on the property itself: it can accept and return the array either as four scalars, or as an anonymous array of four scalars. Both. It's flexible like that. πŸ’…


🧚 Methods 🧚

  • get_active_area [ TYPE = 0, WIDTH, HEIGHT ] β€” calculates and returns the extension of the area without the border elements. That's the active area ✨. The extension is related to the current size of a widget β€” but plot twist, you can override it by specifying WIDTH and HEIGHT.

TYPE is an integer that says which type of calculation you want:

  • TYPE = 0 β€” returns four integers, defining the area in the inclusive-exclusive coordinates.
  • TYPE = 1 β€” returns four integers, defining the area in the inclusive-inclusive coordinates.
  • TYPE = 2 β€” returns two integers, the size of the area.

Default is TYPE = 0, so if you just call it bare, you get the inclusive-exclusive four-integer situation. No notes. πŸ“

Heads up bestie: those coordinate modes are different and the numbers you get back differ accordingly β€” don't mix them up mid-calculation or it's gonna be a whole thing. 😭

πŸ‘‘ AUTHOR πŸ‘‘

Dmitry Karasik, <dmitry@karasik.eu.org>. Give them their flowers. πŸ’


πŸ’œ SEE ALSO πŸ’œ

  • Prima
  • Prima::Widget

Go read those next, iykyk. πŸ”₯


Fr fr that's the whole page β€” brought to you by perl v5.42.0 and dated 2024-08-20, straight from the Prima::...tIndents(3) manual. Mwah πŸ’‹

πŸ“¦ where this page comes from