Gtk2::E...onstants(3)

πŸ“¦
version 0.09 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Gtk2 Ex Constants β€” the lil extra-constants situation for working with Gnome2/Gtk2 in Perl. (The man page itself shows up as Gtk2::E...onstants(3) because the terminal is a hater and truncates, but bestie, it's the same vibe. πŸ’…)


✨ SYNOPSIS ✨

Like, here's how you actually pull them in:

# import only the PACKing and PADing constants
use Gtk2::Constants qw( :pack :pad );

That's it. That's the whole vibe. 🫢


🌸 DESCRIPTION 🌸

So this module is basically a big ol' bag of constant values for very specific lil corners of working with Gnome2/Gtk2 Perl. The main character reason these constants exist (besides giving you unified values so you're not out here guessing) is to help you write human-readable code that follows consistent naming conventions. It's giving clean code, it's giving you'll-actually-understand-this-in-six-months. No cap. πŸ’–


πŸŽ€ EXPORT TAGS πŸŽ€

These are the tags you can pull in:

:all :truth :pad :pack :align :justify :policy

πŸ‘‘ CONSTANTS BY TAG πŸ‘‘

πŸ¦‹ :truth

The booleans, the yes-and-no of it all:

TRUE = 1
FALSE = 0

πŸ’œ :pad

Spacing constants, for when your widgets need room to breathe:

PAD_EDGE = 12
PAD_WIDGET = 8
PAD_ZERO = 0

🌈 :pack

Packing constants β€” note these are two-value pairs ( expand, fill ):

PACK_EXPAND = ( 1, 0 )
PACK_FILL = ( 0, 1 )
PACK_ZERO = ( 0, 0 )
PACK_GROW = ( 1, 1 )

⭐ :align

Alignment floats, because centering things is, lowkey, a whole personality trait:

A_LEFT = 0.00
A_CENTRE = 0.50
A_RIGHT = 1.00
A_TOP = 0.00
A_MIDDLE = 0.50
A_BOTTOM = 1.00

πŸ“ :justify

Justification strings β€” the horizontal ones and the vertical ones live together here, iykyk:

J_LEFT = 'left'
J_CENTRE = 'center'
J_RIGHT = 'right'
J_FILL = 'fill'

🧚 :policy

Scrollbar policy strings, for when you can't decide how much scrolling you're emotionally available for:

P_ALWAYS = 'always'
P_AUTO = 'automatic'
P_NEVER = 'never'

😭 BUGS 😭

Please report any bugs to the mailing list. (Mailing list deets are right below, bestie, don't scroll away. 🫢)


πŸ’Œ CONTRIBUTE πŸ’Œ

Okay so if you've got constants that are related to Gnome2/Gtk2 Perl, that are not already implemented in here, and you feel like other people might benefit from having them included? Please do not hesitate to send them to the mailing list. Sharing is caring, and honestly it's giving community. πŸ’…


πŸ“¬ MAILING LIST πŸ“¬

http://opendoorsoftware.com/lists/gtk2-ex-list
gtk2-ex-list@opendoorsoftware.com

🌟 AUTHORS 🌟

The icons who made this:

Kevin C. Krinke, <kckrinke@opendoorsoftware.com>
James Greenhalgh, <jgreenhalgh@opendoorsoftware.com>

Gtk2::Ex::Constants - Useful constants for working with Gnome2/Gtk2 Perl.
Copyright (C) 2005 Open Door Software Inc. <ods@opendoorsoftware.com>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
Fr fr, read the license, bestie β€” it's the LGPL v2.1-or-later and it's doing the legal heavy lifting so you don't have to. 🫢

And that's the whole page!! This lil doc shipped as part of perl v5.42.0, dated 2025-07-25. Thanks for reading, you absolute scholar β€” go forth and write some consistent, human-readable Gtk2 Perl. Periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from