Header menu logo issie

MenuHelpers Module

Types and nested modules

Type/Module Description

Constants

SheetTree

Node in the sheet tree, child nodes correspond to custom components in sheet.

Functions and values

Function or value Description

addToRecents path recents

Full Usage: addToRecents path recents

Parameters:
    path : 'a
    recents : 'a list option

Returns: 'a list option
path : 'a
recents : 'a list option
Returns: 'a list option

allRootSheets sTrees

Full Usage: allRootSheets sTrees

Parameters:
Returns: Set<string>
sTrees : Map<string, SheetTree>
Returns: Set<string>

breadcrumbName_

Full Usage: breadcrumbName_

Returns: Lens<SheetTree, string>
Returns: Lens<SheetTree, string>

currWaveSimModel model

Full Usage: currWaveSimModel model

Parameters:
Returns: WaveSimModel option

returns a WaveSimModel option if a file is loaded, otherwise None

model : Model
Returns: WaveSimModel option

deleteFileConfirmationPopup sheetName model dispatch

Full Usage: deleteFileConfirmationPopup sheetName model dispatch

Parameters:
    sheetName : string
    model : Model
    dispatch : Msg -> unit

Returns: Unit
sheetName : string
model : Model
dispatch : Msg -> unit
Returns: Unit

displayFileErrorNotification err dispatch

Full Usage: displayFileErrorNotification err dispatch

Parameters:
    err : string
    dispatch : Msg -> 'a

Returns: 'a
err : string
dispatch : Msg -> 'a
Returns: 'a

extractLabelBase text

Full Usage: extractLabelBase text

Parameters:
    text : string

Returns: string
text : string
Returns: string

fileEntryBox files fName dialog dispatch

Full Usage: fileEntryBox files fName dialog dispatch

Parameters:
Returns: ReactElement

maybe no longer needed...

files : string list
fName : string
dialog : PopupDialogData
dispatch : Msg -> unit
Returns: ReactElement

foldOverTree isSubSheet folder tree model

Full Usage: foldOverTree isSubSheet folder tree model

Parameters:
Returns: Model
isSubSheet : bool
folder : bool -> SheetTree -> Model -> Model
tree : SheetTree
model : Model
Returns: Model

formatLabel comp text

Full Usage: formatLabel comp text

Parameters:
Returns: string
comp : Component
text : string
Returns: string

formatLabelAsBus width text

Full Usage: formatLabelAsBus width text

Parameters:
    width : int
    text : string

Returns: string
width : int
text : string
Returns: string

formatLabelFromType compType text

Full Usage: formatLabelFromType compType text

Parameters:
Returns: string
compType : ComponentType
text : string
Returns: string

getFileInProject name project

Full Usage: getFileInProject name project

Parameters:
Returns: LoadedComponent option
name : string
project : Project
Returns: LoadedComponent option

getHintPaneElement model

Full Usage: getHintPaneElement model

Parameters:
Returns: ReactElement list
model : Model
Returns: ReactElement list

getSavedWave model

Full Usage: getSavedWave model

Parameters:
Returns: SavedWaveInfo option

extract SavedWaveInfo from model to be saved

model : Model
Returns: SavedWaveInfo option

getSheetTrees allowAllInstances p

Full Usage: getSheetTrees allowAllInstances p

Parameters:
    allowAllInstances : bool
    p : Project

Returns: Map<string, SheetTree>

Get the subsheet tree for all sheets in the current project. Returns a map from sheet name to tree of SheetTree nodes

allowAllInstances : bool
p : Project
Returns: Map<string, SheetTree>

isFileInProject name project

Full Usage: isFileInProject name project

Parameters:
Returns: bool
name : string
project : Project
Returns: bool

loadComponentWithRAMChanges (arg1, arg2) savedWaveSim ldc model

Full Usage: loadComponentWithRAMChanges (arg1, arg2) savedWaveSim ldc model

Parameters:
Returns: Model
arg0 : Component list
arg1 : Connection list
savedWaveSim : SavedWaveInfo option
ldc : LoadedComponent
model : Model
Returns: Model

