NAME
Term::Fabulous::Event::TabAdd - The user asked for a new document tab
SYNOPSIS
$tabs->on( TabAdd => sub ($event) {
push @documents, new_document();
$tabs->active($#documents);
return;
} );
DESCRIPTION
A Term::Fabulous::Widget::DocumentTabs fires TabAdd on itself when the user clicks the + button at the end of its tabs. The tabs add nothing themselves: the program makes the new document, adds its tab to the list it gave the tabs (or to what its code reference returns) and usually makes it the active one.
The event has no fields of its own; $event->target is the DocumentTabs. It is a Clay::UI::Events::Event whose name is TabAdd, and it bubbles to the widget's ancestors like every event.
CONSTRUCTOR
new
my $event = Term::Fabulous::Event::TabAdd->new;
Unknown parameters die. The name and bubble_mode parameters of Clay::UI::Events::Event are accepted.
SEE ALSO
Term::Fabulous::Widget::DocumentTabs, Term::Fabulous::Event::TabClose, Clay::UI::Events::Event.