Gtk2::ToolShell(3)
π Gtk2::ToolShell π
okay bestie, gather round, because we're talking about Gtk2::ToolShell β it's the Perl wrapper for GtkToolShell, and it lives in the User Contributed Perl Documentation corner of the manual, which is exactly where the cool kids hang out. π
β¨ HIERARCHY β¨
the family tree, and yes it's a short one:
Glib::Interface
+----Gtk2::ToolShell
so it's a Glib::Interface, not a full class β it gets bolted onto things. interface energy, honestly. π
πΈ METHODS πΈ
here's the whole menu, no skips, no cuts:
ellipsizemode = $shell->get_ellipsize_modeβ hands you the ellipsize mode. Since: gtk+ 2.20iconsize = $shell->get_icon_sizeβ tells you what size the icons are living at.orientation = $shell->get_orientationβ the orientation. which way is it facing? find out.$shell->rebuild_menuβ rebuilds the menu. that's it. that's the whole job. πreliefstyle = $shell->get_relief_styleβ gives you the relief style back.toolbarstyle = $shell->get_styleβ returns the toolbar style. (yes the method isget_style, notget_toolbar_style, don't come for me, that's just what it is π«Ά)double = $shell->get_text_alignmentβ adouble, aka the text alignment. Since: gtk+ 2.20orientation = $shell->get_text_orientationβ the text orientation this time, not the regular one. Since: gtk+ 2.20sizegroup or undef = $shell->get_text_size_groupβ returns a size group, orundefif there isn't one. plan accordingly. Since: gtk+ 2.20
π ENUMS AND FLAGS π
all the little named constants, spelled out exactly, both the short vibe and the long GTK_-style one:
π¦ enum Gtk2::IconSize
'invalid'/GTK_ICON_SIZE_INVALID'menu'/GTK_ICON_SIZE_MENU'small-toolbar'/GTK_ICON_SIZE_SMALL_TOOLBAR'large-toolbar'/GTK_ICON_SIZE_LARGE_TOOLBAR'button'/GTK_ICON_SIZE_BUTTON'dnd'/GTK_ICON_SIZE_DND'dialog'/GTK_ICON_SIZE_DIALOG
π§ enum Gtk2::Orientation
'horizontal'/GTK_ORIENTATION_HORIZONTAL'vertical'/GTK_ORIENTATION_VERTICAL
β enum Gtk2::ReliefStyle
'normal'/GTK_RELIEF_NORMAL'half'/GTK_RELIEF_HALF'none'/GTK_RELIEF_NONE
π enum Gtk2::ToolbarStyle
'icons'/GTK_TOOLBAR_ICONS'text'/GTK_TOOLBAR_TEXT'both'/GTK_TOOLBAR_BOTH'both-horiz'/GTK_TOOLBAR_BOTH_HORIZ
π enum Pango::EllipsizeMode
'none'/PANGO_ELLIPSIZE_NONE'start'/PANGO_ELLIPSIZE_START'middle'/PANGO_ELLIPSIZE_MIDDLE'end'/PANGO_ELLIPSIZE_END
π₯ SEE ALSO π₯
go read these next, iykyk:
Gtk2Glib::Interface
π 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, mwah π this doc shipped as part of perl v5.42.0, dated 2025-07-25, and it was literally the best part of my day. slay, bye!! π¦β¨
π¦ 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