makeBreadcrumbNamesUnique tree

Full Usage: makeBreadcrumbNamesUnique tree

Parameters:
Returns: SheetTree

Throughout the tree of sheets adjust breadcrumbName so it is unique within the children of each sheet

tree : SheetTree
Returns: SheetTree

makeSourceMenu model updateMem cid dispatch modelCurrent

Full Usage: makeSourceMenu model updateMem cid dispatch modelCurrent

Parameters:
Returns: ReactElement

Make a poup with menu to view and select a memory data source

model : Model
updateMem : ComponentId -> (Memory1 -> Memory1) -> Unit
cid : ComponentId
dispatch : Msg -> Unit
modelCurrent : Model
Returns: ReactElement

openDemoProjectFromPath path model dispatch

Full Usage: openDemoProjectFromPath path model dispatch

Parameters:
    path : string
    model : Model
    dispatch : Msg -> unit

Returns: Unit

open an existing demo project from its path

path : string
model : Model
dispatch : Msg -> unit
Returns: Unit

openFileInProject name project model dispatch

Full Usage: openFileInProject name project model dispatch

Parameters:
name : string
project : Project
model : Model
dispatch : Msg -> unit

openFileInProject' saveCurrent name project model dispatch

Full Usage: openFileInProject' saveCurrent name project model dispatch

Parameters:
    saveCurrent : bool
    name : string
    project : Project
    model : Model
    dispatch : Msg -> unit

Open the specified file, saving the current file if needed. Creates messages sufficient to do all necessary model and diagram change Terminates a simulation if one is running Closes waveadder if it is open

saveCurrent : bool
name : string
project : Project
model : Model
dispatch : Msg -> unit

openProjectFromPath path model dispatch

Full Usage: openProjectFromPath path model dispatch

Parameters:
    path : string
    model : Model
    dispatch : Msg -> unit

Returns: Unit

open an existing project from its path

path : string
model : Model
dispatch : Msg -> unit
Returns: Unit

quantifyChanges ldc1 ldc2

Full Usage: quantifyChanges ldc1 ldc2

Parameters:
Returns: int * int

Works out number of components and connections changed between two LoadedComponent circuits a new ID => a change even if the circuit topology is identical. Layout differences do not mean changes, as is implemented in the reduce functions which remove layout.

ldc1 : LoadedComponent
ldc2 : LoadedComponent
Returns: int * int

raiseFileNotification dispatch msg

Full Usage: raiseFileNotification dispatch msg

Parameters:
    dispatch : Msg -> unit
    msg : string option

temporary shim for compatibility while dispatch is still being used.

dispatch : Msg -> unit
msg : string option

readLastBackup comp

Full Usage: readLastBackup comp

Parameters:
Returns: (int * string * string) option

return an option containing sequence data and file name and directory of the latest backup file for given component, if it exists.

comp : LoadedComponent
Returns: (int * string * string) option

removeAllCustomComps name project

Full Usage: removeAllCustomComps name project

Parameters:
Returns: LoadedComponent list
name : string
project : Project
Returns: LoadedComponent list

removeFileInProject name project model dispatch

Full Usage: removeFileInProject name project model dispatch

Parameters:

Remove file.

name : string
project : Project
model : Model
dispatch : Msg -> unit

resolveComponentOpenPopup pPath components resolves model dispatch

Full Usage: resolveComponentOpenPopup pPath components resolves model dispatch

Parameters:
Returns: Unit

work out what to do opening a file

pPath : string
components : LoadedComponent list
resolves : LoadStatus list
model : Model
dispatch : Msg -> Unit
Returns: Unit

saveOpenFileAction isAuto model dispatch

Full Usage: saveOpenFileAction isAuto model dispatch

Parameters:
Returns: (LoadedComponent * (Component list * Connection list)) option

Save the sheet currently open, return the new sheet's Loadedcomponent if this has changed. Do not change model. update Symbol model with new RAM contents.

