NAME
TUI::Vision - Turbo Vision inspired TUI framework for Perl
SYNOPSIS
package MyApp;
use Moose;
use TUI::Objects;
use TUI::Drivers;
use TUI::App;
use TUI::Menus;
use TUI::Dialogs;
use TUI::Views;
extends TApplication;
use constant {
cmAbout => 1001,
};
sub initMenuBar {
my ( $class, $r ) = @_;
$r->{b}{y} = $r->{a}{y} + 1;
return TMenuBar->new(
bounds => $r,
menu => new_TSubMenu('~A~pp', kbAltA)
+ new_TMenuItem('~A~bout...', cmAbout, kbNoKey)
+ newLine()
+ new_TMenuItem('E~x~it', cmQuit, kbAltX)
);
}
sub handleEvent {
my ( $self, $event ) = @_;
$self->SUPER::handleEvent($event);
return unless $event->{what} == evCommand;
return unless $event->{message}{command} == cmAbout;
my $dialog = TDialog->new(
bounds => TRect->new( ax => 20, ay => 6, bx => 60, by => 15 ),
title => 'About'
);
$dialog->insert(
TStaticText->new(
bounds => TRect->new( ax => 3, ay => 3, bx => 35, by => 5 ),
text => 'Hello from TUI::Vision'
)
);
$dialog->insert(
TButton->new(
bounds => TRect->new( ax => 14, ay => 7, bx => 26, by => 9 ),
title => '~O~K',
command => cmOK,
flags => bfDefault
)
);
$deskTop->execView($dialog);
$self->destroy($dialog);
$self->clearEvent($event);
return;
}
package main;
my $app = MyApp->new();
$app->run();
DESCRIPTION
TUI::Vision provides a Perl port of the classic Turbo Vision framework. It is designed as a modular and portable text user interface (TUI) framework for Perl applications, based on Turbo Vision 2.0.
The framework is a clean and native Perl implementation, adapted for contemporary Perl environments while preserving the original architectural concepts.
The goal of TUI::Vision is to provide a complete and extensible TUI framework. All modules included in this release are under active development. Additional functionality will be delivered incrementally in future versions.
The following framework modules and namespace entry points are included in the distribution:
Core object system (Objects)
View and windowing system (Views)
Dialogs and widgets
Menus and status lines
Application framework: App
Drivers and hardware abstraction
Gadgets and diagnostic tools
Standard dialogs (StdDlg)
Message boxes (MsgBox)
Text rendering subsystem (TextView)
Memory utilities
Validation utilities (Validate)
Unified OO toolkit
STATUS
This distribution is under active development.
AUTHORS
Turbo Vision Development Team
J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)
CONTRIBUTORS
Contributors are documented in the POD of the respective framework modules.
COPYRIGHT AND LICENSE
Copyright (c) 1990-1994, 1997 by Borland International
Copyright (c) 2021-2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).