The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tk::PodViewer - Simple ROText based pod viewer.

SYNOPSIS

 my $podviewer = $app->PodViewer->pack;
 $podviewer->load('SomePerlFileWithPod.pm');

DESCRIPTION

Tk::PodViewer is a simple pod viewer. It inherits Tk::Frame, but delegates all options and many methods to Tk::ROText.

It supports most of the pod tags. It ignores the following tags:

     =begin
     =end
     =for
     X<>
     Z<>

OPTIONS

Switch: -fixedfontfamily

Default value 'Hack'. Specifies the font family for tags that require a fixed font family.

Switch: -loadcall

Callback called at the end of each load. Receives the source determinator as parameter.

Name: linkColor
Class: LinkColor
Switch: -linkcolor

Default value '#3030DF' (light blue). Specifies the foreground color for link tags.

Switch: -scrollbars

Only available at create time. Default value 'osoe'.

Switch: -zoom

Default value 0. Set and get the zoom factor.

METHODS

clear

Deletes all content and resets all stacks except the.

clearHistory

Resets the history stack.

configureTags

Call after widget initialization and in all zoom methods. Call this method after you make changes to any of the font options.

load($source, ?$history?)

Parses $source. $source can be a file name, a module name or a reference tp a string.

You can set $history to false if you do not want $source added to your history list. Usefull when reloading a source. By default it is set to true.

next

Only works after previous has been called. Loads the next source in the history.

previous

Only works after a link tag has been clicked. Loads the previous source in the history.

zoomIn

Increases font sizes by two pixels.

zoomNew($zoom)

Sets a new zoom size of original font sizes + $zoom pixels.

zoomOut

Decreases font sizes by two pixels.

zoomReset

Resets font sizes to zoom 0.

LICENSE

Same as Perl.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS AND CAVEATS

If you find any bugs, please contact the author.

SEE ALSO

Pod::Simple
Tk::ROText