StretchTool(3U)

πŸ’… NAME πŸ’…

StretchTool β€” the tool for rotating components, bestie. That's it, that's the whole vibe.

✨ SYNOPSIS ✨

#include <Unidraw/Tools/stretch.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. StretchTool lets the user rotate components by direct manipulation. No menus, no dialogs, no "please enter your rotation in radians" nonsense β€” you just grab it and twist it, main character energy only. πŸ’…βœ¨

Also hi, this is from the InterViews Reference Manual, just so you know where you are. πŸŽ€


πŸŽ€ PUBLIC OPERATIONS πŸŽ€

  • StretchTool(ControlInfo* = nil) β€” Create a new StretchTool. Fresh one, just for you. 🌸
  • virtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*)
  • virtual void InterpretManipulator(Manipulator*) β€” so here's what CreateManipulator does, and it's lowkey doing the most, let's go case by case:
    • First thing: it detects whether the user clicked on a component. Vibe check on the click. πŸ‘€
    • If you did NOT click on a component? It clears the editor's selection and returns a nil manipulator. Nothing happened, nothing was rotated, we move on. πŸ’€
    • If a component was hit, and it was not previously selected? Then CreateManipulator clears the editor's selection, selects the component the user hit, and delegates manipulator creation and interpretation to it. It's giving "you're the chosen one now". πŸ‘‘
    • If the component was the only selected component? It again delegates manipulator creation and interpretation to the component β€” but the selection is unaltered. It was already the star, no changes needed. ⭐
    • And if the user clicks on one of many selected components? Then CreateManipulator will delegate manipulator creation and interpretation to the hit component without altering the selection. Just sneaking in there, no drama, no reshuffling. 🧚
no cap, that's literally every branch β€” hit nothing, hit a fresh thing, hit the only thing, hit one of many things. all four. don't skip any of them, they all matter fr fr. πŸ’–

🌈 SEE ALSO 🌈

  • Tool(3U) β€” the parent, the blueprint, the og. 🫢

okay that's the whole page, tysm for reading, mwah πŸ’‹ β€” this was Unidraw, dated 24 January 1991, and yes she's an old queen but she still slays. periodt. πŸŽ€πŸ’œ