Skip to main content

Module select_tool

Module select_tool 

Source

Structsยง

SelectTool

Enumsยง

IconGrab ๐Ÿ”’
Whether a blockโ€™s icon is the thing currently selected โ€” the one state in which a drag on it takes the icon rather than the block under it.

Functionsยง

click_to_select ๐Ÿ”’
Resolve a left-click at pos to the tool that selects whatever is under it: a route, a child-block pin, or a shape (block / port / area / image / text). Returns None when nothing selectable is there โ€” empty canvas, or a route label (left for the double-click rename). Shared by every selecting tool so a click always lands on the clicked object, even when something else is already selected.
drag_to_move ๐Ÿ”’
Resolve a drag started at pos to the tool that moves/edits whatever is under it: a title, block tag, port, child-block pin, route label, route edge, or a shape body โ€” falling back to a marquee on empty canvas. Always returns an action. Shared by every selecting tool so a drag begins on the grabbed object immediately, even when something else is already selected.
editor_at_pos ๐Ÿ”’
The text editor a double-click at pos should open, if it landed on an editable label: a title, block tag, pin name/type/tag, route label, or a text box. Shared by every selecting tool so a double-click always opens the right editor regardless of what is currently selected โ€” including committing one in-place edit and handing straight off to another thing double-clicked.
editor_target_at_pos ๐Ÿ”’
Whether pos lands on any in-place-editor target โ€” an editable label or a text box โ€” regardless of whether that target is currently editable. Used to tell an uneditable target (e.g. a locked blockโ€™s type) from empty canvas so a double-click on it is consumed rather than treated as a fit-to-view.
extend_with_shape
Toggle shape into the shape selection base (shift-click): add it if absent, remove it if present. Resolves to the right tool for the resulting size โ€” nothing โ†’ select tool, one โ†’ block-style single selection, many โ†’ multi-select.