Header menu logo issie

MiscMenuView Module

Types and nested modules

Type/Module Description

Constants

BreadcrumbConfig

Functions and values

Function or value Description

Button sheetPath buttonDecision label isDisabled model dispatch

Full Usage: Button sheetPath buttonDecision label isDisabled model dispatch

Parameters:
    sheetPath : string
    buttonDecision : ImportDecision option
    label : string
    isDisabled : bool
    model : Model
    dispatch : Msg -> unit

Returns: ReactElement list
sheetPath : string
buttonDecision : ImportDecision option
label : string
isDisabled : bool
model : Model
dispatch : Msg -> unit
Returns: ReactElement list

allRootHierarchiesFromProjectBreadcrumbs cfg dispatch model

Full Usage: allRootHierarchiesFromProjectBreadcrumbs cfg dispatch model

Parameters:
Returns: ReactElement

Breadcrumbs of entire design hierarchy of every root sheet in project Display as a ReactElement the breadcrumbs. rootSheet - root of hierrarchy displayed clickAction - what happens when a given breadcrumb (labelled by its path to root) is clicked.

cfg : BreadcrumbConfig
dispatch : Msg -> unit
model : Model
Returns: ReactElement

breadcrumbsOfTree cfg tree dispatch

Full Usage: breadcrumbsOfTree cfg tree dispatch

Parameters:
Returns: ReactElement

Draw a hierarchy that has already been built. The wave selector builds its own, because the same tree decides what its other pane shows and the two must not be able to disagree.

cfg : BreadcrumbConfig
tree : SheetTree
dispatch : Msg -> unit
Returns: ReactElement

copySheetIntoProjectPopup title placeholder buttonText notes nameOf oldPath afterCopy model dispatch

Full Usage: copySheetIntoProjectPopup title placeholder buttonText notes nameOf oldPath afterCopy model dispatch

Parameters:
    title : string
    placeholder : string
    buttonText : string
    notes : ReactElement list
    nameOf : string -> string
    oldPath : string
    afterCopy : string -> Model -> unit
    model : Model
    dispatch : Msg -> unit

Copy the sheet file at oldPath into the current project under a name typed by the user. nameOf turns the dialog text into the new sheet name: Import prefixes it, Duplicate uses it whole. notes are extra lines displayed above the preview of the new name. afterCopy is given the new sheet name and the current model, and decides how the project is reloaded. Example: nameOf = (fun s -> s + "_adder"), text "old" -> sheet "old_adder" in file old_adder.dgm.

title : string
placeholder : string
buttonText : string
notes : ReactElement list
nameOf : string -> string
oldPath : string
afterCopy : string -> Model -> unit
model : Model
dispatch : Msg -> unit

createSheetInfo model projectDir dispatch (arg4, arg5)

Full Usage: createSheetInfo model projectDir dispatch (arg4, arg5)

Parameters:
    model : Model
    projectDir : string
    dispatch : Msg -> unit
    arg3 : string
    arg4 : Set<string>

Returns: ReactElement array

for each imported sheet, create layout for its row in the popup table, as well as rows for all its dependencies.

model : Model
projectDir : string
dispatch : Msg -> unit
arg3 : string
arg4 : Set<string>
Returns: ReactElement array

dependencyRow sheetPath model dispatch dependencyPath

Full Usage: dependencyRow sheetPath model dispatch dependencyPath

Parameters:
    sheetPath : string
    model : Model
    dispatch : Msg -> unit
    dependencyPath : string

Returns: ReactElement

prepare information that should display on a row for a dependency of a sheet

sheetPath : string
model : Model
dispatch : Msg -> unit
dependencyPath : string
Returns: ReactElement

duplicateSheet sheetName model dispatch

Full Usage: duplicateSheet sheetName model dispatch

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

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

getDecisionText path model sheetIsDependency decisionNeeded

Full Usage: getDecisionText path model sheetIsDependency decisionNeeded

Parameters:
    path : string
    model : Model
    sheetIsDependency : bool
    decisionNeeded : bool

