# Copyright (c) 2003-2004 RAZ Information Systems LTD. #You may distribute under the terms of either the GNU General Public #License or the Artistic License, as specified in the Perl README file # # =head1 NAME Tk::Text::Viewer - Simple Text Viewer =head1 SYNOPSIS use Tk; use Tk::Text::Viewer; ..... my $mw = MainWindow->new; my $t1 = $mw->Scrolled('Viewer', -wrap => 'none'......); $t1->LabelText("Search:");# Change label text or: my $t1 = $mw->Viewer()->pack(); ..... $t1->Load($filename)); Also: viewer.pl [TextFile] =head1 DESCRIPTION Tk::Text::Viewer B text widget that can display text files under TK. It enable the user to search text and navigate in a Text widget. The reason for creating this module is that it doesn't require downloading of modules other that Tk; Look for widget options in L. A separate F program is included that can be used as a stand alone file browser. =head1 WIDGET METHODS The Bwidget also inherits all the methods provided by the generic Tk::Widget and Tk::Text classes. The following additional method is available for viewer widgets: =over 4 =item I<$text_view>-EB(I<$filename>) Load file into the text widget. =item I<$text_view>-EB(string or hash ref) =over 4 =item * C<$text_view>-EC(I<"Search:">) Change label for the search entry field. You might want to change this label if the widget is used in a non English application. =item * C<$text_view>-EC(I<"-cursor=E 'dot'">) Change one label widget option (for example cursor). =item * C<$text_view>-EC(I<{text=E'Find:',-cursor=E'dot',...}>) Replace label widget options with your own set of options. B change the 'Name' option of the label widget. See L for valid options =back =item I<$text_view>-EB(string or hash ref) Change the entry widget options. Read C for information about parameters. See L for valid options. =back =head1 BINDINGS For inherited bindings look L. Following are class specific bindings. =over 4 =item "Space" Clicking Space will move text one page ahead. =item "BackSpace" Clicking BackSpace will move text one page up. =item "Slash" Clicking "/" will open text search window. =item "n" Clicking "n" will move to next search match. =item "N" Clicking "N" will move to next previous match. =item "Control-A" Find all occurrences of searched item. =back =head1 UNICODE If B<$ENV{LANG}> is a 'UTF-8' locale, file load will assume "utf8" characters in file. =head1 SEE ALSO L - A utility using C included with this package. L, L, L, Tk documentation. =head1 AUTHOR =over 4 C was written by Oded S. Resnik Eraz@raz.co.ilE in 2003. B. I You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file =back =cut