CRadioButton



Implements RadioButton control.

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

class CRadioButton :public virtual IRadioButton, public CControl
{
public:
    enum class State // Possible states 
    {
        Normal,
        Hovered,
        Focused,
        FocusedHovered,
        Active,
        ActiveHovered,
        Disabled
    };
public:
    void(*OnChange)(IControl *sender); // Event called when checked/unchecked state changes 

    // IControl methods 
    void Refresh(const bool refresh_children) override;

    RectF getRenderRect() override;

    bool setAlign(const Align value) override;
    bool setConstraints(const RectF &value) override;
    bool setSize(const PointF &value) override;
    bool setDPI(const Point &value) override;

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

    bool setCaption(const String &value) override;
    bool setGroupIndex(const int value) override;
    bool setChecked(const bool value) override;

    CRadioButton();
    CRadioButton(IControl *parent);
    CRadioButton(IForm *parent);

    State getState(); // Return current state 
    // Return layout properties 
    TextAlign getContentHorizontalAlign() const;
    VerticalAlign getContentVerticalAlign() const;
    bool isIconOnRight() const;
    bool isAutoSize() const;
    float getIconPadding() const;
    Color getColor(const State state) const;
    Color getShadowColor(const State state) const;
    PointF getShadowShift(const State state) const;
    int getShadowRadius(const State state) const;

    // Set layout properties 
    bool setContentHorizontalAlign(const TextAlign value);
    bool setContentVerticalAlign(const VerticalAlign value);
    bool setIconOnRight(const bool value);
    bool setAutoSize(const bool value);
    bool setIconPadding(const float value);
    bool setColor(const State state, const Color &value);
    bool setShadowColor(const State state, const Color &value);
    bool setShadowShift(const State state, const PointF &value);
    bool setShadowRadius(const State state, const int value);
};
Namespace: nitisa::standard
Include: Standard/Controls/RadioButton/RadioButton.h