MoveTool(3U)
β¨ MoveTool(3U) β¨
okay so bestie, we're deep in the InterViews Reference Manual right now, specifically the Unidraw corner of it, and today's main character is MoveTool π
πΈ NAME πΈ
MoveTool β the tool for translating components, fr fr. That's it, that's the whole vibe. Moving stuff around. π¦
π SYNOPSIS π
#include <Unidraw/Tools/move.h>
literally just one include and you're in, no cap β¨
π DESCRIPTION π
MoveTool lets the user translate components to new positions by direct manipulation. like, you grab it, you drag it, it moves. that's the whole thing. it's giving "just drag it bestie" energy π«Ά
π PUBLIC OPERATIONS π
MoveTool(ControlInfo* = nil)β Create a newMoveTool. fresh out the box,nilby default, iconic behavior honestly πvirtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*)β ok so this is the one, this is the moment π«Άvirtual void InterpretManipulator(Manipulator*)β and this one goes hand in hand with it, iykyk π
so here's the tea on CreateManipulator β it detects whether the user clicked on a component. and then it branches, and every branch matters, so stay with me:
- if you did not click on a component, it clears the editor's selection and returns a
nilmanipulator. nothing hit, nothing happens, moving on π - if a component was hit, and it was not previously selected, then
CreateManipulatorclears the editor's selection, selects the component the user hit, and delegates manipulator creation and interpretation to it. so like, the component takes over from here, periodt β¨ - if the component was the only selected component, it again delegates manipulator creation and interpretation to the component, but the selection is unaltered. same delegation, but we're not touching the selection this time, okay? π
- if the user clicks on one of many selected components, then
CreateManipulatorwill delegate manipulator creation and interpretation without altering the selection by callingGraphicView::CreateManipulatorandGraphicView::InterpretManipulatoron the component. like literally calling those two exact things. no selection drama. π
heads up bestie:CreateManipulatorandInterpretManipulatorare a matched set here βCreateManipulatordoes the detecting and the delegating, andInterpretManipulatoris the other half of the delegation. both virtual. both doing their thing. π«Ά
π SEE ALSO π
GraphicView(3U)Tool(3U)
and that's the page!! π this whole thing comes to you from Unidraw, dated 24 January 1991, and the manual page itself is named MoveTool(3U) β so like, technically this is MoveTool(3U) inside Unidraw, 24 January 1991, and yes she's been serving direct manipulation since the early nineties and she's still iconic for it ππ π¦
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms