NAME
TUI::App::ProgInit - program initialization helper
SYNOPSIS
use TUI::App::ProgInit;
my $progInit = TProgInit->new(
createStatusLine => \&initStatusLine,
createMenuBar => \&initMenuBar,
createDeskTop => \&initDeskTop,
);
DESCRIPTION
TProgInit encapsulates the initialization logic used by a Turbo Vision application to create its main user interface components.
The class stores factory callbacks for creating the status line, menu bar, and desktop views. These callbacks are invoked during application startup to build the visible structure of the program.
TProgInit is not a view and does not participate in the view hierarchy. It exists solely to decouple application initialization from the concrete construction of user interface elements.
CONSTRUCTOR
new
my $progInit = TProgInit->new(
createStatusLine => \&statusLineFactory,
createMenuBar => \&menuBarFactory,
createDeskTop => \&deskTopFactory
);
Creates a new program initialization helper.
- createStatusLine
-
Code reference that is called with a
TRectargument and must return aTStatusLineobject. - createMenuBar
-
Code reference that is called with a
TRectargument and must return aTMenuBarobject. - createDeskTop
-
Code reference that is called with a
TRectargument and must return aTDeskTopobject.
new_TProgInit
my $progInit = new_TProgInit(
\&statusLineFactory,
\&menuBarFactory,
\&deskTopFactory
);
Factory-style constructor using positional arguments.
METHODS
createStatusLine
my $statusLine = $progInit->createStatusLine($rect);
Invokes the stored status line factory callback and returns a status line view for the specified rectangle.
createMenuBar
my $menuBar = $progInit->createMenuBar($rect);
Invokes the stored menu bar factory callback and returns a menu bar view for the specified rectangle.
createDeskTop
my $deskTop = $progInit->createDeskTop($rect);
Invokes the stored desktop factory callback and returns a desktop view for the specified rectangle.
SEE ALSO
TUI::App::Program, TUI::App::Application, TUI::App::DeskInit
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).