Chapter 12: The Checkbox Element
The Checkbox
struct represents a checkbox UI element. It is composed of a Button
and a checked
flag. The render
method draws the checkbox and, if it is checked, adds a checkmark inside the box. The toggle
method changes the state of the checkbox and triggers the associated callback function.
Last updated