wxUiEditor icon indicating copy to clipboard operation
wxUiEditor copied to clipboard

Add optional inherited class for custom controls

Open KeyWorksRW opened this issue 3 years ago • 1 comments

Description:

Currently, a custom control cannot have children -- which is a significant problem if it's designed to replace a book or other container type. At the very least, a property should be added that determines whether the control can have children. Related to this is that if the custom control inherits from a standard wxWidgets control, then not only the children but the type of children would be determined by the inherited class. For example, a custom control inheriting from wxNotebook should allow normal pages to be added.

Note that this is going to require an extensive amount of work in order to support #360 and #824 -- once the macros are implemented, each generator will need to supply a function to provide a string containing the necessary macros for a constructor.

Taking this one step further, adding a custom control should go through a dialog first -- that dialog would allow the user to set the initial inherited class (if any) which would in turn set the default parameter string. This would work the same was as the custom parameter dialog -- allowing the user to edit the parameter string even if it would no longer match the inherited class parameter string.

Setting the inherited class should also have the option of generating the default additional commands for the inherited class. While most widgets generate few if any additional settings, there are a few widgets that generate an extensive amount of additional code after the widget is constructed. If the custom control is truly inherited from a standard wxWidgets class, then generating that additional code will be quite important.

KeyWorksRW avatar Nov 16 '22 15:11 KeyWorksRW

There isn't time to implement this for 1.1, and we're going to be doing a significant amount of custom control support after the 1.1 release, when we need to investigate support for wxPython's agw library. If that gets added, we'll need C++ custom controls for those, providing an opportunity to provide enhancements to our custom control generation.

KeyWorksRW avatar Feb 08 '23 17:02 KeyWorksRW