Gtk2::M...lButton(3)
π 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::AtkImplementorIfaceGtk2::BuildableGtk2::Activatable
π METHODS π
toolitem = Gtk2::MenuToolButton->new ($icon_widget, $label)
the constructor!! make a brand new one. arguments:
$icon_widgetβ aGtk2::Widgetorundef(undef is valid, she's not judgy)$labelβ a string orundef(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 orundef
Since: gtk+ 2.12 β¨
$button->set_arrow_tooltip ($tooltips, $tip_text, $tip_private)
the old-school tooltip setter. arguments:
$tooltipsβ aGtk2::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 orundef
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β aGtk2::Widgetorundef
π 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:
Gtk2Glib::ObjectGlib::InitiallyUnownedGtk2::ObjectGtk2::WidgetGtk2::ContainerGtk2::BinGtk2::ToolItemGtk2::ToolButton
π COPYRIGHT π
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
- 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