Gtk2::E...leButton(3)

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

πŸ’… 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 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