NAME

XAS::Lib::Curses::Root - A class for the XAS environment

SYNOPSIS

use XAS::Lib::Curses::Root;
use Curses::Toolki::Widget::Window;
use Curses::Toolkit::Widget::Button;

my $root = XAS::Lib::Curses::Root->new();
$root->add_window(
   my $window = Curses::Toolkit::Widget::Window
     ->new()
     ->set_name('main_window')
     ->add_widget(
       my $button = Curses::Toolkit::Widget::Button
         ->new()
         ->set_name('my_button')
         ->signal_connect(clicked => sub { exit(0); })
     )
     ->set_coordinates( x1 => 0, y1 => 0, x2 => '100%', y2 => '100%')
)

POE:Kernel->run();

DESCRIPTION

This is an alternative event loop for the Curses::Toolkit. I developed this when I decided to write curses based programs that would also run on Windows.

Curses::Toolkit has an external event loop that is based on POE, which uses POE::Wheel::Curses. This module uses select() to read STDIN. Windows doesn't support this, so an alternative was needed. The alternative was a polling POE task to read STDIN. While this will work on other platforms it is not optimal. So this module loads mixins to handle those alternatives.

You can read XAS::Lib::Curses::Win32 for the gory details on how to get Curses.pm to work correctly on Windows.

This module will allow all of the examples from Curses::Toolkit to run under Windows. There are differences with color selection, which this module won't address.

SEE ALSO

XAS
Curses::Toolkit
POE::Component::Curses

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2014 Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

See http://dev.perl.org/licenses/ for more information.