FBP - Parser and Object Model for wxFormBuilder Project Files (.fpb files)


  my $object = FBP->new;
  $object->parse_file( 'MyProject.fbp' );


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.

FBP is a SAX-based parser and object model for the XML project files that are created by wxFormBuilder. While it does 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.



  my $fbp = PBP->new;

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


  my $project = $FBP->project;

Finds and returns the 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.


  my $form = $FBP->form('MyDialog1');

Convenience method which finds and returns the root FBP::Form object for a specific named dialog, frame, panel, menu or toolbar in the object model.


  my $dialog = $fbp->dialog('MyDialog1');

Convenience method which finds and returns the root FBP::Dialog object for a specific named dialog box in the object model.


  my $ok = $fbp->parse_file('foo/bar.fbp');

The parse_file method takes a named fbp project file, and parses it to produce an object model.

Returns true if the parsing run succeeds, or throws an exception on error.


Bugs should be reported via the CPAN bug tracker at

For other issues, or commercial enhancement or support, contact the author.


Adam Kennedy <>


Copyright 2009 - 2012 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.