NAME

TUI::App::DeskInit - helper for desktop background initialization

SYNOPSIS

use TUI::App::DeskInit;

my $deskInit = TDeskInit->new(
  createBackground => sub {
    my ($rect) = @_;
    return TBackground->new($rect, ' ');
  }
);

DESCRIPTION

TDeskInit encapsulates the logic required to create the desktop background view during application initialization.

The class stores a background factory callback which is invoked to construct a TBackground instance for a given screen rectangle. This allows applications to customize how the desktop background is created without embedding that logic directly into the desktop or application classes.

TDeskInit is not a view itself and is not intended to be used directly by application code beyond application setup.

CONSTRUCTOR

new

my $deskInit = TDeskInit->new(
  createBackground => \&callback
);

Creates a new desktop initialization helper.

createBackground

A code reference that is called with a TRect argument and must return a TBackground object. This callback defines how the desktop background view is constructed.

new_TDeskInit

my $deskInit = new_TDeskInit(\&callback);

Factory-style constructor using positional arguments.

METHODS

createBackground

my $background = $deskInit->createBackground($rect);

Invokes the stored background factory callback and returns a background view for the specified rectangle.

SEE ALSO

TUI::App::DeskTop, TUI::App::Background

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).