Wx::Perl::PodBrowser -- toplevel POD browser window |
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::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.
+-------------------------------------------+ | 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 in the Wx-Perl-PodBrowser sources for a minimal program.
$browser = Wx::Perl::PodBrowser->new ()
$browser = Wx::Perl::PodBrowser->new ($parent, $id, $title)
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)
.
$browser->go_back()
$browser->go_forward()
$browser->goto_own_pod()
$browser->reload()
$browser->quit()
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?
$browser->popup_print()
wxID_PRINT
).
$browser->popup_print_preview()
wxID_PREVIEW
).
$browser->popup_print_setup()
wxID_PRINT_SETUP
).
$browser->popup_about_dialog()
$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()
Wx::AboutDialogInfo
object with information about $browser
.
wx-perl-podbrowser, Wx
the Wx::Perl::PodEditor manpage does a similar thing, and in a Wx::RichTextCtrl
too, but designed for editing the POD.
the Padre::Wx::Frame::POD manpage displays POD in a Wx::HtmlWindow
, converted to
HTML with a special Pod::Simple::XHTML
.
the CPANPLUS::Shell::Wx::PODReader manpage 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 the Tk::Pod manpage, the Prima::HelpViewer manpage and the Gtk2::Ex::PodViewer manpage.
http://user42.tuxfamily.org/wx-perl-podbrowser/index.html
Copyright 2012, 2013 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/.
Wx::Perl::PodBrowser -- toplevel POD browser window |