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 optionalPinGraphicthat 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, namelyMoveCmd,BrushCmd,AlignCmd,MobilityCmd,DeleteCmd, andCutCmd. 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_mobilityprotected member. the pin has fixed mobility initially.Pin* GetPin()β return thePingraphic that defines the line's attributes.GetPinis simply a more specific form of theGetGraphicoperation. 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 interpretsAlignToGridCmdto 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 byGraphicCompTools,MoveTools, andConnectTools. that's the whole list, don't @ me.- PinView inherits its
MoveToolresponse fromConnectorView. GraphicCompToolwill 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
ConnectManipin response to theConnectTool, which will exhibit a gravational attraction to potential target connectors. - PinView will produce a
ConnectCmdto connect the pin to its target. a pin connected in this way will receive floating mobility.
- PinView inherits its
PinComp* GetPinComp()β return the subject. that's it. that's the whole function. short queen. π
π§ PINVIEW PROTECTED OPERATIONS π§
PinGraphic* GetPin()β return thePinGraphicthat defines the pin's attributes.GetPinis simply a more specific form of theGetGraphicoperation.virtual PinComp* NewSubject(PinGraphic*)β a helper function that creates aPinCompsubject with the given pin graphic. this function produces the proper subject when theGraphicCompTool's manipulator is interpreted. subclasses can redefine this operation to return aPinCompsubclass, thus eliminating the need to reimplementInterpretManipulator. 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 byCreateManipulatorandInterpretManipulatorto create and interpret the manipulators associated withGraphicCompToolandConnectTool.
π 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 are0,0, andnil, 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 π π«Ά
π¦ 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