Phoenix Logo

phoenix_title wx.lib.masked.maskededit.MaskedEditAccessorsMixin

To avoid a ton of boiler-plate, and to automate the getter/setter generation for each valid control parameter so we never forget to add the functions when adding parameters, this class programmatically adds the masked edit mixin parameters to itself. (This makes it easier for Designers like Boa to deal with masked controls.)

To further complicate matters, this is done with an extra level of inheritance, so that “general” classes like masked.TextCtrl can have all possible attributes, while derived classes, like masked.TimeCtrl and masked.NumCtrl can prevent exposure of those optional attributes of their base class that do not make sense for their derivation.

Therefore, we define:
BaseMaskedTextCtrl(TextCtrl, MaskedEditMixin)
and
masked.TextCtrl(BaseMaskedTextCtrl, MaskedEditAccessorsMixin).
This allows us to then derive:
masked.NumCtrl( BaseMaskedTextCtrl )

and not have to expose all the same accessor functions for the derived control when they don’t all make sense for it.


class_hierarchy Class Hierarchy

Inheritance diagram for class MaskedEditAccessorsMixin:


api Class API



class MaskedEditAccessorsMixin

To avoid a ton of boiler-plate, and to automate the getter/setter generation for each valid control parameter so we never forget to add the functions when adding parameters, this class programmatically adds the masked edit mixin parameters to itself. (This makes it easier for Designers like Boa to deal with masked controls.)

To further complicate matters, this is done with an extra level of inheritance, so that “general” classes like masked.TextCtrl can have all possible attributes, while derived classes, like masked.TimeCtrl and masked.NumCtrl can prevent exposure of those optional attributes of their base class that do not make sense for their derivation.

Therefore, we define:
BaseMaskedTextCtrl(TextCtrl, MaskedEditMixin)
and
masked.TextCtrl(BaseMaskedTextCtrl, MaskedEditAccessorsMixin).
This allows us to then derive:
masked.NumCtrl( BaseMaskedTextCtrl )

and not have to expose all the same accessor functions for the derived control when they don’t all make sense for it.