Gtk2::T...lButton(3)

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

πŸ’– Gtk2::ToggleToolButton β€” the manual, but make it cute ✨

okay bestie, so this is Gtk2::ToggleToolButton, a lil wrapper for the C thing called GtkToggleToolButton, and it lives in the User Contributed Perl Documentation. yes, that gtk2-perl situation. it's a toolbutton but it's also a toggle. it's giving switch energy. πŸŽ€


🌸 NAME 🌸

Gtk2::ToggleToolButton β€” literally just a wrapper for GtkToggleToolButton. that's the whole name section, we move. πŸ’…


πŸ¦‹ HIERARCHY πŸ¦‹

here's the family tree, no cap. every single ancestor, in order:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Bin
                         +----Gtk2::ToolItem
                              +----Gtk2::ToolButton
                                   +----Gtk2::ToggleToolButton

so it's descended from Gtk2::ToolButton and that line goes all the way back up to Glib::Object. royal lineage honestly. πŸ‘‘


✨ INTERFACES ✨

these are the roles it plays, the vibes it embodies:

  • Glib::Object::_Unregistered::AtkImplementorIface
  • Gtk2::Buildable
  • Gtk2::Activatable

main character with range. 🌈


πŸ’œ METHODS πŸ’œ

the constructors 🫢

toolitem = Gtk2::ToggleToolButton->new

just new. no args. clean, minimal, iconic. πŸ’–

toolitem = Gtk2::ToggleToolButton->new_from_stock ($stock_id)
  • $stock_id (string)

make one from a stock id instead. you pass it the stock id string and boom, button.

the active stuff πŸ”₯

boolean = $button->get_active

returns a boolean β€” is it pressed in or not, bestie. πŸ‘€

$button->set_active ($is_active)
  • $is_active (boolean)

sets whether it's active. you hand it a boolean, it does the thing.


πŸŽ€ PROPERTIES πŸŽ€

  • 'active' (boolean : default false : readable / writable / private / static-nick / static-blurb) β€” "If the toggle button should be pressed in or not". default is false so it starts unpressed, but you can read it, you can write it, it's private, it's got a static nick and a static blurb. the whole package. πŸ’…

🌟 SIGNALS 🌟

  • toggled (Gtk2::ToggleToolButton) β€” fires when the toggling happens. the moment. ⭐

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, they're all related, it's a whole ecosystem:

  • Gtk2
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object
  • Gtk2::Widget
  • Gtk2::Container
  • Gtk2::Bin
  • Gtk2::ToolItem
  • Gtk2::ToolButton

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, you ate it, periodt. 🫢✨ this was perl v5.42.0 documentation, dated 2025-07-25, from the User Contributed Perl Documentation, and that's on Gtk2::ToggleToolButton. mwah. πŸ’‹

πŸ“¦ where this page comes from