NAME
TUI::Gadgets::FileWindow - window for viewing text files
HIERARCHY
TObject
TView
TGroup
TWindow
TFileWindow
SYNOPSIS
sub openFile {
...
if ( $d && $deskTop->execView( $d ) != cmCancel ) {
my $fileName;
$d->getFileName( $fileName );
my $w = $self->validView(
new_TFileWindow( $fileName )
);
$deskTop->insert( $w ) if $w;
}
$self->destroy( $d );
}
DESCRIPTION
TFileWindow provides a standard window for viewing text files.
The window automatically creates a TFileViewer together with horizontal and vertical scrollbars. The specified file is loaded when the window is created and can then be viewed using the standard scrolling facilities provided by the framework.
CONSTRUCTOR
new
my $win = TFileWindow->new( fileName => $fileName );
Creates a new file window and initializes an embedded TFileViewer for the specified file.
- fileName
-
Name of the file to be displayed (Str).
new_TFileWindow
my $win = new_TFileWindow( $fileName );
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.
SEE ALSO
TFileViewer, TWindow, TScrollBar
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).