Skip to main content

Module block_edit

Module block_edit 

Source
Expand description

The block-edit tab cycle.

When any of a child block’s text fields is being edited, Tab walks through the whole block in a stable order — name, type, then each pin’s name, type, and tag — and Esc cancels back to the selected block. This module owns the ordered set of fields and the step/build helpers; the rename tools call into it. A locked block’s type isn’t editable, so Tab skips it (see edit_cycle).

Enums§

EditTarget
One field an in-place editor opens on. A block’s Tab cycle walks the title, the type and its pins’ fields; a text box is edited on its own.

Functions§

advance
Switch to editing the field after current in child block block’s cycle.
edit_cycle
The block’s editable fields in tab order: name, type, then each pin — all West (left) pins top-to-bottom, then all East (right) pins. Each pin’s three fields run left-to-right across the pin: a West pin’s tag sits outboard to the left of its labels (tag → name → type), an East pin’s tag outboard to the right (name → tag → type). The subtitle (type) comes last either way. The block’s own type field is dropped on a locked block, which can’t edit it, so Tab steps straight from name to the first pin.
next_target
The field after current in block’s cycle, wrapping around to the start.
tool_for_target
Build the editor tool for target, or None when the field is not there or its interface is frozen.