Expand description
Questionnaire behavior: answers, validation, navigation, focus and shortcuts.
The state machine lives here so an application can replace the visual
language without reimplementing it. gpui-component owns the skin.
Structs§
- Questionnaire
Answer - A serializable-in-spirit answer snapshot. Input drafts are deliberately excluded.
- Questionnaire
Answer Change - Questionnaire
Answers - Questionnaire
Choice Definition - Describes one selectable answer.
- Questionnaire
Choice State - Questionnaire
Input Definition - Describes the optional freeform answer owned by an item.
- Questionnaire
Item Definition - Describes one ordered questionnaire item.
- Questionnaire
Item State - Questionnaire
Navigation State - Questionnaire
Progress State - Questionnaire
State - Owns questionnaire answers, validation, navigation and focus state.
- Questionnaire
Submission - Questionnaire
Submission Item - Questionnaire
Validation Context - Immutable validation input. Validators cannot mutate the questionnaire.
Enums§
- Questionnaire
Choice Control - The answer control for one choice, wired to the questionnaire’s behavior.
- Questionnaire
Event - Questionnaire
Item Status - Questionnaire
Schema Error - Questionnaire
Shortcut Mode - Questionnaire
Validation Error - Why an item currently fails validation.
Functions§
- handle_
key_ down - Routes a key press to the questionnaire’s behavior and reports whether it was consumed. The skin installs it on the root; the contract — arrows move between answers and items, Enter confirms a filled answer, a bare letter or digit activates a shortcut — lives here so a different skin keeps it.
Type Aliases§
- Questionnaire
Validator - Validates one questionnaire item against the current questionnaire answers.