Gtk2::MenuBar(3)
π 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::AtkImplementorIfaceGtk2::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.
$menubar->set_child_pack_direction ($child_pack_dir)
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.
$menubar->set_pack_direction ($pack_dir)
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 : default1: 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
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
- 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