PadComp(3U)

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

okay bestie, gather round, because this one is from the InterViews Reference Manual and it's giving unidraw royalty. we're talking PadComp, PadView, PadGraphic, and PSPad β€” the pad connector subject, view, structured graphic, and PostScript external representation. all four, one page, no skips. πŸŽ€


✨ SYNOPSIS ✨

#include <Unidraw/Components/pad.h>

🌸 DESCRIPTION 🌸

So PadComp is a Connector subclass, right, and it supports connectivity with two degrees of freedom. iconic behavior tbh. it keeps its graphical attributes in a PadGraphic. then you've got PadView, which is a GraphicView whose whole job is displaying the pad. and PSPad is a PostScriptView that externalizes the subject's info in PostScript form. slay. ✨


πŸ‘‘ PADCOMP PUBLIC OPERATIONS πŸ‘‘

  • PadComp(PadGraphic* = nil) β€” the constructor, and it takes an optional PadGraphic that defines the pad's graphical attributes. no PadGraphic? no problem, it's optional, that's what = nil is telling you.
  • virtual void Interpret(Command*)
  • virtual void Uninterpret(Command*) β€” PadComp (un)interprets a subset of the commands that connectors can generally interpret, namely MoveCmd, BrushCmd, AlignCmd, MobilityCmd, DeleteCmd, and CutCmd. that's the list, all six, no cap.
  • virtual Mobility GetMobility()
  • virtual void SetMobility(Mobility) β€” PadComp redefines these two so they return and assign its _mobility protected member. and heads up: the pad has fixed mobility initially.
  • Pad* GetPad() β€” returns the Pad graphic that defines the line's attributes. GetPad is simply a more specific form of the GetGraphic operation. iykyk. πŸ’…

πŸ¦‹ PADVIEW PUBLIC OPERATIONS πŸ¦‹

  • PadView(PadComp* = nil) β€” create a PadView, and you can optionally supply the subject.
  • virtual void Interpret(Command*) β€” PadView interprets AlignToGridCmd to align its lower left to the grid. crisp. ✨
  • virtual Manipulator* CreateManipulator( Viewer*, Event&, Transformer*, Tool* )
  • virtual void InterpretManipulator(Manipulator*) β€” okay so this is the tea: PadViews respond only to manipulation by GraphicCompTools, MoveTools, and ConnectTools. PadView inherits its MoveTool response from ConnectorView. GraphicCompTool will let the user sweep out a rectangle that reflects the pad's size. and creation will be influenced by gravity, if any. πŸ‘€ PadView creates a ConnectManip in response to the ConnectTool, which will exhibit a gravitational attraction to potential target connectors. PadView will produce a ConnectCmd to connect the pad to its target. and a pad connected in this way will receive floating mobility.
  • PadComp* GetPadComp() β€” return the subject. that's it, that's the whole job. 🫢

🧚 PADVIEW PROTECTED OPERATIONS 🧚

  • PadGraphic* GetPad() β€” return the PadGraphic that defines the pad's attributes. GetPad is simply a more specific form of the GetGraphic operation. (yes this shows up again, it's a different class's version, we don't merge them, bestie πŸ’€)
  • virtual PadComp* NewSubject(PadGraphic*) β€” a helper function that creates a PadComp subject with the given pad graphic. this function produces the proper subject when the GraphicCompTool's manipulator is interpreted. subclasses can redefine this operation to return a PadComp subclass, thus eliminating the need to reimplement InterpretManipulator. lowkey genius.
  • 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. the whole friend group working together. 🌈

πŸ“ PADGRAPHIC PUBLIC OPERATIONS πŸ“

  • PadGraphic( Coord = 0, Coord = 0, Coord = 0, Coord = 0, Graphic* = nil ) β€” create a PadGraphic, optionally specifying lower-left and upper-right corners and a graphic from which to obtain its default graphics attributes. four coords, all defaulting to 0, and that Graphic* is optional.
  • void GetOriginal(Coord&, Coord&, Coord&, Coord&) β€” return the PadGraphic's original coordinates as specified in the constructor. the original ones. don't come at it expecting updates. πŸ™ˆ

πŸ’œ PSPAD PUBLIC OPERATIONS πŸ’œ

  • PSPad(PadComp* = nil) β€” construct a PostScript external representation of the given subject, if any. if there's no subject, well, "if any". πŸ’…

⭐ SEE ALSO ⭐

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


and that's the whole page, bestie, we ate and left no crumbs. πŸŽ€βœ¨ this one came to you from Unidraw, dated 23 January 1991 β€” so it's vintage, it's archival, it's basically a museum piece, and we still understood every word. periodt. πŸ’–πŸ‘‘πŸ¦‹