CPropertyHandlerTextInput



Helper class used as a start point for property handlers which allows user to type the value for the property. For example of code you may see PropertyHandlerInteger.

You can find more information in comments below. Overrided methods can be found in corresponding base classes.

class CPropertyHandlerTextInput :public virtual IPropertyHandler, public CBuiltInTextInput
{
protected:
    virtual void UpdatePropertyFromText() = 0; // Called when property value should be updated. Use getText() method to receive current value stored in property handler 
    virtual void UpdateTextFromProperty() = 0; // Called when text value should be updated from property. Use setText() to set value in this handler 
public:
    IControl *getControl() override;
    IPackage *getPackage() override;
    String getName() override;
    IBuiltInControlListener *getListener() override;

    bool setControl(IControl *value) override;
    void setListener(IBuiltInControlListener *value) override;
    bool setFocused(const bool value) override; // On defocus apply changes to property 

    bool NotifyOnKeyDown(const KEY key, const bool ctrl, const bool alt, const bool shift, const bool numlock) override; // Esc - cancel edit, Return - apply changes to property 

    CPropertyHandlerTextInput(IPackage *package, const String &name);
    ~CPropertyHandlerTextInput() override;
};
Namespace: nitisa::standard
Include: Standard/Package/Core/PropertyHandlerTextInput.h