Gtk2::ToggleAction(3)
π Gtk2::ToggleAction β the manual, but make it cute π
okay bestie, so this page is all about Gtk2::ToggleAction, the Perl wrapper for GtkToggleAction. She's a lil toggle button's brain, basically. Let's get into it π
β¨ SYNOPSIS β¨
my $action = Gtk2::ToggleAction->new (name => 'one',
tooltip => 'One');
πΈ DESCRIPTION πΈ
lowkey important: new here is just the plain Glib::Object new (peep Gtk2::Action for that vibe). The name, label, tooltip and stock_id arguments from the C function gtk_toggle_action_new() can all be passed as key/value pairs, plus you can throw in other property values like active or sensitive. It's giving "choose your own adventure" but make it constructor args π
π¦ HIERARCHY π¦
Glib::Object
+----Gtk2::Action
+----Gtk2::ToggleAction
look at the family tree, she comes from a long line of icons π
π INTERFACES π
Gtk2::Buildable
β¨ METHODS β¨
boolean = $action->get_active
$action->set_active ($is_active)
$is_active(boolean)
get it, set it, toggle the whole vibe π«Ά
boolean = $action->get_draw_as_radio
$action->set_draw_as_radio ($draw_as_radio)
$draw_as_radio(boolean)
$action->toggled
π PROPERTIES π
'active'(boolean : default false : readable / writable / private / static-nick / static-blurb) β whether the toggle action should be active in or not.'draw-as-radio'(boolean : default false : readable / writable / private / static-nick / static-blurb) β whether the proxies for this action look like radio action proxies.
π SIGNALS π
toggled(Gtk2::ToggleAction)
π SEE ALSO π
Gtk2, Glib::Object, Gtk2::Action
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
okay that's the whole page, no cap π this was documented by the perl squad, version perl v5.42.0, dated 2025-07-25 β mwah, stan the manpage, bye bestie π«Άβ¨π
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms