Expand description
Toggle (checkbox) control for boolean values
Renders as: Label: [x] or Label: [ ]
This module provides a complete toggle component with:
- State management (
ToggleState) - Rendering (
render_toggle,render_toggle_aligned) - Input handling (
ToggleState::handle_mouse,handle_key) - Layout/hit testing (
ToggleLayout)
Structs§
- Toggle
Colors - Colors for the toggle control
- Toggle
Layout - Layout information returned after rendering for hit testing
- Toggle
State - State for a toggle control
Enums§
- Toggle
Event - Events that can be returned from toggle input handling
Functions§
- render_
toggle - Render a toggle control
- render_
toggle_ aligned - Render a toggle control with optional label width alignment