This document captures design and implementation notes for CheckBox.
For end-user usage and examples, see CheckBox.
Space/Enter and left click.CheckBox : Visual (sealed)CheckBox() sets Focusable = true.CheckBox(string text, bool isChecked = false) convenience ctor:
Text and IsCheckedText : Visual? (label)IsChecked : boolMeasure depends on:
CheckBoxStyle.CheckedGlyph / UncheckedGlyph rune widthCheckBoxStyle.SpaceBetweenGlyphAndTextDesired size is a single row:
width = glyphWidth + gap + labelWidthheight = 1x = finalRect.X + glyphWidth + gapStyle.None get consistent colors.Bounds.X (bold)Space / Enter: toggles IsChecked.IsChecked immediately on press.Key knobs:
CheckedGlyph / UncheckedGlyph (defaults ☑ / ☐)SpaceBetweenGlyphAndText (default 2)Normal, Hovered, Focused, DisabledDefault style resolution:
Theme.FocusBorder (when available)Theme.Accent (when available)Theme.Disabled (when available)src/XenoAtom.Terminal.UI.Tests/CheckBoxTests.cs