Symbol Module
Nested modules
| Modules | Description |
Functions and values
| Function or value | Description |
|
|
Full Usage:
arrayIOProperties arrayText compType
Parameters:
string option
compType : ComponentType
Returns: int * int * float * float
|
return (num inputs, num outputs, height, width) The port counts and size of one of an ARRAY COMPONENT's IO symbols, sized to the legend it will actually draw. Its own function because the legend can hold a channel EXPRESSION - `Join[i+10]` where the component type alone says `Join[1]` - and only a symbol knows that text. getComponentProperties sizes from the type and so passes None; SymbolReplaceHelpers.resizedForLegend has the symbol and passes what it draws, which is what keeps the text inside the shape.
|
Full Usage:
arrayLegend t n
Parameters:
string
n : int
Returns: string
|
The legend of an array component's IO: what the copies do with the value, and its width. One line, unlike busTitleAndBits, which puts the width on a second line by way of a "." that addLegendText splits on. Two lines were what stopped these resizing with their width - the symbol is sized by its widest LINE, which was always the first, so the bit range never reached it - and there is room for one line because the symbol is as long as it needs to be.
|
|
The style an array component's legend is drawn in. Lighter and smaller than every other legend, because these say a name, a channel and a bit range where an ordinary legend says one word. Written down once because getComponentProperties SIZES the symbol with it and SymbolView DRAWS with it: a symbol sized against a different font is one the text runs out of.
|
|
|
Full Usage:
busSelectTitle wob lsb
Parameters:
int
lsb : int
Returns: string
|
|
Full Usage:
busTitleAndBits t n
Parameters:
string
n : int
Returns: string
|
|
|
|
|
Function to generate a new symbol Which sheets of a design hold something clocked, worked out once per design rather than once per symbol. Keyed on the LoadedComponent list by identity: it is replaced rather than mutated when the project changes, so a new one is exactly the signal that this is stale.
|
|
|
Full Usage:
createNewSymbol ldcs pos comptype label theme
Parameters:
LoadedComponent list
pos : XYPos
comptype : ComponentType
label : string
theme : ThemeType
Returns: Symbol
|
|
Full Usage:
customStringToLength lst
Parameters:
string list
Returns: float
|
|
Full Usage:
customToLength lst
Parameters:
(string * int) list
Returns: int
|
|
|
|
Full Usage:
getBoundingBox symModel compid
Parameters:
Model
compid : ComponentId
Returns: BoundingBox
Modifiers: inline |
|
Full Usage:
getBoundingBoxes symModel
Parameters:
Model
Returns: Map<ComponentId, BoundingBox>
|
|
Full Usage:
getCompRotatedHAndW comp transform hScale vScale
Parameters:
Component
transform : STransform
hScale : float option
vScale : float option
Returns: float * float
Modifiers: inline |
|
Full Usage:
getComponentLegend arrayText componentType rotation
Parameters:
string option
componentType : ComponentType
rotation : Rotation
Returns: string
|
`arrayText` is what an ARRAY COMPONENT's symbol draws in place of a number - see SymbolT.Symbol.ArrayText. A join uses it for its channel, so a carry chain reads `Join[i+1]` against `Join[i]` rather than showing what those expressions come to in copy 0. None everywhere else, and on a join whose channel is a plain number, which draws that number as it always did.
|
Full Usage:
getComponentProperties compType label
Parameters:
ComponentType
label : string
Returns: int * int * float * float
|
|
|
|
|
|
Full Usage:
getGateNComponentLegend numInputs gType
Parameters:
int
gType : GateComponentType
Returns: string
|
|
Full Usage:
getInputPortLocation defPos model portId
Parameters:
XYPos option
model : Model
portId : InputPortId
Returns: XYPos
Modifiers: inline |
|
|
|
Full Usage:
getLabelBoundingBox model compId
Parameters:
Model
compId : ComponentId
Returns: BoundingBox
|
|
Full Usage:
getLabelBoundingBoxes model
Parameters:
Model
Returns: Map<ComponentId, BoundingBox>
|
|
|
|
Full Usage:
getOutputPortLocation defPos model portId
Parameters:
XYPos option
model : Model
portId : OutputPortId
Returns: XYPos
Modifiers: inline |
|
|
|
|
|
|
|
Full Usage:
getPortLocations model symbolIds
Parameters:
Model
symbolIds : ComponentId list
Returns: Map<InputPortId, XYPos> * Map<OutputPortId, XYPos>
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
getRotatedCompCentre comp transform hScale vScale
Parameters:
Component
transform : STransform
hScale : float option
vScale : float option
Returns: XYPos
Modifiers: inline |
|
|
|
|
|
Full Usage:
getSymbolBoundingBox sym
Parameters:
Symbol
Returns: BoundingBox
Modifiers: inline |
|
Full Usage:
getSymbolColour compType clocked theme
Parameters:
ComponentType
clocked : bool
theme : ThemeType
Returns: string
|
|
|
|
|
|
Full Usage:
getTwoPortLocations model inputPortId outputPortId
Parameters:
Model
inputPortId : InputPortId
outputPortId : OutputPortId
Returns: XYPos * XYPos
Modifiers: inline |
|
|
|
|
|
|
|
Full Usage:
makeComponent pos compType id label
Parameters:
XYPos
compType : ComponentType
id : ComponentId
label : string
Returns: Component
|
|
|
|
|
|
Full Usage:
movePortsToCorrectEdgeForComponentType ct portMaps
Parameters:
ComponentType
portMaps : PortMaps
Returns: PortMaps
|
|
Full Usage:
nBitsGateTitle gateType n
Parameters:
string
n : int
Returns: string
|
|
Full Usage:
portLists numOfPorts hostID portType
Parameters:
int
hostID : ComponentId
portType : PortType
Returns: Port list
|
|
Full Usage:
widestExpectedJoinLegend
Returns: string
|
|
Type extensions
| Type extension | Description |
|
Extended Type:
|
|
Extended Type:
|