Tickit::Widget::MenuBar - display a menu horizontally
Tickit::Widget::MenuBar
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;
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.
popup
dismiss
A single separator object can be added as an item, causing all the items after it to be right-justified.
The default style pen is used as the widget pen. The following style pen prefixes are also used:
The pen used to highlight the active menu selection
The following style actions are used:
Highlight the next or previous item
Highlight the first menu item
Activate the highlighted item
Dismiss the menu
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit::Widget::Menu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit::Widget::Menu
CPAN shell
perl -MCPAN -e shell install Tickit::Widget::Menu
For more information on module installation, please visit the detailed CPAN module installation guide.