The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Games::RailRoad::Window::Trains - an opaque vector class.

VERSION

version 1.101330

DESCRIPTION

GRW::Trains implements a POE session, creating a Tk window listing the trains existing in the simulation. The window can be hidden at will.

SYNOPSYS

    my $id = Games::RailRoad::Window::Train->spawn(%opts);
    $kernel->post( $id, 'visibility_toggle' );

CLASS METHODS

my $id = Games::RailRoad::Window::Train->spawn( %opts );

Create a window listing trains, and return the associated POE session ID. One can pass the following options:

parent => $mw

A Tk window that will be the parent of the toplevel window created. This parameter is mandatory.

PUBLIC EVENTS

The newly created POE session accepts the following events:

visibility_toggle()

Request the window to be hidden or restaured, depending on its previous state. Note that closing the window is actually interpreted as hiding the window.

AUTHOR

  Jerome Quelin

COPYRIGHT AND LICENSE

This software is copyright (c) 2008 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.