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 AllWaves, both of which the simulation is what defines, so there was nothing there to find.
|
Full Usage:
filterWaves shown wsModel
Parameters:
Set<string> option
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 subSheetId sheets
Parameters:
string
sheets : Set<string>
Returns: bool
|
|
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.
|
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
|
|
|
The waves of each sheet instance, worked out once per AllWaves map rather than once per render. The selector wants the waves of the handful of instances it is drawing and had no way to ask for them: it read every wave in the design and threw nearly all of them away, on every keystroke in a search box and every click on a pill. main6 of largeTest carries 208,896 waves. Keyed on the SIMULATION, not on AllWaves. Which waves exist and which instance each belongs to are settled when the simulation is built; AllWaves holds the same waves with their drawn SVGs, and is REPLACED every time any waveform is generated - Map.change returns a new map - so keying on it meant selecting one wave rebuilt this index over every wave in the design. It holds indices rather than the records, for the same reason: the records change as they are drawn, and the caller has AllWaves to look them up in.
|
|
|
|
|
|
|
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.
|