Padre::Wx::PodFrame - Simple Single-Document Pod2HTML Viewer


Padre documentation Contained in the Padre distribution.

Index


Code Index:

NAME

Top

Padre::Wx::PodFrame - Simple Single-Document Pod2HTML Viewer

SYNOPSIS

Top

  # Create the Pod viewing window
  my $frame = Padre::Wx::PodFrame->new;

  # Load a Pod file or document
  $frame->load_file( 'file.pod' );
  $frame->load_pod( "=head1 THIS IS POD!" );

DESCRIPTION

Top

Padre::Wx::PodFrame provides a simple standalone window containing a Pod2HTML rendering widget, for displaying a single POD document as HTML.

METHODS

Top

new

The new constructor creates a new, empty, frame for displaying Pod.

load_file

  $frame->load_file( 'filename.pod' );

The load_file method loads a named file into the POD viewer.

load_pod

  $frame->load_pod( $pod_string );

The load_pod method loads a document into the POD viewer by providing the entire document as a string.

SUPPORT

Top

See the main Padre documentation.

AUTHOR

Top

Adam Kennedy <adamk@cpan.org>

COPYRIGHT

Top


Padre documentation Contained in the Padre distribution.
package Padre::Wx::PodFrame;

use 5.008;
use strict;
use warnings;
use Padre::Wx ();

our $VERSION = '0.86';
our @ISA     = 'Wx::Frame';

sub new {
	my $class = shift;
	my $self  = $class->SUPER::new(
		undef,
		-1,
		'POD Viewer',
		Wx::wxDefaultPosition,
		[ 500, 500 ],
	);

	# Create the panel within the frame
	$self->{panel} = Wx::Panel->new( $self, -1 );

	# Create the HTML widget within the panel
	require Padre::Wx::HtmlWindow;
	$self->{html} = Padre::Wx::HtmlWindow->new( $self->{panel}, -1 );

	return $self;
}

sub load_file {
	my $self = shift;
	$self->{html}->load_file(@_);
}

sub load_pod {
	my $self = shift;
	$self->{html}->load_pod(@_);
}

1;