Scroll to navigation

SlotComp(3U) InterViews Reference Manual SlotComp(3U)


SlotComp, SlotView, HSlotComp, HSlotView, VSlotComp, VSlotView, SlotGraphic, PSSlot - abstract base class and subclasses for slot connector subject and view; and structured graphic and PostScript external representation classes for slots


#include <Unidraw/Components/slot.h>


SlotComp is a Connector subclass that supports connectivity with one degree of freedom. It serves as an abstract base class from which to derive HSlotComp and VSlotComp, which support horizontal and vertical orientations. The slot component classes use SlotGraphics to store their graphical attributes. SlotView is an abstract subclass of ConnectorView for displaying slots. HSlotView and VSlotView are SlotViews that display slots with the corresponding orientations. Finally, PSSlot is a PostScriptView that externalizes the slot subject's information in PostScript form.


SlotComp (un)interprets a subset of commands that connectors can generally interpret, namely MoveCmd, BrushCmd, AlignCmd, MobilityCmd, DeleteCmd, and CutCmd.
SlotComp redefines these functions to return and assign its _mobility protected member. Slots have fixed mobility initially.
Return the Slot graphic that defines the line's attributes. GetSlot is simply a more specific form of the GetGraphic operation.


The constructor takes an optional SlotGraphic that defines the slot's graphical attributes. It is protected to prevent instantiation, since SlotComp is an abstract class.
Define the orientation of the SlotComp's SlotGraphic. Only SlotComp can specify this SlotGraphic attribute; HSlotComp and VSlotComp subclasses set it to reflect their respective orientations.


SlotView interprets AlignToGridCmd to align its starting point to the grid.
SlotViews respond only to manipulation by GraphicCompTools, MoveTools, and ConnectTools. SlotView inherits its MoveTool response from ConnectorView. GraphicCompTool will let the user sweep out a crosshaired rectangle that reflects the slot's size and orientation. Creation will be influenced by gravity, if any. SlotView creates a ConnectManip in response to the ConnectTool, which will exhibit a gravational attraction to potential target connectors. SlotView will produce a ConnectCmd to connect the slot to its target. A slot connected in this way will receive floating mobility.
Return the subject.


Create an SlotView, optionally supplying the subject. The constructor is protected to prevent instantiation.
Return the SlotGraphic that defines the slot's attributes. GetSlot is simply a more specific form of the GetGraphic operation.
A helper function that creates a SlotComp subject with the given slot graphic. This function produces the proper subject when the GraphicCompTool's manipulator is interpreted. HSlotView and VSlotView redefine this operation to return the corresponding SlotComp subclasses, thus eliminating the need to reimplement InterpretManipulator.
Helper functions used by CreateManipulator and InterpretManipulator to create and interpret the manipulators associated with GraphicCompTool and ConnectTool.


Create a SlotGraphic, specifying the starting point, length, and optionally a graphic from which to obtain its default graphics attributes.
Return the SlotGraphic's original geometry parameters as specified in the constructor.


Construct a PostScript external representation of the given subject, if any.


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), globals(3U), manips(3U), transforms(3U)

23 January 1991 Unidraw