NAME

TUI::Help::HelpBase - paragraph and reference records for the help system

SYNOPSIS

use TUI::Help::HelpBase;

my $paragraph = TParagraph->new(
  wrap => 1,
  size => 9,
  text => 'Help text',
);
my $crossRef = TCrossRef->new(
  ref    => 100,
  offset => 0,
  length => 4,
);
my $reference = TReference->new(
  topic    => 'Introduction',
  resolved => 1,
  val      => 100,
);

DESCRIPTION

This module defines the TParagraph and TCrossRef records of the Turbo Vision help-base design, and the TReference record of the original Borland help compiler. All three are array-based Class::Struct objects with named constructors and read/write field accessors.

All fields use scalar storage. The field descriptions below use the type names from TUI::toolkit::Types to describe expected values, not enforced constraints: Class::Struct does not validate these types or calculate field values. Unspecified fields are initially undefined.

None of these records derives from TObject or provides streaming methods.

Commonly Used Features

Create records with named field values, then use the generated accessors to read or update individual fields. Paragraphs can be linked through their next accessors; the final paragraph has an undefined next value.

STRUCTURES

TParagraph

my $paragraph = TParagraph->new(
  next => undef,
  wrap => 1,
  size => 9,
  text => 'Help text',
);
$paragraph->next( $nextParagraph );

Contains the following fields in header order:

next

Maybe[Object]. Reference to the next TParagraph, or undef at the end of the paragraph chain.

wrap

Bool. Indicates whether word wrapping is enabled for the paragraph.

size

PositiveOrZeroInt. Paragraph text size, supplied by the caller.

text

Str. Paragraph text.

TCrossRef

my $crossRef = TCrossRef->new( ref => 100, offset => 0, length => 4 );
my $context = $crossRef->ref();

Contains the following fields in header order:

ref

Int. Referenced help context.

offset

Int. Cross-reference offset.

length

PositiveOrZeroInt. Cross-reference text length.

TReference

my $reference = TReference->new(
  topic    => 'Introduction',
  resolved => 1,
  val      => 100,
);
my $value = $reference->val();

Contains the following fields in header order:

topic

Str. Referenced topic name.

resolved

Bool. Indicates whether the topic reference has been resolved.

val

PositiveOrZeroInt. Numeric reference value. Only the numeric value of the original Content union is represented; fix-up lists are not supported.

SEE ALSO

THelpTopic

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