NAME
Menus - Menu and status line system for the TVision framework
SYNOPSIS
use TUI::Objects;
use TUI::App;
use TUI::Menus;
# Typical in a TApplication/TProgram subclass:
sub initMenuBar {
my ( $class, $r ) = @_;
$r->{b}{y} = $r->{a}{y} + 1;
return TMenuBar->new(
bounds => $r,
menu =>
new_TSubMenu( '~F~ile', hcNoContext ) +
new_TMenuItem( '~O~pen...', cmOpen, kbF3, hcNoContext, 'F3' ) +
newLine +
new_TMenuItem( 'E~x~it', cmQuit, kbAltX, hcNoContext, 'Alt-X' ) +
new_TSubMenu( '~H~elp', hcNoContext ) +
new_TMenuItem( '~A~bout', cmAbout, hcNoContext ),
);
}
sub initStatusLine {
my ( $class, $r ) = @_;
$r->{a}{y} = $r->{b}{y} - 1;
return new_TStatusLine( $r,
new_TStatusDef( 0, 0xFFFF ) +
new_TStatusItem( '~Alt-X~ Exit', kbAltX, cmQuit ) +
new_TStatusItem( '~F10~ Menu', kbF10, cmMenu ) +
new_TStatusItem( '~F1~ Help', kbF1, cmHelp )
);
}
DESCRIPTION
TUI::Menus provides the menu and status line subsystem for the TVision framework. It corresponds to the Turbo Vision menu architecture and includes all components required for building interactive menu bars, pull-down menus, popup menus, and status lines.
This module re-exported a wide range of menu-related classes, including:
Const - Symbolic constants for menu behavior.
TStatusItem, TStatusDef, TStatusLine - Status line and hotkey definitions.
MenuPopup (planned) Popup menu support, not yet included in the Perl port.
AUTHORS
Borland International (original Turbo Vision design)
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) 2025-2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).