Gtk2::MenuShell(3)

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

✨ Gtk2::MenuShell ✨

okay so bestie, this is Gtk2::MenuShell β€” the wrapper for GtkMenuShell, coming at you straight outta the User Contributed Perl Documentation. it's the base class vibe for menus and menu bars, the main character energy behind all your dropdowns πŸ’…


🌸 HIERARCHY 🌸

like, this is the family tree, no cap:

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::MenuShell

πŸ¦‹ INTERFACES πŸ¦‹

it also implements these, periodt:

  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable

πŸ’– METHODS πŸ’–

  • $menu_shell->activate_item ($menu_item, $force_deactivate) β€” activates that item fr. takes:
    • $menu_item (Gtk2::Widget)
    • $force_deactivate (boolean)
  • $menu_shell->append ($child) β€” tack a child on at the end. takes:
    • $child (Gtk2::Widget)
  • $menu_shell->cancel β€” cancels the whole thing. Since: gtk+ 2.4
  • $menu_shell->deactivate β€” deactivates, that's it, that's the tweet.
  • $menu_shell->deselect β€” unselects whatever was selected. bye πŸ‘‹
  • $menu_shell->insert ($child, $position) β€” slide a child in at a specific spot. takes:
    • $child (Gtk2::Widget)
    • $position (integer)
  • $menu_shell->prepend ($child) β€” put a child at the very front, main character first. takes:
    • $child (Gtk2::Widget)
  • $menu_shell->select_first ($search_sensitive) β€” select the first one. takes:
    • $search_sensitive (boolean)

Since: gtk+ 2.2

  • $menu_shell->select_item ($menu_item) β€” select a specific item. takes:
    • $menu_item (Gtk2::Widget)
  • boolean = $menu_shell->get_take_focus β€” do we take focus or not? Since: gtk+ 2.8
  • $menu_shell->set_take_focus ($take_focus) β€” set whether we take focus. takes:
    • $take_focus (boolean)

Since: gtk+ 2.8


πŸŽ€ PROPERTIES πŸŽ€

  • 'take-focus' (boolean : default true : readable / writable / private / static-nick / static-blurb) β€” "A boolean that determines whether the menu grabs the keyboard focus" ✨

🌈 SIGNALS 🌈

  • activate-current (Gtk2::MenuShell, boolean)
  • cancel (Gtk2::MenuShell)
  • cycle-focus (Gtk2::MenuShell, Gtk2::DirectionType)
  • deactivate (Gtk2::MenuShell)
  • insert (Gtk2::MenuShell, Gtk2::Widget, integer)
  • move-current (Gtk2::MenuShell, Gtk2::MenuDirectionType)
  • boolean = move-selected (Gtk2::MenuShell, integer)
  • selection-done (Gtk2::MenuShell)

🧚 ENUMS AND FLAGS 🧚

enum Gtk2::DirectionType

  • 'tab-forward' / GTK_DIR_TAB_FORWARD
  • 'tab-backward' / GTK_DIR_TAB_BACKWARD
  • 'up' / GTK_DIR_UP
  • 'down' / GTK_DIR_DOWN
  • 'left' / GTK_DIR_LEFT
  • 'right' / GTK_DIR_RIGHT

enum Gtk2::MenuDirectionType

  • 'parent' / GTK_MENU_DIR_PARENT
  • 'child' / GTK_MENU_DIR_CHILD
  • 'next' / GTK_MENU_DIR_NEXT
  • 'prev' / GTK_MENU_DIR_PREV

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too bestie, they're all connected iykyk: Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container


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 thing, and fr fr you ate by reading all of it 🫢 this was perl v5.42.0, dated 2025-07-25, and it's the Gtk2::MenuShell(3) page β€” slay, bye bestie πŸ’–

πŸ“¦ where this page comes from