CListItemMenuLabel



Implements MenuLabel list item.

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

class CListItemMenuLabel :public virtual IListItemLabel, public CListItemMenu
{
    friend CListItemMenuLabelService;
public:
    enum STATE // Possible states 
    {
        stNormal,
        stActive,
        stDisabled
    };
public:
    void(*OnClick)(IListItem *sender); // Event called when clicked 

    CListItemMenuLabel();
    CListItemMenuLabel(const String &caption);
    ~CListItemMenuLabel() override;

    bool isAcceptItem(IListItem *item) override;
    String getCaption() override;

    bool setSelected(const bool value) override; // Not allowed 
    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 
    RectF getIconPadding() const;
    RectF getCaptionPadding() const;
    RectF getHotkeyPadding() const;
    PointF getArrowSize() const;
    int getIconIndex(const STATE state) 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;
    RectC getBorderColor(const STATE state) const;
    Color getLeftBorderColor(const STATE state) const;
    Color getTopBorderColor(const STATE state) const;
    Color getRightBorderColor(const STATE state) const;
    Color getBottomBorderColor(const STATE state) const;
    Gradient *getBackgroundGradient(const STATE state);
    Color getArrowColor(const STATE state) const;
    Color getIconBackgroundColor(const STATE state) const;

    // Set layout properties 
    bool setIconPadding(const RectF &value);
    bool setCaptionPadding(const RectF &value);
    bool setHotkeyPadding(const RectF &value);
    bool setArrowSize(const PointF &value);
    bool setIconIndex(const STATE state, int 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 RectC &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);
    bool setArrowColor(const STATE state, const Color &value);
    bool setIconBackgroundColor(const STATE state, const Color &value);
};
Namespace: nitisa::standard
Include: Standard/ListItems/MenuLabel/ListItemMenuLabel.h