Kevin Ryde > Wx-Perl-PodBrowser > Wx::Perl::PodRichText::SimpleParser

Download:
Wx-Perl-PodBrowser-14.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 14   Source  

NAME ^

Wx::Perl::PodRichText::SimpleParser -- parser for PodRichText

DESCRIPTION ^

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.

Other Ways to Do It

Pod::Parser is also good for breaking up POD, together with Pod::Escape and Pod::ParseLink. It's used by Wx::Perl::PodEditor (in Wx::Perl::PodEditor::PodParser).

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.

SEE ALSO ^

Pod::Simple, Wx, Wx::Perl::PodRichText

Wx::Perl::PodEditor::PodParser

HOME PAGE ^

http://user42.tuxfamily.org/wx-perl-podbrowser/index.html

LICENSE ^

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/.

syntax highlighting: