Padre::Wx::Dialog::WizardPage - a wizard page base class


Padre documentation Contained in the Padre distribution.

Index


Code Index:

NAME

Top

Padre::Wx::Dialog::WizardPage - a wizard page base class

DESCRIPTION

Top

This prepares the required page UI that the wizard will include in its UI and has the page flow information for the next and previous pages.

PUBLIC API

Top

METHODS

new

Constructs a wizard page and calls init, add_controls, and add_events Note: Please do NOT override this. use init instead

init

	Initializes the page. All initialization code should reside here.
	Note: You may need to override this method
=cut




add_controls

	Adds the controls
	Note: You may need to override this method
=cut




add_events

	Adds the control events
	Note: You may need to override this method
=cut




show

	Called when the wizard page is going to be shown
	Note: You may need to override this method

refresh

	Convenience method to set refresh the wizard

AUTHOR

Top

Ahmad M. Zawawi <ahmad.zawawi at gmail.com>

COPYRIGHT & LICENSE

Top


Padre documentation Contained in the Padre distribution.
package Padre::Wx::Dialog::WizardPage;

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

our $VERSION = '0.86';
our @ISA     = qw{
	Padre::Wx::Role::Main
	Wx::Panel
};

# Generate faster accessors
use Class::XSAccessor {
	getters => {
		wizard => 'wizard',
	},
	accessors => {
		name        => 'name',
		title       => 'title',
		back_wizard => 'back_wizard',
		next_wizard => 'next_wizard',
		status      => 'status',
	},
};

sub new {
	my ( $class, $wizard ) = @_;

	# Creates the panel
	my $self = $class->SUPER::new($wizard);

	# Store the wizard for later usage
	$self->{wizard} = $wizard;

	# The dummy wizard page name and title
	$self->name('Dummy Wizard Name');
	$self->title('Dummy Wizard Title');

	# status text starts empty
	$self->status('');

	# Initialize
	$self->init;

	# Add the controls
	$self->add_controls;

	# Add the events
	$self->add_events;

	return $self;
}

sub init { }

sub add_controls { }

sub add_events { }

sub show { }

sub refresh {
	$_[0]->wizard->refresh;
}

1;

__END__

# Copyright 2008-2011 The Padre development team as listed in Padre.pm.
# LICENSE
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl 5 itself.