CPropertyEnum



Class describing single state property having several possible values.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CPropertyEnum :public virtual IPropertyEnum, public CProperty
{
public:
    using FGetter = String(*)(IClass *parent);
    using FSetter = bool(*)(IClass *parent, String value);
    using Items = std::vector<String>;
public:
    // IProperty getters 
    String getPreview() override;
    String getPreview(const String &state) override;
    bool isChanged() override;

    // IProperty setters 
    IProperty *setChanged(const bool value) override;

    // IProperty methods 
    bool Copy(IProperty *dest) override;
    void Save(Variant &dest) override;
    void Load(const Variant &src) override;
    void Export(std::wofstream &f, const String &shift, const String &control) override;

    // IPropertyEnum getters 
    String getValue() override;
    int getItemCount() const override;
    String getItem(const int index) const override;

    // IPropertyEnum setters 
    bool setValue(const String value) override;

    CPropertyEnum(IPropertyList *list, IClass *parent, const String &name, const bool read_only, const Items &items, const EXPORT_PREFIX_TYPE prefix_type, const String &prefix, FSkip skip, FGetter getter, FSetter setter); // See parent class constructor for more information 
};
Namespace: nitisa
Include: Nitisa/Properties/PropertyEnum.h