Returns: ReactElement

return text that should display in 'Action' column of import sheets popup

path : string
model : Model
sheetIsDependency : bool
decisionNeeded : bool
Returns: ReactElement

getDependents model oldSheetPath newSheetPath

Full Usage: getDependents model oldSheetPath newSheetPath

Parameters:
    model : Model
    oldSheetPath : string
    newSheetPath : string

Returns: string option

given paths from source directory and destination directory of a sheet that needs importing, if it exists in destination directory, return its dependents wrapped in 'Some'. Otherwise return 'None'

model : Model
oldSheetPath : string
newSheetPath : string
Returns: string option

getDependentsFromSheet model sheetName

Full Usage: getDependentsFromSheet model sheetName

Parameters:
    model : Model
    sheetName : string

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

Find all sheets that depend on the given sheet in the current project

model : Model
sheetName : string
Returns: (string * string * ((string * int) list * (string * int) list)) list option

gridArea gridPos

Full Usage: gridArea gridPos

Parameters:
Returns: string
gridPos : CSSGridPos
Returns: string

gridBox gap s

Full Usage: gridBox gap s

Parameters:
Returns: ReactElement
gap : string
s : ReactElement seq
Returns: ReactElement

gridElement reactElementId props styleProps pos contents

Full Usage: gridElement reactElementId props styleProps pos contents

Parameters:
Returns: ReactElement

a Grid item centre justified and occupying given area

reactElementId : string
props : IHTMLProp list
styleProps : CSSProp list
pos : CSSGridPos
contents : ReactElement list
Returns: ReactElement

hierarchyBreadcrumbs cfg dispatch model

Full Usage: hierarchyBreadcrumbs cfg dispatch model

Parameters:
Returns: ReactElement

Breadcrumbs of entire simulated design hierarchy. Display as a ReactElement the breadcrumbs. ClickAction - what happens when a given breadcrumb (labelled by its path to root) is clicked.

cfg : BreadcrumbConfig
dispatch : Msg -> unit
model : Model
Returns: ReactElement

hierarchyFromSheetBreadcrumbs rootSheet cfg dispatch model

Full Usage: hierarchyFromSheetBreadcrumbs rootSheet cfg dispatch model

Parameters:
Returns: ReactElement

Breadcrumbs of entire design hierarchy from given sheet Display as a ReactElement the breadcrumbs. rootSheet - root of hierrarchy displayed clickAction - what happens when a given breadcrumb (labelled by its path to root) is clicked.

rootSheet : string
cfg : BreadcrumbConfig
dispatch : Msg -> unit
model : Model
Returns: ReactElement

importSheet model dispatch

Full Usage: importSheet model dispatch

Parameters:

Import sheet from directory, ask user to sort out dependency issues

model : Model
dispatch : Msg -> unit

importSheetPopup destProjectDir paths sourceProjectDir dispatch

Full Usage: importSheetPopup destProjectDir paths sourceProjectDir dispatch

Parameters:
    destProjectDir : string
    paths : string list
    sourceProjectDir : string
    dispatch : Msg -> unit

Returns: Unit
destProjectDir : string
paths : string list
sourceProjectDir : string
dispatch : Msg -> unit
Returns: Unit

makeBreadcrumbsFromPositions sheetTreeMap cfg positionSheetsInGrid dispatch

Full Usage: makeBreadcrumbsFromPositions sheetTreeMap cfg positionSheetsInGrid dispatch

Parameters:
Returns: ReactElement

display as a ReactElement the breadcrumbs. clickAction - what happens when a given breadcrumb is clicked. project - the model project.

sheetTreeMap : Map<string, SheetTree>
cfg : BreadcrumbConfig
positionSheetsInGrid : Map<string, SheetTree> -> (CSSGridPos * SheetTree) list
dispatch : Msg -> unit
Returns: ReactElement

makeGridFromSheetsWithPositions cfg dispatch posL

