Gtk2::ToolShell(3)

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

πŸ’– 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.20
  • iconsize = $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 is get_style, not get_toolbar_style, don't come for me, that's just what it is 🫢)
  • double = $shell->get_text_alignment β€” a double, aka the text alignment. Since: gtk+ 2.20
  • orientation = $shell->get_text_orientation β€” the text orientation this time, not the regular one. Since: gtk+ 2.20
  • sizegroup or undef = $shell->get_text_size_group β€” returns a size group, or undef if 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:

  • Gtk2
  • Glib::Interface

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