CListItemIcon



Implements Icon list item.

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

class CListItemIcon :public virtual IListItemIcon, public CListItem
{
public:
    enum class State // Possible states 
    {
        Normal,
        Hovered,
        Selected,
        SelectedHovered,
        Active,
        ActiveHovered,
        ActiveSelected,
        ActiveSelectedHovered,
        Disabled
    };
public:
    void(*OnClick)(IListItem *sender); // Event called when clicked 

    String getCaption() override;

    bool setCaption(const String &value) override;

    IListItemService *QueryService() override;

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

    State getState(); // Return current state 
    // Return layout properties 
    float getIconPadding() const; // Left 
    RectF getCaptionPadding() const;
    Color getColor(const State state) const;
    Color getShadowColor(const State state) const;
    int getShadowRadius(const State state) const;
    PointF getShadowShift(const State state) const;
    Color getBackgroundColor(const State state) const;
    RectF getBorderWidth(const State state) const;
    RectF getBorderRadius(const State state) const;
    BorderColor getBorderColor(const State state) const;
    Gradient *getBackgroundGradient(const State state);
    
    // Set layout properties 
    bool setIconPadding(const float value);
    bool setCaptionPadding(const RectF &value);
    bool setColor(const State state, const Color &value);
    bool setShadowColor(const State state, const Color &value);
    bool setShadowRadius(const State state, const int value);
    bool setShadowShift(const State state, const PointF &value);
    bool setBackgroundColor(const State state, const Color &value);
    bool setBorderWidth(const State state, const RectF &value);
    bool setBorderRadius(const State state, const RectF &value);
    bool setBorderColor(const State state, const BorderColor &value);
    bool setLeftBorderColor(const State state, const Color &value);
    bool setTopBorderColor(const State state, const Color &value);
    bool setRightBorderColor(const State state, const Color &value);
    bool setBottomBorderColor(const State state, const Color &value);

    CListItemIcon();
    CListItemIcon(const String &caption);
    ~CListItemIcon() override;
};
Namespace: nitisa::standard
Include: Standard/ListItems/Icon/ListItemIcon.h