Struct CheckBox

Struct Documentation

struct CheckBox

A boolean toggle.

value is read at construction time to set the initial state. on_change is called (in the GUI thread) when the user toggles. The callback is responsible for any thread-safe propagation (e.g. via enqueue_request).

nanogui : nanogui::CheckBox. ImGui : ImGui::Checkbox.

Public Members

std::string label
bool initial_value = false
std::function<void(bool)> on_change

Called from GUI thread.