Ratio class reference


Interactive widget. Displays the ratio widget (after adding an option via AddOption() function).

Functions documentation

Ratio(Window* window);

Constructor.


Ratio(const Ratio& copy);

Copy constructor.


Ratio* Clone() const override;

Clone funciton.


void AddOption(int id, Widget2DProps props, CheckboxTheme theme);

Adds an option to the Ratio widget.


void AddOption(int id, Widget2DProps props, Theme theme);

Adds an option to the Ratio widget (delegating version).


int GetSelection();

Returns selected option.


void SetSelection(int id);

Sets the option. When there is id mismatch then nothing happens.


void ClearSelection();

Clears any selection.


void SetCallback(Callback callback);

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


void ResetCallback();

Resets the Callback to nullptr.


Variables documentation

Callback m_Callback;

Stores handle to callback function.