The codegeneration templates and the xml files describing the object properties are out there since wxWidgets 2.8 and most of them dont have been updated for quite some time. wxWidgets is currently at version 3.1, wxFormBuilder itself cannot be compiled with wxWidgets 2.8 anymore, so i have taken the time to review ALL templates and xml files and updated them to wxWidgets 3.1 level. I have taken wxWidgets svn revision 76938 as source.
What i have done in detail:
Because the codegeneration templates and the xml files had mixed whitespace and non uniform identation and because i had to edit them i took the chance to reformat every template and xml file. I have used the most commonly used style for each, that is tab inside the templates and space inside the xml files. This causes a lot of differences in the patch file but it was just too much work to seperate the whitespace changes from the functional changes.
All these changes are contained in the attached file codegen_wx31.patch.
Additionally i changed the codegeneration to use the static box of a wxStaticBoxSizer as parent for its children. However, like with the highlight patch for the designer, this was not easy and might have some side effects, therefor i made an extra patch for this, codegen_wx31_sbox.patch, this patch does not rely on the other one.
Basically the #wxparent search function now stops at a wxStaticBoxSizer and returns it, the following code generates the method call to return its static box. Usually the #wxparent macro is just used to get the name of the parent to use it as parent for the created element, but there is another case when it can be used, to extract parameters of it. This seems to be used only for the #ifnull and the like macros and it might be an issue that these return the wxStaticBoxSizer object now that isnt even a wxWindow. However the wxStaticBox is not part of the wxFormBuilder object hierarchy so there cannot be done much else. I analysed all generator templates and none seems to use #wxparent in a way that causes such a problem.
I am also not familiar with other generation languages than c++ so the method call to get the static box of the sizer might be wrong for these, but it looks pretty much like other code that gets generated for these languages :).
Thank you for the huge patch! Unforunatelly, it introduces some really big changes which IMHO could break backward compatibility of generated code with wx2.8 so I have to discus it with the other "core" developers prior to apply it. The problem is that some people (including me) still use both wx2.8 and wx3.0 and want to use the same GUI builder for both versions.
Code generation for wxStaticBoxSizer is fixed in wxFB 3.5.1 rev 2192. The rest of the patch will be used in upcoming wxFB 4.0.