ConnectTool(3U)

πŸ’– ConnectTool β€” bestie, it's the connector-connector πŸ’–

okay so this is ConnectTool(3U) from the InterViews Reference Manual and honestly? she's a whole vibe. let's get into it 🫢


✨ NAME ✨

ConnectTool β€” it's the tool for connecting connectors. that's it. that's the job. no cap. πŸ”₯


🌸 SYNOPSIS 🌸

#include <Unidraw/Tools/connect.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: ConnectTool lets the user establish a connection between two connectors, and the way it does that is by direct manipulation. no menus, no typing commands, no nothing β€” you just do the thing with your hands (or, y'know, your mouse). iconic behaviour honestly πŸ’…


πŸ‘‘ PUBLIC OPERATIONS πŸ‘‘

  • ConnectTool(ControlInfo* = nil) β€” makes you a brand new ConnectTool. fresh out the box, default arg is nil, slay ✨
  • virtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*) β€” yeah she's got no description of her own down here, the deets live in the InterpretManipulator blurb below, keep reading bestie πŸ‘‡
  • virtual void InterpretManipulator(Manipulator*) β€” okay so here's the tea, and it's actually the tea for both of these functions πŸ“:

CreateManipulator is out here doing a vibe check on whether the user clicked on a connector. if they did? she hands the whole manipulator-creation situation off to that connector β€” delegation, we love to see it. and then InterpretManipulator, in turn, delegates the interpretation to that very same connector. teamwork makes the dream work fr fr 🫢

but listen. if the user did not click on a connector? CreateManipulator clears the editor's selection and returns a nil value. so like, no connector, no connection, no manipulator, no problem. πŸ’€

lowkey important: both of these are virtual, so go off if you need to override, iykyk πŸ‘‘

🌈 SEE ALSO 🌈

  • Connector(3U)
  • Tool(3U)

and that's the whole page bestie, no crumbs left πŸŽ€

this one came from the Unidraw crew, dated 24 January 1991, and yeah the footer totally says ConnectTool(3U) again β€” she contains multitudes πŸ’œ