NAME
TUI::Dialogs::History - history browser for dialog input fields
HIERARCHY
TObject
TView
THistory
SYNOPSIS
use TUI::Dialogs;
my $history = TUI::Dialogs::History->new(
bounds => $bounds,
link => $inputLine,
historyId => 1
);
DESCRIPTION
THistory implements a history browser for dialog input controls. It is typically displayed as a small down-arrow icon next to an input field and allows users to recall previously entered values.
Each history object is linked to a specific input field and identified by a numeric history ID. Input fields that share the same history ID also share the same history list, allowing multiple controls to reuse stored values.
Whenever a new value is entered into a linked input field, the previous value is recorded automatically. When the history control is activated, a list of stored entries is displayed for selection.
THistory is designed to be used as part of a dialog and is rarely instantiated or manipulated outside that context.
VARIABLES
The following global variable affects the visual rendering of THistory.
$icon
Defines the character sequence used to display the history indicator icon. The default value uses CP437 characters to render a framed arrow symbol.
ATTRIBUTES
The following attributes are managed internally and exposed as read-only accessors.
- link
-
Reference to the associated input line control (TInputLine).
- historyId
-
Numeric identifier for the history list (PositiveOrZeroInt). Input fields using the same identifier share the same history.
CONSTRUCTOR
new
my $history = THistory->new(
bounds => $bounds,
link => $link,
historyId => $historyId
);
Creates a new history control linked to an input field.
- bounds
-
Bounding rectangle of the history control (TRect).
- link
-
Input field associated with this history control (TInputLine).
- historyId
-
Numeric identifier used to group history entries.
new_THistory
my $history = new_THistory($bounds, $link, $historyId);
Factory-style constructor using positional arguments.
This constructor is equivalent to calling new with named parameters and is provided for compatibility with traditional Turbo Vision construction patterns.
METHODS
draw
$history->draw();
Draws the history icon at the location defined by the bounding rectangle.
getPalette
my $palette = $history->getPalette();
Returns the color palette used to draw the history control.
handleEvent
$history->handleEvent($event);
Handles mouse and keyboard events directed at the history control.
initHistoryWindow
my $window = $history->initHistoryWindow($bounds);
Creates and initializes the history list window used to display stored entries.
name
my $name = $history->name();
Returns the class name.
recordHistory
$history->recordHistory($string);
Records a new entry in the history list.
shutDown
$history->shutDown();
Shuts down the history control and releases associated resources.
SEE ALSO
TUI::Dialogs::Dialog, TUI::Dialogs::InputLine, TUI::Views::View
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) 2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution). This documentation is provided under the same terms as the Turbo Vision library itself.