Curses::Toolkit::EventListener - base class for event listeners
version 0.211
Base class for event listener. An event listener is an object that is attached to a widget / window / root window, that is capable of saying if it can handle a given event, and if yes, performs specific action on it.
input : accepted_events <HASHREF> : keys are a Event class, values are CODEREFs (see below) code <CODEREF> : code to be executed if an evet listener can handle the event
The CODEREfs receive an event as argument. If they return true, then the event listener can handle this event
Given an event, returns true if the listener is capable of handling this event
input : a Curses::Toolkit::Event output : true or false
Given an event, send it to the listener. Returns the result of the event code.
input : a Curses::Toolkit::Event output : the result of the event code execution
Enables the event listener (by default the listener is enabled)
input : none output : the event listener
Disables the event listener
Return the state of the listener
input : none output : true or false
Returns true if the event listener is already attached to a widget
detach the event listener from the widget it is attached to.
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.