NAME

TUI::Help::HelpWindow - window that hosts a help topic viewer

HIERARCHY

TObject
  TView
    TGroup
      TWindow
        THelpWindow

SYNOPSIS

use TUI::Help;

open my $stream, '<:raw', 'help.hlp' or die $!;
my $helpFile = new_THelpFile( $stream );

$desktop->insert( new_THelpWindow( $helpFile, 10 ) );

DESCRIPTION

THelpWindow is the Perl port of the Turbo Vision THelpWindow. It is the window that presents online help. The window has a fixed size of 50 columns by 18 rows, carries the title Help, and is created without a window number (wnNoNumber). It also sets the ofCentered option.

When the window is constructed, it inserts a THelpViewer into its interior. The viewer is inset by two columns on the left and right and by one row at the top and bottom. It has a horizontal and a vertical standard scroll bar, both of which handle keyboard input. The viewer shows the help topic that belongs to the context number passed to the constructor. Topics are read from the THelpFile object passed as hFile.

CONSTRUCTOR

new

my $window = THelpWindow->new(
  hFile   => $helpFile,
  context => $context,
);

Creates a help window that displays the topic for the help context context of the help file hFile.

hFile

The help source, a THelpFile object.

context

The non-negative help context number of the topic to display.

new_THelpWindow

my $window = new_THelpWindow( $helpFile, $context );

Factory-style constructor using positional arguments. It takes the help file and the help context number, in that order, and is equivalent to calling new with the named parameters hFile and context.

METHODS

getPalette

my $palette = $window->getPalette();

Overrides the getPalette method of the base view class. Returns a clone of the cHelpWindow palette defined in TUI::Help::Const, as a TPalette object.

SEE ALSO

TUI::Help, THelpViewer, THelpFile, TWindow

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