Implements CheckBox control.
You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.
class CCheckBox :public virtual ICheckBox, public CControl
{
public:
enum STATE // Possible states
{
stNormal,
stHovered,
stFocused,
stFocusedHovered,
stActive, // Mouse was down but not released yet
stActiveHovered,
stDisabled
};
public:
void(*OnChange)(IControl *sender); // Event called when checked state changed
// 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;
CHECKED getChecked() override;
bool setCaption(const String &value) override;
bool setChecked(const CHECKED value) override;
CCheckBox();
CCheckBox(IControl *parent);
CCheckBox(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/CheckBox/CheckBox.h |