NAME
TStatusItem - status line item for status line definitions
SYNOPSIS
use TUI::Menus;
my $item = new_TStatusItem(
'~Alt+X~ Exit',
kbAltX,
cmQuit
);
DESCRIPTION
TStatusItem represents a single entry displayed on a TUI::Vision status line. Each item associates a text label with a keyboard shortcut and a command identifier that is sent when the item is activated.
Status items are typically linked together to form a list and are referenced by a TStatusDef object. The status line displays the items belonging to the definition whose help context range matches the current application state.
This class is primarily used internally by the menu and status line infrastructure and is rarely manipulated directly by application code.
ATTRIBUTES
The following attributes describe the status line item.
- text
-
Text label displayed on the status line (Str).
- keyCode
-
Scan code of the hot key associated with the item (PositiveOrZeroInt).
- command
-
Command identifier generated when the item is selected (PositiveOrZeroInt, typically a
cmXXXXconstant). - next
-
Optional reference to the next
TStatusItemin the item list.
CONSTRUCTOR
new
my $item = TStatusItem->new(
text => $text,
keyCode => $key,
command => $command,
next => $next
);
Creates a new status line item.
- text
-
Text label of the item.
- keyCode
-
Hot key scan code.
- command
-
Command identifier.
- next
-
Optional reference to the next status line item.
new_TStatusItem
my $item = new_TStatusItem($text, $key, $command, | $next);
Factory-style constructor using positional arguments.
The $next parameter is optional and may be omitted entirely. This constructor is provided for compatibility with traditional Turbo Vision construction patterns.
SEE ALSO
TUI::Menus::StatusDef, TUI::Menus::StatusLine
AUTHORS
Borland International (original Turbo Vision design)
J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)
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).