Curses::Toolkit

A modern Curses toolkit
Download

Curses::Toolkit Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Damien Krotkine
  • Publisher web site:
  • http://search.cpan.org/~dams/

Curses::Toolkit Tags


Curses::Toolkit Description

A modern Curses toolkit Curses::Toolkit is a Perl module that tries to be a modern curses toolkit, based on the Curses module, to build "semi-graphical" user interfaces easily.WARNING : This is still in "beta" version, not all the features are implemented, and the API may change. However, most of the components are there, and things should not change that much in the future... Still, don't use it in production, and don't consider it stable.Curses::Toolkit is meant to be used with a mainloop, which is not part of this module. I recommend you POE::Component::Curses, which is probably what you want. POE::Component::Curses uses Curses::Toolkit, but provides a mainloop and handles keyboard, mouse, timer and other events, whereas Curses::Toolkit is just the drawing library. See the example above. the spawn method returns a Curses::Toolkit object, which you can call methods on.If you already have a mainloop or if you don't need it, you might want to use Curses::Toolkit directly. But again, it's probably not what you want to use. In this case you would do something like : use Curses::Toolkit; # using Curses::Toolkit without any event loop my $root = Curses::Toolkit->init_root_window(); my $window = Curses::Toolkit::Widget::Window->new(); $root->add($window); ... $root->renderSYNOPSIS # spawn a root window my $root = POE::Component::Curses->spawn(); # adds some widget $root->add_window( my $window = Curses::Toolkit::Widget::Window ->new() ->set_name('main_window') ->add_widget( my $button = Curses::Toolkit::Widget::Button ->new_with_label('Click Me to quit') ->set_name('my_button') ->signal_connect(clicked => sub { exit(0); }) ) ->set_coordinates(x1 => 0, y1 => 0, x2 => '100%', y2 => '100%', ) ); # start main loop POE::Kernel->run(); Requirements: · Perl


Curses::Toolkit Related Software