Gtk2::M...lButton(3)

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

πŸ’– Gtk2::MenuToolButton β€” the manual page bestie πŸ’–

okay so you found the page for Gtk2::MenuToolButton, which lives in the User Contributed Perl Documentation and is filed under Gtk2::M...lButton(3). she's a little shy in the filename, but in real life her name is Gtk2::MenuToolButton and she is, no cap, just a wrapper for GtkMenuToolButton. πŸŽ€


✨ NAME ✨

Gtk2::MenuToolButton β€” wrapper for GtkMenuToolButton. that's it. that's the whole vibe. she wraps, she serves, she holds a menu. πŸ’…


🌸 HIERARCHY 🌸

okay so this is the family tree and honestly it's giving royalty. every layer of this lineage is a glow-up:

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

she's the baby of the family, at the very bottom, and she inherited everything. generational wealth of methods fr fr. πŸ‘‘


πŸ¦‹ INTERFACES πŸ¦‹

she also implements these, because she's multi-talented and we love that for her:

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

πŸŽ€ METHODS πŸŽ€

toolitem = Gtk2::MenuToolButton->new ($icon_widget, $label)

the constructor!! make a brand new one. arguments:

  • $icon_widget β€” a Gtk2::Widget or undef (undef is valid, she's not judgy)
  • $label β€” a string or undef (again, undef is fine, live your truth)

toolitem = Gtk2::MenuToolButton->new_from_stock ($stock_id)

build one straight from a stock item. arguments:

  • $stock_id β€” a string

$button->set_arrow_tooltip_markup ($markup)

sets the arrow tooltip using markup. arguments:

  • $markup β€” a string or undef
Since: gtk+ 2.12 ✨

$button->set_arrow_tooltip ($tooltips, $tip_text, $tip_private)

the old-school tooltip setter. arguments:

  • $tooltips β€” a Gtk2::Tooltips
  • $tip_text β€” a string
  • $tip_private β€” a string

$button->set_arrow_tooltip_text ($text)

sets the arrow tooltip as plain text. arguments:

  • $text β€” a string or undef
Since: gtk+ 2.12 ✨

widget or undef = $button->get_menu

gets the menu. that's it. that's the whole thing. she returns a widget or undef. 🫢

$button->set_menu ($menu)

sets the menu. arguments:

  • $menu β€” a Gtk2::Widget or undef

πŸ’œ PROPERTIES πŸ’œ

  • 'menu' (Gtk2::Menu : default undef : readable / writable / private / static-nick / static-blurb) β€” the dropdown menu. yes, that's the description. The dropdown menu. short, iconic, no notes. πŸ’…

πŸ”₯ SIGNALS πŸ”₯

  • show-menu (Gtk2::MenuToolButton) β€” she emits this and the menu shows up. main character entrance behavior, honestly.

🌈 SEE ALSO 🌈

the whole friend group, if you wanna go read more:

  • 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.


and that's the page bestie!! πŸ₯° this was documented by the perl crew, version perl v5.42.0, dated 2025-07-25 β€” go forth and make menus pop off. mwah. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from