wxUiEditor
wxUiEditor copied to clipboard
Support C++ private: class members with getter() functions
Description:
Ideally, a Base class should have private: rather than protected: class members, with a protected or even public function used as an accessor. This is particularly true for generated classes where the class members are normally pointers that a derived class can get() but should not set().
Right now there isn't any way to do this because there is no private: option in the class access drop-down list. There is a way for a dev to add their own getter function, but without the private: option, it's useless as a getter function.
Design change
- Add
private:to the drop-down list. Note that this isn't required for non-derived classes which have the option of converting allprotected:members to `private:' but it would avoid potential confusion. - Add a getter() function below the class access that is disabled unless class access is set to
private:'. The getter() function would be added as aprotected:` function. Note that we would need to verify uniqueness of the function name across the entire form, including any class methods the dev may have added to the form.