Gtk2::MenuBar(3)

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

πŸ’– Gtk2::MenuBar πŸ’–

okay bestie, so this is Gtk2::MenuBar β€” literally just the wrapper for GtkMenuBar, no cap. it's the lil bar at the top of your window that holds all your menus. it's giving "File Edit View Help" energy, and honestly? iconic.

this page is from the User Contributed Perl Documentation for Gtk2::MenuBar(3), so you know it's the real deal 🫢


🌈 HIERARCHY

the family tree, and yes she comes from a long line of distinguished ancestors:

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

main character lineage fr fr πŸ‘‘


✨ INTERFACES

she also implements these, because she's multi-talented:

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

πŸŽ€ METHODS

widget = Gtk2::MenuBar->new

make a fresh new menubar, brand new, no notes πŸ’…

packdirection = $menubar->get_child_pack_direction

gets the child pack direction. since gtk+ 2.8, okay? don't forget it.

sets it. here's the tea:

  • $child_pack_dir (Gtk2::PackDirection)

since gtk+ 2.8.

packdirection = $menubar->get_pack_direction

gets the pack direction. also since gtk+ 2.8, bestie.

sets the pack direction, and here's what she takes:

  • $pack_dir (Gtk2::PackDirection)

since gtk+ 2.8.


πŸ”₯ PROPERTIES

  • 'child-pack-direction' (Gtk2::PackDirection : default "ltr" : readable / writable / private / static-nick / static-blurb) β€” the child pack direction of the menubar 🌸
  • 'pack-direction' (Gtk2::PackDirection : default "ltr" : readable / writable / private / static-nick / static-blurb) β€” the pack direction of the menubar 🌸

πŸ’… STYLE PROPERTIES

the glow-up details, lowkey the best part:

  • 'internal-padding' (integer : default 1 : readable / private / static-nick / static-blurb) β€” amount of border space between the menubar shadow and the menu items ✨
  • 'shadow-type' (Gtk2::ShadowType : default "out" : readable / private / static-nick / static-blurb) β€” style of bevel around the menubar ✨

πŸ¦‹ ENUMS AND FLAGS

enum Gtk2::PackDirection

four directions, all valid, all slaying:

  • 'ltr' / GTK_PACK_DIRECTION_LTR
  • 'rtl' / GTK_PACK_DIRECTION_RTL
  • 'ttb' / GTK_PACK_DIRECTION_TTB
  • 'btt' / GTK_PACK_DIRECTION_BTT

πŸ‘€ SEE ALSO

go read these too, they're the whole friend group:

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::MenuShell


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 whole vibe bestie!! this page is from perl v5.42.0, dated 2025-07-25 β€” so if you ever need to cite your sources in the group chat, that's the receipt 🧾✨ mwah, go build something cute πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from