WaveSimSelectHelpers Module
Types and nested modules
| Type/Module | Description |
Functions and values
| Function or value | Description |
Full Usage:
componentSearchBox wsModel dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
|
The selected waves the simulation still has, which is what Show Only Selected shows and what the ticks in the dialog are drawn from. A selection outliving what it names is the ordinary consequence of the simulation being rebuilt, and refreshWaveSim re-resolves it - but the dialog is drawn from whatever the model holds at that moment, so it has to be able to read a selection that has not been re-resolved yet. Says so when it happens, since a selection quietly shrinking is worth knowing about. It used to check the CANDIDATES against the simulation as well. They are read out of WaveIndex or out of WaveDetails, both of which the simulation is what defines, so there was nothing there to find.
|
Full Usage:
filterWaves shown wsModel
Parameters:
Set<InstancePath>
wsModel : WaveSimModel
Returns: (type)
|
Filtering function that applies an AND operation across four search criteria. OfSheet is used to return the waves that match the sheet box All returns all filtered waves without any sheet filtering. `shown` is the sheet instances the two panes are going to draw - the handful the collapsed hierarchy resolved to, one per node. A wave of any other instance cannot appear in either pane, so it is dropped before anything else looks at it. That is the difference between work proportional to the design somebody wrote and work proportional to what it expands to: main6 of largeTest is seven sheets and tens of thousands of instances, carrying 208,896 waves between them, and the dialog draws seven rows. None means Show Only Selected, which is not restricted to the instances the hierarchy resolved to: a wave already chosen inside an instance no combo box is currently showing must stay reachable, or it could never be deselected. It is restricted to the waves that were CHOSEN, which is a shorter list than any of them. Every membership test here is against a Set. They were lists as long as the expansion, tested once per wave, which is a product of two numbers that both grow with the design - the reason opening this dialog on a large design took minutes. The worst case was the DEFAULT one: an empty sheet box matches every instance, since every string contains the empty string.
|
Full Usage:
isSubSheetOf arg1 sheets
Parameters:
InstancePath
sheets : Set<InstancePath>
Returns: bool
|
Whether a sheet instance is one of `sheets`, or lies inside one. An instance is the path of custom components between it and the root, innermost first, so an enclosing instance is a SUFFIX of it - the same path with the inner steps taken off - and containment is answered without consulting the simulation at all. This used to walk a stored instance-to-parent map one level at a time, and needed a note about instances the simulation no longer holds; a suffix test has nothing to look up and so nothing to miss.
|
Full Usage:
makeFlatGroupRow showDetails ws nodeKey grp wavesInGroup dispatch
Parameters:
bool
ws : WaveSimModel
nodeKey : string list
grp : ComponentGroup
wavesInGroup : Wave list
dispatch : Msg -> unit
Returns: TableRow
|
|
Full Usage:
makeSelectionTable ws hierarchy waves dispatch
Parameters:
WaveSimModel
hierarchy : SelectorHierarchy
waves : Wave list
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
makeSummaryItem showDetails ws summaryItem aboveRows rows cBox waves dispatch
Parameters:
bool
ws : WaveSimModel
summaryItem : ReactElement
aboveRows : ReactElement
rows : TableRow list
cBox : CheckBoxStyle
waves : Wave list
dispatch : Msg -> unit
Returns: TableRow
|
One row of the selection table: a checkbox over all of `waves`, and a summary that opens to show `rows` - each of which is a group of components, or a whole sheet, and may open in turn. `aboveRows` goes in the body, between the summary and the table. For a sheet that is the combo box choosing which of its instances the rows belong to, which belongs there rather than in the summary, since a click on the summary opens and closes the row. `null` where there is nothing. In general waves.Length > rows.Length, since one row typically holds several ports.
|
|
The line of small text in the gap between the search boxes and the two panes. Which line it is depends on whether either pane is having to scroll sideways - a fact about how wide the browser laid its content out, which nothing in the model knows, so it is read off the panes themselves as the code editor reads its own scroll container. The read is of the DOM the last render left, so the dialog's first frame has nothing to measure and a change of filter is followed a frame late. For a hint that is fine, and it is the price of not keeping a copy of a browser measurement in the model, where it would have to be kept true. Sideways only. Scrolling down is what a list of waveforms normally does, so counting it would leave the warning permanently up and the tip under it never read.
|
Full Usage:
portSearchBox wsModel dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
|
|
Full Usage:
selectAllSubsheetsBox ws dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
selectWavesModal wsModel dispatch model
Parameters:
WaveSimModel
dispatch : Msg -> unit
model : Model
Returns: ReactElement
|
|
|
|
Full Usage:
sheetSearchBox wsModel dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
showOnlySelectedBox ws dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
toggleSelectSubGroup wsModel dispatch selected waves
Parameters:
WaveSimModel
dispatch : Msg -> unit
selected : bool
waves : WaveIndexT list
|
Select or deselect every wave a row covers. All of them. Both this and the checkbox above it used to keep only the waves at the shallowest access path they were given, from when a sheet's row could hold the waves of its whole subtree and ticking it had to mean that sheet's own signals rather than its children's. A row is now the waves of one component group within one sheet INSTANCE, or of one instance, so they are all at one depth and the shallowest of them is all of them.
|
Full Usage:
toggleWaveSelection index wsModel dispatch
Parameters:
WaveIndexT
wsModel : WaveSimModel
dispatch : Msg -> unit
|
|
Full Usage:
updateSheetString newSheetName ws
Parameters:
string
ws : WaveSimModel
Returns: string
|
|
Full Usage:
waveCheckBox (arg1, arg2) isChecked toggle name ws dispatch
Parameters:
WaveSimModel -> 'STATE
arg1 : 'STATE -> WaveSimModel -> WaveSimModel
isChecked : 'STATE -> bool
toggle : 'STATE -> 'STATE
name : string
ws : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
A checkbox over one piece of the wave sim model, shown ticked or not by `isChecked` and toggled by `toggle`. `toggle` is given the state as it is when the update runs, not as it was when the box was drawn. A box is drawn once and clicked later, and the model may have moved in between - the same reason every handler here dispatches UpdateWSModel rather than replacing the model wholesale.
|
Full Usage:
waveCheckBoxItem wsModel waveIds dispatch
Parameters:
WaveSimModel
waveIds : WaveIndexT list
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
waveIndicesOfInstance fs instance
Parameters:
FastSimulation
instance : InstancePath
Returns: WaveIndexT list
|
|
Full Usage:
waveIndicesOfInstanceBy pick fs instance
Parameters:
Component -> 'a option
fs : FastSimulation
instance : InstancePath
Returns: ('a * WaveIndexT) list
|
The waves offered inside ONE instance. Worked out from the DESIGN: the sheet that instance is a copy of names its own components, and each is looked up in the simulation to get its ports and their step arrays. So this costs the size of one sheet, however many times that sheet is instantiated. It replaces an index of every wave in the simulation grouped by instance, which cost the whole expansion to build - 208,896 entries on largeTest - to answer a question only ever asked about the handful of instances on screen. The rule deciding which ports carry a wave is FastCreate.portCarriesWave, the same one the wave index itself is built from, so the two cannot disagree. The waves of one instance, each paired with something read off the DESIGN component it belongs to - its label, its type, whatever the caller needs to rank or filter on. The ports come from `PortView.ofInstance`, which is the narrow question a remote simulator can answer; the components they belong to come from the design. Both are the size of one sheet, however many times that sheet is instantiated.
|
|
|
|
|
|
|
Full Usage:
waveSelectBreadcrumbs wsModel hierarchy filteredWaves dispatch model
Parameters:
WaveSimModel
hierarchy : SelectorHierarchy
filteredWaves : (type)
dispatch : Msg -> unit
model : Model
Returns: ReactElement
|
Displays a breadcrumb of sheets based on the current search and wave matches. One pill per NODE of the collapsed hierarchy, not per instance: a sheet instantiated four times inside one parent is one pill, and which of the four it stands for is the combo box in the other pane. Both panes are drawn from the same hierarchy, so they cannot disagree about it.
|