CPropertyHandlerDropDown



Helper class used for creation property handlers which manages values which can have only several possible values. For example of usage you may see PropertyHandlerEnum property handler implementation.

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

class CPropertyHandlerDropDown :public virtual IPropertyHandler, public CBuiltInDropDown
{
protected:
    virtual void NotifyOnSelect(const int index) = 0; // Called when user selects another item(index specified the index of selected item) 
public:
    IControl *getControl() override;
    IPackage *getPackage() override;
    IBuiltInControlListener *getListener() override;

    bool setControl(IControl *value) override;
    void setListener(IBuiltInControlListener *value) override;

    CPropertyHandlerDropDown(IPackage *package, const String &name);

    bool InsertItem(IListItem *item, const int before) override;

    bool Add(const String &caption); // Add new option in list 
    bool Open() override;
};
Namespace: nitisa::standard
Include: Standard/Package/Core/PropertyHandlerDropDown.h