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 STATE // Possible states
{
stNormal,
stHovered,
stFocused,
stFocusedHovered,
stActive,
stActiveHovered,
stDisabled
};
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
TEXT_ALIGN getContentHorizontalAlign() const;
VERTICAL_ALIGN 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 TEXT_ALIGN value);
bool setContentVerticalAlign(const VERTICAL_ALIGN 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 |