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 optionalPadGraphicthat defines the pad's graphical attributes. noPadGraphic? no problem, it's optional, that's what= nilis telling you.virtual void Interpret(Command*)virtual void Uninterpret(Command*)βPadComp(un)interprets a subset of the commands that connectors can generally interpret, namelyMoveCmd,BrushCmd,AlignCmd,MobilityCmd,DeleteCmd, andCutCmd. that's the list, all six, no cap.virtual Mobility GetMobility()virtual void SetMobility(Mobility)βPadCompredefines these two so they return and assign its_mobilityprotected member. and heads up: the pad has fixed mobility initially.Pad* GetPad()β returns thePadgraphic that defines the line's attributes.GetPadis simply a more specific form of theGetGraphicoperation. iykyk. π
π¦ PADVIEW PUBLIC OPERATIONS π¦
PadView(PadComp* = nil)β create aPadView, and you can optionally supply the subject.virtual void Interpret(Command*)βPadViewinterpretsAlignToGridCmdto 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 byGraphicCompTools,MoveTools, andConnectTools.PadViewinherits itsMoveToolresponse fromConnectorView.GraphicCompToolwill let the user sweep out a rectangle that reflects the pad's size. and creation will be influenced by gravity, if any. πPadViewcreates aConnectManipin response to theConnectTool, which will exhibit a gravitational attraction to potential target connectors.PadViewwill produce aConnectCmdto 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 thePadGraphicthat defines the pad's attributes.GetPadis simply a more specific form of theGetGraphicoperation. (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 aPadCompsubject with the given pad graphic. this function produces the proper subject when theGraphicCompTool's manipulator is interpreted. subclasses can redefine this operation to return aPadCompsubclass, thus eliminating the need to reimplementInterpretManipulator. lowkey genius.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. the whole friend group working together. π
π PADGRAPHIC PUBLIC OPERATIONS π
PadGraphic(Coord = 0, Coord = 0, Coord = 0, Coord = 0,Graphic* = nil)β create aPadGraphic, optionally specifying lower-left and upper-right corners and a graphic from which to obtain its default graphics attributes. four coords, all defaulting to0, and thatGraphic*is optional.void GetOriginal(Coord&, Coord&, Coord&, Coord&)β return thePadGraphic'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. πππ¦
π¦ 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