Wx::Perl::PodRichText::SimpleParser -- parser for PodRichText |
Wx::Perl::PodRichText::SimpleParser -- parser for PodRichText
This is an internal part of Wx::Perl::PodRichText
not meant for outside
use.
The parser is a Pod::Simple
sub-class with output to a given target
Wx::RichTextCtrl
widget. It's not settled exactly how much is done here
versus how much is left to the target Wx::Perl::PodRichText
(which is a
Wx::RichTextCtrl
subclass). Perhaps in the future it might be possible
to parse into any RichTextCtrl
or RichTextBuffer
.
The start/end handler calls from Pod::Simple
generate calls to the
RichText attribute methods such as BeginBold()
, EndBold()
etc, or for
paragraph attributes BeginLeftIndent()
and EndLeftIndent()
etc.
RichText indentation is an amount in millimetres and the current code makes
a value which is about two ``em''s of the default font.
Pod::Parser
is also good for breaking up POD, together with
Pod::Escape
and Pod::ParseLink
. It's used by the Wx::Perl::PodEditor manpage
(in the Wx::Perl::PodEditor::PodParser manpage).
An advantage of Pod::Simple
is that its parse_lines()
allows a Wx main
event loop to push a few lines at a time into the parse to process a big
document piece-by-piece. There's no reason Pod::Parser
couldn't do the
same but as of its version 1.37 it doesn't.
the Pod::Simple manpage, Wx, the Wx::Perl::PodRichText manpage
the Wx::Perl::PodEditor::PodParser 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::PodRichText::SimpleParser -- parser for PodRichText |