NAME
TUI::Menus::StatusDef - status line definition entry
SYNOPSIS
use TUI::Menus;
my $def = new_TStatusDef(
0,
0xFFFF,
$items
);
DESCRIPTION
TStatusDef represents a single definition entry used to describe the contents of a TUI::Vision status line. Each definition associates a range of help context identifiers with a list of status line items.
Multiple TStatusDef objects can be linked together to form a definition chain. At runtime, the status line selects the first definition whose context range matches the current help context and displays the associated items.
This class is primarily used internally by the status line infrastructure and is rarely manipulated directly by application code.
TStatusDef supports chaining through operator overloading. Multiple status definitions can be combined using the + operator to form a definition list. The resulting structure is evaluated sequentially to determine the active status line entries.
ATTRIBUTES
The following attributes describe the definition entry. Optional attributes may be omitted entirely.
- min
-
Lower bound of the help context range (PositiveOrZeroInt).
- max
-
Upper bound of the help context range (PositiveOrZeroInt).
- items
-
Optional reference to a list of status line items (TStatusItem).
- next
-
Optional reference to the next
TStatusDefin the definition chain.
CONSTRUCTOR
new
my $def = TStatusDef->new(
min => $min,
max => $max,
items => $items,
next => $next
);
Creates a new status definition entry.
- min
-
Minimum help context value.
- max
-
Maximum help context value.
- items
-
Optional list of status line items.
- next
-
Optional link to the next definition entry.
new_TStatusDef
my $def = new_TStatusDef($min, $max, | $items, | $next);
Factory-style constructor using positional arguments.
The $items and $next parameters are optional and may be omitted entirely. This constructor is provided for compatibility with traditional Turbo Vision construction patterns.
METHODS
add
my $chain = add($left, $right);
my $chain = add($left, $right, $swap);
Combines two status definition chains into a single linked list. When $swap is true, the order of the operands is reversed.
Implements the + operator for chaining status definitions.
This allows multiple TStatusDef objects to be combined into a single definition list using the + operator.
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).