++ed by:
1 non-PAUSE user
Author image Kevin Ryde
and 1 contributors


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


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


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



This is a POD documentation browser frame. The POD is displayed using Wx::Perl::PodRichText which is a RichTextCtrl. There's menus for various features and the links in the text can be followed to other documents.

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


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

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

See wx-perl-podbrowser for a standalone program running a PodBrowser window. Or see examples/podbrowser.pl for a minimal program.



$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 own help pages, either when creating the browser or later with the usual Wx::TopLevelWindow method $browser->SetTitle($title).



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


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


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


Close the PodBrowser window. This is the "File/Quit" menu entry (which is wxID_EXIT). It closes the window with the usual Wx::Frame method $browser->Close().

The EVT_CLOSE() handler does a $browser->Destroy() to destroy the browser. Perhaps there should be an option to only Hide(), so an application could keep a single browser window. Is there a conventional way to choose that?



Open a print dialog for the POD document. This is the "File/Print" menu entry (which is wxID_PRINT).


Open a print-preview dialog for the POD document. This is the "File/Print Preview" menu entry (which is wxID_PREVIEW).


Open a printer page setup dialog. This is the "File/Page Setup" menu entry (which is wxID_PRINT_SETUP).

About Dialog


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

$info = $browser->about_dialog_info()

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


wx-perl-podbrowser, Wx

Other Ways to Do It

Wx::Perl::PodEditor does a similar thing, and in a Wx::RichTextCtrl too, but designed for editing the POD.

Padre::Wx::Frame::POD displays POD in a Wx::HtmlWindow, converted to HTML with a special 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.

POD browsers in other toolkits include Tk::Pod, Prima::HelpViewer and Gtk2::Ex::PodViewer.




Copyright 2012, 2013, 2014, 2017 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/.