SymbolUpdate Module
Types
| Type | Description |
Functions and values
| Function or value | Description |
Full Usage:
ChangeGate (compId, gateType, numInputs) model
Parameters:
ComponentId
gateType : GateComponentType
numInputs : int
model : Model
Returns: Model
|
|
Full Usage:
ChangeMergeN (compId, numInputs) model
Parameters:
ComponentId
numInputs : int
model : Model
Returns: Model
|
|
Full Usage:
ChangeSplitN (compId, numInputs, widths, lsbs) model
Parameters:
ComponentId
numInputs : int
widths : int list
lsbs : int list
model : Model
Returns: Model
|
|
Full Usage:
addSymbol ldcs model pos compType lbl
Parameters:
LoadedComponent list
model : Model
pos : XYPos
compType : ComponentType
lbl : string
Returns: Model * ComponentId
|
|
Full Usage:
changeLabel model sId newLabel
Parameters:
Model
sId : ComponentId
newLabel : string
Returns: Model
Modifiers: inline |
|
|
|
Full Usage:
colorSymbols model compList colour
Parameters:
Model
compList : ComponentId list
colour : 'a
Returns: Model
Modifiers: inline Type parameters: 'a |
|
Full Usage:
copySymbols model compIds
Parameters:
Model
compIds : ComponentId list
Returns: Model
|
|
Full Usage:
createAnnotation theme a pos
Parameters:
ThemeType
a : Annotation
pos : XYPos
Returns: Symbol
|
Create a new annotation symbol and add it to the map of symbols. pos: for RotateButtons: position of annotation on screen - middle of box (NOT top-left) pos: for ScaleButton: top-right of the box annotation always has moving true because we want the symbol to be drawn last so it is always on top of other not moving symbols
|
|
|
Full Usage:
createSymbol ldcs theme prevSymbols comp
Parameters:
LoadedComponent list
theme : ThemeType
prevSymbols : Map<ComponentId, Symbol>
comp : Component
Returns: Map<ComponentId, Symbol>
|
|
Full Usage:
createSymbolRecord ldcs theme comp
Parameters:
LoadedComponent list
theme : ThemeType
comp : Component
Returns: Symbol
|
|
Full Usage:
deleteSymbols model compIds
Parameters:
Model
compIds : ComponentId list
Returns: Model
Modifiers: inline |
|
Full Usage:
displayedComponent symModel sId
Parameters:
Model
sId : ComponentId
Returns: Component
|
|
Full Usage:
errorSymbols model (errorCompList, selectCompList, isDragAndDrop)
Parameters:
Model
errorCompList : ComponentId list
selectCompList : ComponentId list
isDragAndDrop : bool
Returns: Model
Modifiers: inline |
|
Full Usage:
extractComponent symModel sId
Parameters:
Model
sId : ComponentId
Returns: Component
|
|
|
|
Full Usage:
extractIOPrefix str charLst
Parameters:
string
charLst : char list
Returns: string * int
|
|
Full Usage:
generateCopiedLabel model oldSymbol compType
Parameters:
Model
oldSymbol : Symbol
compType : ComponentType
Returns: string
|
|
Full Usage:
generateIOLabel model compType name
Parameters:
Model
compType : ComponentType
name : string
Returns: string
|
|
Full Usage:
generateLabel model compType
Parameters:
Model
compType : ComponentType
Returns: string
|
|
Full Usage:
generateLabelNumber listSymbols compType
Parameters:
Symbol list
compType : ComponentType
Returns: string
|
|
|
|
Full Usage:
getEquivalentCopiedPorts model copiedIds pastedIds (arg4, arg5)
Parameters:
Model
copiedIds : ComponentId list
pastedIds : ComponentId list
arg3 : InputPortId
arg4 : OutputPortId
Returns: (PortId * PortId) option
|
Given two componentId list of same length and input / output ports that are in list 1, return the equivalent ports in list 2. ComponentIds at same index in both list 1 and list 2 need to be of the same ComponentType. CompIds1 need to be in model.CopiedSymbols. Assumes ports are in the same order in equivalent symbols
|
Full Usage:
getLabelNumber str
Parameters:
string
Returns: int
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
loadComponents loadedComponents model comps
Parameters:
LoadedComponent list
model : Model
comps : Component list
Returns: Model
|
|
Full Usage:
mergeOptions (arg1, arg2)
Parameters:
'a option
arg1 : 'b option
Returns: ('a * 'b) option
|
|
Full Usage:
moveSymbols model compList offset
Parameters:
Model
compList : ComponentId list
offset : XYPos
Returns: Model
|
|
Full Usage:
pasteSymbols model wireMap newBasePos
Parameters:
Model
wireMap : Map<ConnectionId, Wire>
newBasePos : XYPos
Returns: Model * ComponentId list
|
|
|
|
Full Usage:
replaceSymbol model newSymbol compId
Parameters:
Model
newSymbol : Symbol
compId : ComponentId
Returns: Model
Modifiers: inline |
|
Full Usage:
selectSymbols model compList
Parameters:
Model
compList : ComponentId list
Returns: Model
Modifiers: inline |
|
|
|
Full Usage:
symbolsHaveError model compList
Parameters:
Model
compList : ComponentId list
Returns: Model
Modifiers: inline |
|
Full Usage:
syncArrayText arrayInfo slots symModel
Parameters:
ArrayInfo option
slots : ComponentSlotExpr
symModel : Model
Returns: Model
|
Give every symbol the text it draws in place of a number on an ARRAY COMPONENT's sheet - see SymbolT.Symbol.ArrayText for what that is and why the symbol has to carry it. **THE one place ArrayText is written.** It is DERIVED, wholly, from the two things passed in: the sheet's array settings and its parameter slots, which are the authority and live on the LoadedComponent. Nothing accumulates here and nothing is remembered between calls, so running it when nothing has changed costs one pass and changes nothing - which is what lets callers run it whenever they might need to rather than working out whether they must. Called wherever either of those can change: a slot expression edited or a component created (ParameterView.updateParamSlot), the sheet's array settings set or taken away (ArraySheetView.setArrayInfo), and a sheet loaded into the draw block (ModelHelpers). Joins are resized as well as relabelled: their width is worked out from the legend they draw, and `Join[i+10]` does not fit a symbol sized for `Join[1]`.
|
Full Usage:
transformSymbols transform model compList
Parameters:
Symbol -> Symbol
model : Model
compList : ComponentId list
Returns: Model
Modifiers: inline |
|
Full Usage:
tryGetPastedEl copiedIds pastedIds target
Parameters:
'a list
pastedIds : 'b list
target : 'a
Returns: 'b option
|
|
|
|
Full Usage:
updateMemory model compId updateFn
Parameters:
Model
compId : ComponentId
updateFn : Memory1 -> Memory1
Returns: Model
Modifiers: inline |
|
Full Usage:
updateSymbol updateFn compId model
Parameters:
Symbol -> Symbol
compId : ComponentId
model : Model
Returns: Model
Modifiers: inline |
|
Full Usage:
writeMemoryLine model (compId, addr, value)
Parameters:
Model
compId : ComponentId
addr : bigint
value : bigint
Returns: Model
Modifiers: inline |
|
Full Usage:
writeMemoryType model compId memory
Parameters:
Model
compId : ComponentId
memory : ComponentType
Returns: Model
Modifiers: inline |