isAuto : bool
model : Model
dispatch : Msg -> Unit
Returns: (LoadedComponent * (Component list * Connection list)) option

saveOpenFileActionWithModelUpdate model dispatch

Full Usage: saveOpenFileActionWithModelUpdate model dispatch

Parameters:
Returns: (LoadedComponent * (Component list * Connection list)) option

save current open file, updating model etc, and returning the loaded component and the saved (unreduced) canvas state

model : Model
dispatch : Msg -> Unit
Returns: (LoadedComponent * (Component list * Connection list)) option

saveOpenFileToModel model

Full Usage: saveOpenFileToModel model

Parameters:
Returns: Model option

Save the sheet currently open, return updated model dispatch not needed. currently errors in saving are not processed: because without dispatch we cannot add an alert. this could be changed by using the Notification field in the returned model

model : Model
Returns: Model option

saveOpenProjectInNewFormat model

Full Usage: saveOpenProjectInNewFormat model

Parameters:
model : Model

setComponentLabel model sheetDispatch comp text

Full Usage: setComponentLabel model sheetDispatch comp text

Parameters:
model : Model
sheetDispatch : Dispatch<Msg>
comp : Component
text : string

setupProjectFromComponents finishUI sheetName ldComps model dispatch

Full Usage: setupProjectFromComponents finishUI sheetName ldComps model dispatch

Parameters:
Returns: Unit

Load a new project as defined by parameters. Ends any existing simulation Closes WaveSim if this is being used

finishUI : bool
sheetName : string
ldComps : LoadedComponent list
model : Model
dispatch : Msg -> Unit
Returns: Unit

subSheets_

Full Usage: subSheets_

Returns: Lens<SheetTree, SheetTree list>
Returns: Lens<SheetTree, SheetTree list>

updateLoadedComponents name setFun lcLst dispatch

Full Usage: updateLoadedComponents name setFun lcLst dispatch

Parameters:
Returns: LoadedComponent list

Return LoadedComponents with sheet name updated according to setFun. Do not update model.

name : string
setFun : LoadedComponent -> LoadedComponent
lcLst : LoadedComponent list
dispatch : Msg -> Unit
Returns: LoadedComponent list

updateProjectFromCanvas model dispatch

Full Usage: updateProjectFromCanvas model dispatch

Parameters:
Returns: Project option

return current project with current sheet updated from canvas if needed. Do not update model.

model : Model
dispatch : Msg -> Unit
Returns: Project option

updateSymbolRAMs ramCheck sModel

Full Usage: updateSymbolRAMs ramCheck sModel

Parameters:
Returns: Model
ramCheck : Component list
sModel : Model
Returns: Model

warnAppWidth dispatch afterFun

Full Usage: warnAppWidth dispatch afterFun

Parameters:
    dispatch : Msg -> unit
    afterFun : unit -> unit

Returns: Unit
dispatch : Msg -> unit
afterFun : unit -> unit
Returns: Unit

writeComponentToBackupFile numCircuitChanges numHours comp dispatch

Full Usage: writeComponentToBackupFile numCircuitChanges numHours comp dispatch

Parameters:

Write Loadedcomponent comp to a backup file if there has been any change. Overwrite the existing backup file only if it is a small, and recent, change. Parameters determine thresholds of smallness and recency return () - display an error if the write goes wrong.

numCircuitChanges : int
numHours : float
comp : LoadedComponent
dispatch : Msg -> Unit

writeComponentToBackupFileNow numCircuitChanges numHours comp

Full Usage: writeComponentToBackupFileNow numCircuitChanges numHours comp

Parameters:

Write Loadedcomponent comp to a backup file if there has been any change. Overwrite the existing backup file only if it is a small, and recent, change. Parameters determine thresholds of smallness and recency return () - ignore errors

numCircuitChanges : int
numHours : float
comp : LoadedComponent

writeComponentToFile comp

Full Usage: writeComponentToFile comp

Parameters:
Returns: Result<unit, string>
comp : LoadedComponent
Returns: Result<unit, string>

Type something to start searching.