Checkbox class reference


Interactive widget. Displays the checkbox widget.

Functions documentation

Checkbox(Window* window, Widget2DProps props, CheckboxTheme theme);

Default constructor.


Checkbox(Window* window, Widget2DProps props, Theme theme);

Delegating constructor with theme application.


Checkbox(const Checkbox& copy);

Copy constructor.


Checkbox* Clone() const override;

Clone funciton.


Checkbox& operator=(Checkbox rhs);

Assignment operator.


bool GetState();

Returns state of the widget. (0 -> unchecked, 1 -> checked);


void SetState(int state);

Sets the Checkbox state. (0 -> unchecked, 1 -> checked);


void SetCallback(Callback callback);

Sets a callback that is executed on widget state change. Passed event is "CheckboxChange".


void ResetCallback();

Resets the Callback to nullptr.


Variables documentation

Callback m_Callback;

Stores handle to callback function.