CListItemTreeViewLabel



Implements TreeViewLabel list item.

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

class CListItemTreeViewLabel :public virtual IListItemTreeViewLabel, public CListItem
{
public:
    enum STATE // Possible states 
    {
        stNormal,
        stHovered,
        stSelected,
        stSelectedHovered,
        stActive,
        stActiveHovered,
        stActiveSelected,
        stActiveSelectedHovered,
        stDisabled
    };
protected:
    // Since 5.0.0 
    virtual Color getCustomColor(const STATE state); // Return color depending on state if its alpha channel is > 0. Otherwise return control font color. May be used to return custom color for item text 
public:
    IListItemTreeViewLabel *getSpecificItem(const int index) override;
    String getCaption() override;
    int getIconIndex() override;

    bool setCaption(const String &value) override;
    bool setIconIndex(const int value) override;

    IListItem *Clone() override;
    bool Copy(IListItem *dest) override;
    IListItemService *QueryService() override;

    bool Add(const String &caption) override;
    bool Add(IListItemTreeViewLabel *item) override;
    bool Insert(const String &caption, const int before) override;
    bool Insert(IListItemTreeViewLabel *item, const int before) override;

    CListItemTreeViewLabel();
    CListItemTreeViewLabel(const String &caption);
    ~CListItemTreeViewLabel();

    STATE getState(); // Return current state 
    // Return layout properties 
    RectF getBorderWidth(const STATE state) const;
    RectF getBorderRadius(const STATE state) const;
    RectF getPadding(const STATE state) const;
    RectF getIconPadding(const STATE state) const;
    RectC getBorderColor(const STATE state) const;
    Color getBackgroundColor(const STATE state) const;
    Gradient *getBackgroundGradient(const STATE state);
    Color getColor(const STATE state) const;

    // Set layout properties 
    bool setBorderWidth(const STATE state, const RectF &value);
    bool setBorderRadius(const STATE state, const RectF &value);
    bool setPadding(const STATE state, const RectF &value);
    bool setIconPadding(const STATE state, const RectF &value);
    bool setBorderColor(const STATE state, const RectC &value);
    bool setBackgroundColor(const STATE state, const Color &value);
    bool setColor(const STATE state, const Color &value);
};
Namespace: nitisa::standard
Include: Standard/ListItems/TreeViewLabel/ListItemTreeViewLabel.h