Gtk2::E...leButton(3)
π NAME
Gtk2::Ex::FormFactory::ToggleButton β bestie, it's literally A ToggleButton in a FormFactory framework. That's the whole vibe. Also hi, this is from the User Contributed Perl Documentation, and the page title Gtk2::E...leButton(3) got truncated by the terminal because apparently even man pages have a character limit π
β¨ SYNOPSIS
Gtk2::Ex::FormFactory::ToggleButton->new (
true_label => Label of the activated button,
false_label => Label of the deactivated button,
stock => Name of stock image for this button,
clicked_hook => Coderef to called on clicking,
image => Filename of image to put on button,
...
Gtk2::Ex::FormFactory::Widget attributes
);
not the ... in there doing absolutely nothing but being mysterious π iconic behavior honestly
π DESCRIPTION
Okay so real talk: this class implements a ToggleButton inside a Gtk2::Ex::FormFactory framework. That's it, that's the job.
The way it works is the state of the ToggleButton is controlled by the associated application object attribute, and that attribute should has a boolean value. (yes, "should has". I'm not fixing it, it's the original's grammar and I respect the author's choices π«Ά)
π OBJECT HIERARCHY
Here's the family tree, no cap:
Gtk2::Ex::FormFactory::Intro
Gtk2::Ex::FormFactory::Widget
+--- Gtk2::Ex::FormFactory::ToggleButton
Gtk2::Ex::FormFactory::Layout
Gtk2::Ex::FormFactory::Rules
Gtk2::Ex::FormFactory::Context
Gtk2::Ex::FormFactory::Proxy
the +--- is giving "this is the child, this is the main character" energy π
π¦ ATTRIBUTES
So here's the tea on attributes, bestie: they're handled through the common get_ATTR(), set_ATTR() style accessors, BUT β and this is important β they are mostly passed once to the object constructor and must not be altered after the associated FormFactory was built. Like, don't touch. Set it and forget it. periodt.
true_label = SCALAR [optional]
Once the button is activated this label is set. boom, labeled β¨
false_label = SCALAR [optional]
Once the button is deactivated this label is set. the duality of button π¦
clicked_hook = CODEREF [optional]
This is for convenience and it connects the CODEREF to the clicked signal of the button. lowkey the easiest signal hookup you'll ever do ngl.
stock = SCALAR [optional]
You may specify the name of a stock item here, and that stock item should be added to the button. Example fr fr: 'gtk-edit' for the standard Gtk Edit stock item. And plot twist β you may combine stock and label arbitrarily. mix and match, it's your world π
image = FILENAME [optional]
Use just this image for the button. No additional label is applied. like at all. none. the image is the whole moment π
For more attributes refer to Gtk2::Ex::FormFactory::Widget. go read that one too, it's got the rest of the lore π
πΈ AUTHORS
JΓΆrn Reder <joern at zyn dot de>
shoutout to JΓΆrn, the original icon, the blueprint, we stan π
π COPYRIGHT AND LICENSE
Copyright 2004-2006 by JΓΆrn Reder.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details.
You should have received a copy of the GNU Library 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.
β οΈ bestie that "WITHOUT ANY WARRANTY" is in ALL CAPS for a reason, they are NOT playing around, no promises were made, protect yourself π
π POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 200:
Non-ASCII character seen before =encoding in 'JΓΆrn'. Assuming UTF-8
not the ΓΆ in JΓΆrn getting flagged by the parser π the audacity. UTF-8 got assumed anyway though so we move π
and that's a wrap, bestie! this page is from perl v5.42.0, dated 2025-07-25, and it's the Gtk2::E...leButton(3) man page living its best life under the User Contributed Perl Documentation banner. go build something cute with it, mwah πβ¨π
π¦ where this page comes from
- fedora 43: perl-Gtk2-Ex-FormFactory 0.67-39.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms