Curses::Toolkit::Event - base class for events
version 0.211
Base class for events
None, this is an abstract class, please use one of the children
By default, an event can "propagate" : if 2 event listeners ( see EventListener) can handle an event, the event will be given to the 2 listeners, in the order the listeners were created and associated to the widget.
However, if you disable propagation, the event will be given to the first listener that can handle it, and that's it. Even if others listeners could handle it in the row, they won't be executed.
By default, an event is not restricted to a widget : if there is no listener matching the event, attached to the widget, the event is given to the parent widget recursively.
However, if you enable event restriction, the event will not be passed to the parent widget. Only the listener of the widget will be tested.
Returns the type of the event
Enable propagation of the event to other matching listeners
Disable propagation of the event to other matching listeners
Returns wether the event can propagate
Enable restriction of the event to the original widget : the event won't be passed to parent widgets
Disable restriction of the event to the original widget : the event will be passed to parent widgets
Returns wether the event is restricted to the widget
Returns a HashRef, which is attached to the event. The pointed Hash can be modified to store custom temporary data in the event. Mostly useful when creating an event listener.
Damien "dams" Krotkine
This software is copyright (c) 2011 by Damien "dams" Krotkine.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Curses::Toolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Curses::Toolkit
CPAN shell
perl -MCPAN -e shell install Curses::Toolkit
For more information on module installation, please visit the detailed CPAN module installation guide.