Full Usage: makeGridFromSheetsWithPositions cfg dispatch posL

Parameters:
Returns: ReactElement
cfg : BreadcrumbConfig
dispatch : Msg -> unit
posL : (CSSGridPos * SheetTree) list
Returns: ReactElement

maybeWarning dialogText project

Full Usage: maybeWarning dialogText project

Parameters:
    dialogText : string
    project : Project

Returns: ReactElement option

return a react warning message if name if not valid for a sheet Add or Rename, or else None

dialogText : string
project : Project
Returns: ReactElement option

pathsWithDependencies destProjectDir paths sourceProjectDir

Full Usage: pathsWithDependencies destProjectDir paths sourceProjectDir

Parameters:
    destProjectDir : string
    paths : string list
    sourceProjectDir : string

Returns: (string * Set<string>) list

Returns with a list of each path with its dependencies. This includes dependencies of dependencies

destProjectDir : string
paths : string list
sourceProjectDir : string
Returns: (string * Set<string>) list

positionDesignHierarchyInGrid rootSheet trees

Full Usage: positionDesignHierarchyInGrid rootSheet trees

Parameters:
Returns: (CSSGridPos * SheetTree) list
rootSheet : string
trees : Map<string, SheetTree>
Returns: (CSSGridPos * SheetTree) list

positionRootAndFocusChildrenInGrid root pathToFocus trees

Full Usage: positionRootAndFocusChildrenInGrid root pathToFocus trees

Parameters:
    root : string
    pathToFocus : string list
    trees : Map<string, SheetTree>

Returns: (CSSGridPos * SheetTree) list
root : string
pathToFocus : string list
trees : Map<string, SheetTree>
Returns: (CSSGridPos * SheetTree) list

positionTreeInGrid tree

Full Usage: positionTreeInGrid tree

Parameters:
Returns: (CSSGridPos * SheetTree) list
tree : SheetTree
Returns: (CSSGridPos * SheetTree) list

renameSheetBeforeImportPopup oldPath model dispatch

Full Usage: renameSheetBeforeImportPopup oldPath model dispatch

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

When sheet selected for import is from current directory, show popup asking user to rename the file

oldPath : string
model : Model
dispatch : Msg -> unit

saveAsLibraryComponent sheetName model dispatch

Full Usage: saveAsLibraryComponent sheetName model dispatch

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

Duplicate the named sheet of the current project under a new name typed by the user. If that sheet is the open one it is saved to disk first when dirty, since the copy is made from the file rather than from the canvas. Save a sheet, and every sheet it uses, as components of a library. The chosen sheet is offered in the catalogue; the sheets below it are written too but NOT offered, since they exist only to serve it. That distinction used to be worked out by parsing every sheet of a library to see which were instantiated by others; it is now simply recorded, which is the point of having an authored header. The body of each .ldgm is the text of the sheet's .dgm read straight off disk, so a library component contains exactly what was saved. A sheet with unsaved changes is therefore refused rather than quietly written in its last-saved state.

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

smallSimulationBreadcrumbs rootName pathToFocus cfg dispatch model

Full Usage: smallSimulationBreadcrumbs rootName pathToFocus cfg dispatch model

Parameters:
Returns: ReactElement

Breadcrumbs of the focus sheet, with sheets on its path to root, and its children. Provides navigation while occupying small vertical area. Untested. *** TODO: hookthis function to simulation and test *** Should be called extracting inputs from waveform simulation. Display as a ReactElement the breadcrumbs. clickAction - what happens when a given breadcrumb (labelled by its path to root) is clicked. project - the model project

rootName : string
pathToFocus : string list
cfg : BreadcrumbConfig
dispatch : Msg -> unit
model : Model
Returns: ReactElement

twoButtons leftButton rightButton

Full Usage: twoButtons leftButton rightButton

Parameters:
Returns: ReactElement

return react element for 2 buttons that are side by side

leftButton : ReactElement list
rightButton : ReactElement list
Returns: ReactElement

Type something to start searching.