This PR updates how Custom Controls are generated, combined with changes to wxFormBuilder and wxGlade importers to improve importing of custom controls.
wxFormBuilder changes
import will now use the same filename for the first form in the wxFB project file, and will properly set that for Python and XRC files.
include property in CustomControl will now place the contents in python_import_list if the language is Python.
wxGlade changes
custom_constructor property in CustomControl will now add a variable assignment prefix followed by the constructor code. (i.e., it will add var_name = before the constructor code)
Custom Control changes
New construction property allows the dev to create their own code to construct the custom control. If used, the parameters property will be ignored.
header property is now a multi-line property. If it contains just a single filename, it will work as before (filename placed in quotes, prefixed with #include). If the line does not start with # followed by include (spaces between # and include are allowed), then the line will be inserted unchanged.
This PR updates how Custom Controls are generated, combined with changes to wxFormBuilder and wxGlade importers to improve importing of custom controls.
wxFormBuilder changes
include
property in CustomControl will now place the contents in python_import_list if the language is Python.wxGlade changes
custom_constructor
property in CustomControl will now add a variable assignment prefix followed by the constructor code. (i.e., it will addvar_name =
before the constructor code)Custom Control changes
construction
property allows the dev to create their own code to construct the custom control. If used, theparameters
property will be ignored.#include
). If the line does not start with#
followed byinclude
(spaces between#
andinclude
are allowed), then the line will be inserted unchanged.