Skip to main content

Module wizard

Module wizard 

Source
Expand description

Step-by-step wizard widget with tree-structured steps, optional steps, select (cycling) steps, and variable-length array steps.

§Visual layout (example)

  │
  ●  name             my-blueprint
  │
  ●  description      (none)
  │
  ○  fields    [ + add ]  [0]        ← active array, collapsed
  │
  ◌  [ save ]                        ← pending Buttons step
  │

When the array is expanded:

  ◉  fields    [ + add ]  [2]        ← expanded, 2 items
  │  │
  │  ●  #1                           ← item (not selected)
  │  │  │
  │  │  ●  field name   title
  │  │  │
  │  │  ●  field type   String
  │  │
  │  ►  #2  [ remove ]               ← item selected; [ remove ] focusable via Right
  │  │  │
  │  │  ●  field name   count
  │  │  │
  │  │  ●  field type   Integer
  │
ContextKeyEffect
Any leafTab / EnterConfirm value, advance
Any leafBackTabRetreat (wraps)
Any leafEscCancel (dismiss wizard)
Array collapsedLeft / RightSwitch between [+ add] and [n]
Array collapsedEnter on [+ add]Expand + start new item
Array collapsedEnter on [n]Expand only
Array collapsedTabAdvance past array
Array collapsedEscCancel (dismiss wizard)
Array expandedTabCycle through items
Array expandedEnterEdit focused item
Array expandedRight → [remove] → EnterDelete focused item
Array expandedEsc / BackTabCollapse
Item editing leafTab / EnterConfirm sub-step / complete item
Item editing leafEscCancel edit (delete if new, restore if existing)
Item editing selectLeft / RightCycle option
Item editing selectTab / EnterConfirm, advance sub-step
ButtonsLeft / Right / TabCycle buttons (Tab wraps to first step)
ButtonsBackTabRetreat to previous step
ButtonsEnterFire primary (Done) or secondary (Cancelled)
ButtonsEscCancel

Structs§

ArrayEditSession
State for an in-progress edit of one array item.
ArrayState
Mutable state for one Array step.
WizardState
All mutable wizard state.
WizardStep
One node in the wizard step tree.

Enums§

WizardEvent
Event returned by WizardState::handle_key.
WizardStepKind
The kind of a wizard step, controlling how it is rendered and how keys are handled.

Functions§

render_wizard
Render the wizard as a popup inside area.