Remove the dialog window.
Implementation of a horizontal menu, such as the menu bar at the top of the screen.
Adds the given item to this menu.
Default attributes - show highlighted items in bold
Apply a blue background to the standard menu
Instantiates a new menu using vertical style.
Adds a new item to this menu.
Instantiate a new menu item.
Takes the following named parameters:
label - what to display as the label, currently text only, may include an accelerator key using the & prefix for example '&File' would be 'File' with Alt-F as the shortcut
on_activate - optional code to call when the item is activated
Returns the parent for this menu.
Binds the key combination to the given coderef.
Expects two parameters: the key combination, and the coderef to call when that combination is pressed.
Examples of key combinations:
Alt-F Alt-f x Ctrl-X Shift-Y Ctrl-Alt-Z Alt-Ctrl-Insert
Adds this item to a parent Tickit::Widget::Menubar::Item.
Calls the activation function if one is defined. See the on_activate parameter to "new" for setting this.
on_activate
Sets the parent for this item. Should be another Tickit::Widget::Menubar::Item or Tickit::Widget::Menubar.
Returns the current submenu.
Returns the floating window used for the menu popup.
Shows the menu. Instantiates a new floating window.
Implements the logic to wrap the horizontal and vertical menus comprising a typical Menubar layout.
$menu->on_highlight_changed( sub { my $menu = shift; if($self->popup) { warn "Should change popup to " . $menu->highlighted_item; } } ); $menu->bind_key( sub { my ($type, $str, $key) = @_; if($type eq 'key') { if($str eq 'Escape') { warn "Had escape"; return 0 unless $self->popup; $self->popup->hide; delete $self->{popup}; $menu->redraw; return 0; } } return 1; } ); $menu; }
To install Tickit::Widget::Table, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit::Widget::Table
CPAN shell
perl -MCPAN -e shell install Tickit::Widget::Table
For more information on module installation, please visit the detailed CPAN module installation guide.