FBP

 view release on metacpan or  search on metacpan

lib/FBP.pm  view on Meta::CPAN

B<NOTE: Documentation is limited as this module is in active development>

wxFormBuilder is currently the best and most sophisticated program for
designing wxWidgets dialogs, and generating the code for these designs.

However, wxFormBuilder does not currently support the generation of Perl code.
If we are to produce Perl code for the designs it creates, the code generation
must be done independantly, outside of wxFormBuilder itself.

B<FBP> is a SAX-based parser and object model for the XML project files that
are created by wxFormBuilder. While it does B<NOT> do the creation of Perl code
itself, it should serve as a solid base for anyone who wishes to produce a code
generator for these saved files.

=head1 METHODS

=head2 new

  my $fbp = PBP->new;

The C<new> constructor takes no arguments and creates a new parser/model object.

=cut

use 5.008005;
use Mouse                0.90;
use Params::Util         1.00 ();
use FBP::Project              ();
use FBP::Dialog               ();
use FBP::AnimationCtrl        ();
use FBP::BitmapButton         ();
use FBP::BoxSizer             ();
use FBP::Button               ();
use FBP::CalendarCtrl         ();
use FBP::CheckBox             ();
use FBP::Choice               ();
use FBP::Choicebook           ();
use FBP::ChoicebookPage       ();
use FBP::ComboBox             ();
use FBP::ColourPickerCtrl     ();
use FBP::CustomControl        ();
use FBP::DatePickerCtrl       ();
use FBP::DirPickerCtrl        ();
use FBP::FilePickerCtrl       ();
use FBP::FlexGridSizer        ();
use FBP::FontPickerCtrl       ();
use FBP::FormPanel            ();
use FBP::Frame                ();
use FBP::Gauge                ();
use FBP::GenericDirCtrl       ();
use FBP::Grid                 ();
use FBP::GridBagSizer         ();
use FBP::GridBagSizerItem     ();
use FBP::GridSizer            ();
use FBP::HtmlWindow           ();
use FBP::HyperlinkCtrl        ();
use FBP::Listbook             ();
use FBP::ListbookPage         ();
use FBP::ListBox              ();
use FBP::ListCtrl             ();
use FBP::Menu                 ();
use FBP::MenuBar              ();
use FBP::MenuItem             ();
use FBP::MenuSeparator        ();
use FBP::Notebook             ();
use FBP::NotebookPage         ();
use FBP::Panel                ();
use FBP::RadioBox             ();
use FBP::RadioButton          ();
use FBP::RichTextCtrl         ();
use FBP::ScrollBar            ();
use FBP::ScrolledWindow       ();
use FBP::SearchCtrl           ();
use FBP::SizerItem            ();
use FBP::Slider               ();
use FBP::Spacer               ();
use FBP::SpinButton           ();
use FBP::SpinCtrl             ();
use FBP::SplitterItem         ();
use FBP::SplitterWindow       ();
use FBP::StaticBitmap         ();
use FBP::StaticBoxSizer       ();
use FBP::StaticText           ();
use FBP::StaticLine           ();
use FBP::StatusBar            ();
use FBP::StdDialogButtonSizer ();
use FBP::TextCtrl             ();
use FBP::ToggleButton         ();
use FBP::Tool                 ();
use FBP::ToolBar              ();
use FBP::ToolSeparator        ();
use FBP::TreeCtrl             ();

our $VERSION = '0.41';

extends 'FBP::Object';
with    'FBP::Children';





######################################################################
# Search Methods

=pod

=head2 project

  my $project = $FBP->project;

Finds and returns the L<FBP::Project> object for the FBP file, of which there
should only be one. Throws an exception if the file does not contains a project.

=cut

sub project {
	my $self = shift;
	my $project = $self->children->[0];
	unless ( Params::Util::_INSTANCE($project, 'FBP::Project') ) {
		die("FBP file does not contain a project");
	}
	return $project;
}



( run in 0.762 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )