Lire::UI::Widget3pm
Views for lire::config::value object.
Usage
use Curses::UI;use Lire::Config;Lire::Config->init();my $ui = new Curses::UI();my $window = $ui->add( 'window', 'Window' );my $widget = $window->add( 'widget', 'Lire::UI::Widget','value' => Lire::Config->get_var( 'name' ));
Overview
Lire::UI::Widget defines Curses::UI::Widget subclasses that can be used to edit Lire::Config::Value object.
new( %args, 'value' => $value, [ onvaluechanged => $handler ] )
The new() method is really a factory method which instantiate a proper Lire::UI::Widget subclass based on the type of the Lire::Config::Value $value. The onvaluechanged is an event that will be trigger whenever the Lire::Config::Value is modified by the user.
value()
Returns the Lire::Config::Value object which is edited by this view.
onValueChanded( $code )
Changes the event handler connected to the 'onvaluechanged' event. This event is trigger whenever the Lire::Config::Value associated to this widget is modified.
refresh_view()
This method can be called to update the view to reflect modifications to the underlying Lire::COnfig::Value.
Version
$Id: Widget.pm,v 1.27 2006/07/23 13:16:32 vanbaal Exp $
Releases
6 releases since Debian 3.1 (Sarge); the text changed 5 times.