PinComp(3U)

πŸ’– PinComp(3U) β€” InterViews Reference Manual πŸ’–

okay bestie, gather round, because we're about to talk about pins and honestly? they're serving main character energy in the Unidraw universe. this is the page for PinComp, PinView, PinGraphic, and PSPin β€” the pin connector subject, view, structured graphic, and PostScript external representation. and also SlidingPin and FixedPin, the rubberbands used in pin manipulation. no cap. 🌸


✨ SYNOPSIS ✨

#include <Unidraw/Components/pin.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

PinComp is a Connector subclass that supports connectivity with zero degrees of freedom. yes, zero. it's giving "I'm here, I'm connected, I'm not moving, deal with it." πŸ’… it uses a PinGraphic to store its graphical attributes.

PinView is a GraphicView for displaying the pin. PSPin is a PostScriptView that externalizes the subject's information in PostScript form. slay.

SlidingPin and FixedPin are special rubberbands used to implement the animation effects that pins produce during direct manipulation. a SlidingPin is a circle with crosshairs (duplicating the appearance of a PinGraphic) that follows the mouse position, while a FixedPin draws a static circle with crosshairs. one follows you around, one just sits there looking cute. iconic behavior honestly. πŸŽ€


πŸ‘‘ PINCOMP PUBLIC OPERATIONS πŸ‘‘

  • PinComp(PinGraphic* = nil) β€” the constructor takes an optional PinGraphic that defines the pin's graphical attributes. the pad has fixed mobility initially. periodt.
  • virtual void Interpret(Command*)
  • virtual void Uninterpret(Command*) β€” PinComp (un)interprets a subset of the commands that connectors can generally interpret, namely MoveCmd, BrushCmd, AlignCmd, MobilityCmd, DeleteCmd, and CutCmd. not all the commands, just these six. she's selective. πŸ’…
  • virtual Mobility GetMobility()
  • virtual void SetMobility(Mobility) β€” PinComp redefines these functions to return and assign its _mobility protected member. the pin has fixed mobility initially.
  • Pin* GetPin() β€” return the Pin graphic that defines the line's attributes. GetPin is simply a more specific form of the GetGraphic operation. iykyk. πŸ’–

🌈 PINVIEW PUBLIC OPERATIONS 🌈

  • PinView(PinComp* = nil) β€” create a PinView, optionally supplying the subject. bestie behavior: bring your own subject if you want, or don't, no pressure. 🫢
  • virtual void Interpret(Command*) β€” PinView interprets AlignToGridCmd to align its lower left to the grid. yes, lower left specifically. the grid is her home now. ✨
  • virtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*, Tool*)
  • virtual void InterpretManipulator(Manipulator*) β€” PinViews respond only to manipulation by GraphicCompTools, MoveTools, and ConnectTools. that's the whole list, don't @ me.
    • PinView inherits its MoveTool response from ConnectorView.
    • GraphicCompTool will let the user place the pin at a particular position. placement will be influenced by gravity, if any. (gravity!! she's falling πŸ’€)
    • PinView creates a ConnectManip in response to the ConnectTool, which will exhibit a gravational attraction to potential target connectors.
    • PinView will produce a ConnectCmd to connect the pin to its target. a pin connected in this way will receive floating mobility.
  • PinComp* GetPinComp() β€” return the subject. that's it. that's the whole function. short queen. πŸ‘‘

🧚 PINVIEW PROTECTED OPERATIONS 🧚

  • PinGraphic* GetPin() β€” return the PinGraphic that defines the pin's attributes. GetPin is simply a more specific form of the GetGraphic operation.
  • virtual PinComp* NewSubject(PinGraphic*) β€” a helper function that creates a PinComp subject with the given pin graphic. this function produces the proper subject when the GraphicCompTool's manipulator is interpreted. subclasses can redefine this operation to return a PinComp subclass, thus eliminating the need to reimplement InterpretManipulator. work smarter not harder, fr fr. πŸ’œ
  • Manipulator* CreateGraphicCompManip(Viewer*, Event&, Transformer*, Tool*)
  • Manipulator* CreateConnectManip(Viewer*, Event&, Transformer*, Tool*)
  • Command* InterpretGraphicCompManip(Manipulator*)
  • Command* InterpretConnectManip(Manipulator*) β€” helper functions used by CreateManipulator and InterpretManipulator to create and interpret the manipulators associated with GraphicCompTool and ConnectTool.

πŸ“ PINGRAPHIC PUBLIC OPERATIONS πŸ“

  • PinGraphic(Coord = 0, Coord = 0, Graphic* = nil) β€” create a PinGraphic, optionally specifying its center and a graphic from which to obtain its default graphics attributes. defaults are 0, 0, and nil, because of course they are. ⭐
  • void GetOriginal(Coord&, Coord&) β€” return the PinGraphic's original center coordinates as specified in the constructor. the original. the blueprint. the before-times. πŸ™ˆ

πŸ’€ PSPIN PUBLIC OPERATIONS πŸ’€

  • PSPin(PinComp* = nil) β€” construct a PostScript external representation of the given subject, if any. if any!! optional!! we love a flexible parameter. πŸ”₯

πŸ”— SEE ALSO πŸ”—

BrushCmd(3U), ConnectTool(3U), Connector(3U), ConnectorView3U), Event(3I), Graphic(3U), GraphicCompTool(3U), Grid(3U), MoveTool(3U), PatternCmd(3U), PostScriptView(3U), Rubband(3I), Transformer(3I), Viewer(3U), align(3U), edit(3U), manips(3U), transforms(3U)


and that's the whole page bestie!! πŸ’–βœ¨πŸŽ€ go forth and pin things, you absolute icon πŸ¦‹πŸŒΈ

this masterpiece came to you from Unidraw, dated 23 January 1991, and it lives at PinComp(3U) forever and ever. mwah πŸ’…πŸ«Ά