The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tickit::Widget::MenuBar - display a menu horizontally

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

This widget class acts as a container for menu items similar to Tickit::Widget::Menu but displays them horizonally in a single line. This widget is intended to display long-term, such as in the top line of the root window, rather than being used only transiently as a pop-up menu.

This widget should be used similarly to Tickit::Widget::Menu, except that its name is never useful, and it should be added to a container widget, such as Tickit::Widget::VBox, for longterm display. 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.

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_prev (<Left>)

Highlight the next or previous item

highlight_first (<F10>)

Highlight the first menu item

activate (<Enter>)

Activate the highlighted item

dismiss (<Escape>)

Dismiss the menu

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>