Tickit...MenuBar(3pm)

πŸ“¦ version 0.16, in alpine 3.24

πŸ’– NAME πŸ’–

Tickit::Widget::MenuBar β€” display a menu horizontally.

This is the Tickit...MenuBar(3pm) manual page, from the User Contributed Perl Documentation, and it's literally all about Tickit::Widget::MenuBar. Slay. πŸŽ€


✨ SYNOPSIS ✨

use Tickit;
use Tickit::Widget::Menu;
use Tickit::Widget::Menu::Item;
use Tickit::Widget::MenuBar;
use Tickit::Widget::VBox;

my $tickit = Tickit->new;

my $vbox = Tickit::Widget::VBox->new;
$tickit->set_root_widget( $vbox );

$vbox->add( Tickit::Widget::MenuBar->new(
   items => [
      ...
   ]
);

$vbox->add( ... );

$tickit->run;

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this widget class is a container for menu items, similar to Tickit::Widget::Menu, but it displays them horizontally in a single line. It's giving top-of-the-screen main character energy, not tiny little pop-up chaos. πŸ’…

This widget is meant for long-term display, like the top line of the root window, rather than being used only transiently as a pop-up menu. It's the menu bar that stays on the screen and does its thing, no cap.

Use it similarly to Tickit::Widget::Menu, except that its name is never useful, and you should add it to a container widget, such as Tickit::Widget::VBox, for longterm display.

🚨 Important vibe check: it does not have a "popup" or "dismiss" method.

A single separator object can be added as an item, causing all the items after it to be right-justified. One separator, and everything after it slides right. Iconic. ✨


🌈 STYLE 🌈

The default style pen is used as the widget pen.

The following style pen prefixes are also used:

  • highlight => PEN β€” the pen used to highlight the active menu selection.

The following style actions are used:

  • highlight_next (<Right>) β€” highlight the next item.
  • highlight_prev (<Left>) β€” highlight the previous item.
  • highlight_first (<F10>) β€” highlight the first menu item.
  • activate (<Enter>) β€” activate the highlighted item.
  • dismiss (<Escape>) β€” dismiss the menu.
🫢 And yes, bestie, dismiss shows up as a STYLE action for <Escape>, but the DESCRIPTION still says the widget itself has no "popup" or "dismiss" method. Both facts are real. Don't come for me.

πŸ’Œ AUTHOR πŸ’Œ

Paul Evans β€” leonerd@leonerd.org.uk


This page is Tickit...MenuBar(3pm) from the User Contributed Perl Documentation, and the footer says perl v5.42.2, dated 2026-02-15. Catch you later, bestie β€” go build a cute little menu bar πŸ“πŸ’œ

πŸ“¦ where this page comes from