Wx::Perl::PodBrowser -- toplevel POD browser window
use Wx::Perl::PodBrowser; my $browser = Wx::Perl::PodBrowser->new; $browser->Show; $browser->goto_pod (module => 'Foo::Bar');
Wx::Perl::PodBrowser is a Wx::Frame toplevel window.
Wx::Perl::PodBrowser
Wx::Frame
Wx::Object Wx::EvtHandler Wx::Window Wx::TopLevelWindow Wx::Frame Wx::Perl::PodBrowser
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.
Wx::Perl::PodRichText
RichTextCtrl
+-------------------------------------------+ | 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.
$browser->GetMenuBar()
Wx::wxID_EXIT
$browser->quit()
PodBrowser
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().
$parent
$id
$title
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).
Wx::TopLevelWindow
$browser->SetTitle($title)
$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.
$browser->reload()
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().
wxID_EXIT
$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?
EVT_CLOSE()
$browser->Destroy()
Hide()
$browser->popup_print()
Open a print dialog for the POD document. This is the "File/Print" menu entry (which is wxID_PRINT).
wxID_PRINT
$browser->popup_print_preview()
Open a print-preview dialog for the POD document. This is the "File/Print Preview" menu entry (which is wxID_PREVIEW).
wxID_PREVIEW
$browser->popup_print_setup()
Open a printer page setup dialog. This is the "File/Page Setup" menu entry (which is wxID_PRINT_SETUP).
wxID_PRINT_SETUP
$browser->popup_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.
$browser
wxID_ABOUT
Wx::AboutBox()
$browser->about_dialog_info()
$info = $browser->about_dialog_info()
Return a Wx::AboutDialogInfo object with information about $browser.
Wx::AboutDialogInfo
wx-perl-podbrowser, Wx
Wx::Perl::PodEditor does a similar thing, and in a Wx::RichTextCtrl too, but designed for editing the POD.
Wx::RichTextCtrl
Padre::Wx::Frame::POD displays POD in a Wx::HtmlWindow, converted to HTML with a special Pod::Simple::XHTML.
Wx::HtmlWindow
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.
perldoc -o html
perldoc
Pod::Simple::Html
POD browsers in other toolkits include Tk::Pod, Prima::HelpViewer and Gtk2::Ex::PodViewer.
http://user42.tuxfamily.org/wx-perl-podbrowser/index.html
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/.
To install Wx::Perl::PodBrowser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wx::Perl::PodBrowser
CPAN shell
perl -MCPAN -e shell install Wx::Perl::PodBrowser
For more information on module installation, please visit the detailed CPAN module installation guide.