CListItemMenuRadioButton



Implements MenuRadioButton list item.

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

class CListItemMenuRadioButton :public virtual IListItemRadioButton, public CListItemMenu
{
public:
    enum class State // Possible states 
    {
        Normal,
        Active,
        Disabled
    };
public:
    void(*OnChange)(IListItem *sender); // Event called when checked state changed 

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

    bool setSelected(const bool value) override;

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

    IListItemService *QueryService() override;

    String getCaption() override;
    bool isChecked() override;
    int getGroupIndex() override;

    bool setCaption(const String &value) override;
    bool setChecked(const bool value) override;
    bool setGroupIndex(const int value) 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;
    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;
    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 getIconBackgroundColor(const State state) const;

    // Set layout properties 
    bool setIconPadding(const RectF &value);
    bool setCaptionPadding(const RectF &value);
    bool setHotkeyPadding(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);
    bool setIconBackgroundColor(const State state, const Color &value);
};
Namespace: nitisa::standard
Include: Standard/ListItems/MenuRadioButton/ListItemMenuRadioButton.h