NAME

Wx::Perl::PodBrowser -- toplevel POD browser window

SYNOPSIS

use Wx::Perl::PodBrowser;
my $browser = Wx::Perl::PodBrowser->new;
$browser->Show;
$browser->goto_pod (module => 'Foo::Bar');

CLASS HIERARCHY

Wx::Perl::PodBrowser is a Wx::Frame toplevel window.

Wx::Object
  Wx::EvtHandler
    Wx::Window
      Wx::TopLevelWindow
        Wx::Frame
          Wx::Perl::PodBrowser

DESCRIPTION

This is a simple POD documentation browser using Wx::Perl::PodRichText (which is a RichTextCtrl). The menus and any links in the text can be followed to other documents.

+-------------------------------------------+
| File  Section  Help                       |
+-------------------------------------------+
| NAME                                      |
|   Foo - some thing                        |
| DESCRIPTION                               |
|   Blah blah.                              |
| SEE ALSO                                  |
|   Bar                                     |
+-------------------------------------------+
| (statusbar)                               |
+-------------------------------------------+

Programming

The initial window size follows the 80x30 initial size of the c<Wx::Perl::PodRichText> display widget. Program code or user interaction can make the window bigger or smaller later as desired.

The menubar is available from the usual frame $browser->GetMenuBar() to make additions or modifications. The quit menu item is Wx::wxID_EXIT and closes the window with the usual frame $browser->Close(). In a multi-window program this only closes the PodBrowser window, it doesn't exit the whole program.

See examples/wx-podbrowser.pl in the Wx-Perl-PodBrowser sources for a complete sample program running a PodBrowser window standalone.

FUNCTIONS

Creation

$browser = Wx::Perl::PodBrowser->new ()
$browser = Wx::Perl::PodBrowser->new ($parent, $id, $title)

Create and return a new browser window widget.

The optional $parent, $id and $title arguments are per Wx::Frame->new().

The default $title is "POD Browser". An application could set something more specific if displaying its help pages, either here at creation or later with $browser->SetTitle() in the usual way.

Methods

$browser->reload()

Re-read the current POD module or file. This is the File/Reload menu entry.

$browser->go_back()
$browser->go_forward()

Go back or forward to the next or previous POD module or file. These are the File/Back and File/Forward menu entries.

$browser->goto_own_pod()

Go to the POD of the PodBrowser module itself. This is the "Help/POD Browser POD" menu entry.

About Dialog

$browser->popup_about_dialog()

Open the "about" dialog for $browser. This is the Help/About menu entry. It displays a Wx::AboutBox() with the $browser->about_dialog_info() per below.

$info = $browser->about_dialog_info()

Return a Wx::AboutDialogInfo object with information about $browser.

SEE ALSO

Wx, Wx::Perl::PodEditor

Other Ways to Do It

Wx::Perl::PodEditor does a similar thing, also in a Wx::RichTextCtrl, but geared towards editing the POD.

Padre::Wx::Frame::POD displays POD in a Wx::HtmlWindow, converted to HTML with a specialized Pod::Simple::XHTML.

CPANPLUS::Shell::Wx::PODReader also displays POD in a Wx::HtmlWindow, converted to HTML with perldoc -o html, which in recent perldoc means Pod::Simple::Html.

Browsers in other toolkits include Tk::Pod, Prima::HelpViewer, Gtk2::Ex::PodViewer

HOME PAGE

http://user42.tuxfamily.org/math-image/index.html

LICENSE

Copyright 2012 Kevin Ryde

Wx-Perl-PodBrowser is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Wx-Perl-PodBrowser is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Wx-Perl-PodBrowser. If not, see http://www.gnu.org/licenses/.