Gtk2::ToggleAction(3)

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

πŸ’– 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 (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