NAME

Curses::Toolkit::Role::Focusable - This role implements the fact that a widget can have focus

VERSION

version 0.211

DESCRIPTION

If a widget inherits of this role, it can be focused (except if its sensitivity is set to false).

This role can be merged in anything that is a Curses::Toolkit::Widget

CONSTRUCTOR

None, this is a role, so it has no constructor

is_focusable

Returns 1, except if the widget has its sensitivity set to false

set_focus

$widget->set_focus(1); # set focus to this widget
$widget->set_focus(0); # remove focus from this widget

Sets the focus on/off on the widget.

input : a boolean
output : the widget

is_focused

Retrieves the focus setting of the widget.

input : none
output : true if the widget is focused, or false if not

AUTHOR

Damien "dams" Krotkine

COPYRIGHT AND LICENSE

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.