Sprog::TextView.3pm

Langue: en

Autres versions - même langue

Version: 2005-06-14 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

Sprog::TextView - a text-mode user interface for Sprog

DESCRIPTION

This class implements the 'view' logic for Sprog when it is invoked in "--nogui" mode.

In "--nogui" mode, Sprog can load and run machine files with a number of limitations:

*
There is no facility for interacting with a machine. In particular, you cannot build a machine in "--nogui" mode.
*
Not all gears support a "--nogui" view. Any gears which interact with the user while a machine is running are unlikely to work.

CLASS METHODS

new ( key => value, ... )

Constructor. Called by the Sprog application object.

INSTANCE METHODS

alert ( message, detail )

When an alert is raised, this method will print the alert message and details to standard error and will then signal the application to quit.

add_gear_view ( gear )

Creates a view object for the specified gear. The default class is Sprog::TextGearView which does almost nothing. The "view_subclass" specified in the gear's metatdata will be used if it is defined.

gear_view_by_id ( id )

Returns the view object for the gear identified by "id".

NO-OP METHODS

The following methods are defined for compatibility with the API of the GtkView class, but don't actually do anything:

apply_prefs ( )

set_window_title ( )

update_gear_view ( )

status_message ( )

running ( )

PREREQUISITES

When Sprog is run in "--nogui" mode, it does not require the Gtk2 classes, but it does require "Glib". Copyright 2005 Grant McLean <grantm@cpan.org>

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