WaveSimStyle Module
Functions to style the DOM elements used in waveform simulator
Functions and values
| Function or value | Description |
Full Usage:
backgroundSVG wsModel count
Parameters:
WaveSimModel
count : int
Returns: ReactElement list
|
Grid lines separating clock cycles. Placed relative to the FIRST SHOWN cycle, like the cursor highlight beside them, because the SVG they are drawn in starts at x = 0 whatever the view is scrolled to (`viewBoxMinX`). Drawing them at the absolute cycle number instead put them StartCycle cycles to the right of where they belong - off the end of the waveforms, and only visible at all because that SVG does not clip (it must not, or a tooltip could not run out over the columns beside it). Scrolled to cycle 0 they were right, which is why this survived: what it looked like further along was a grid that came and went with the scroll position.
|
|
|
|
|
Full Usage:
calcWaveformAndScrollBarHeight wsModel
Parameters:
WaveSimModel
Returns: float
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Props for clock cycle text Input field No AutoFocus. React focuses an autofocused element every time it mounts, so this box took the keyboard whenever the viewer's control row was rebuilt - on Start, and after a cursor move or a zoom. The keyboard then belonged to a text field, and the Left and Right arrows that step the cursor stopped working until something else was clicked. You click into a box to type in it; SelectedComponentView's name box says the same thing for the same reason.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
cursorCycleHighlightSVG m dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
detailsProps showDetails cBox ws dispatch
Parameters:
bool
cBox : CheckBoxStyle
ws : WaveSimModel
dispatch : Msg -> Unit
Returns: IHTMLProp list
|
|
|
|
|
|
|
|
|
|
Full Usage:
nameRowLevelLeftProps visibility
Parameters:
string
Returns: IHTMLProp list
|
|
|
|
Full Usage:
namesColBackground fill line
Parameters:
string
line : (int * string * bool) option
Returns: CSSProp list
|
Background for the names column, or for one row of it. The strip at the left, where the view button sits, is painted as pane rather than as column, so that the button reads as standing outside the line the labels start on - which is what it is. The delete cross is inside that line, because it belongs to the label. Any line along the row starts at that same place rather than running out into the strip. It is painted as a second background layer, since a border cannot be inset. The line is given as thickness, colour, and whether it goes along the top of the element rather than the bottom.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
ramTablesStyle sharingWithWaveforms
Parameters:
bool
Returns: HTMLAttr
|
|
Full Usage:
screenHeight ()
Parameters:
unit
Returns: float
|
|
Full Usage:
screenWidth ()
Parameters:
unit
Returns: float
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
separatorColour
Returns: string
|
|
Full Usage:
setSelectionOpen cBox show wsModel
Parameters:
CheckBoxStyle
show : bool
wsModel : WaveSimModel
Returns: WaveSimModel
|
|
Full Usage:
setWaveGroupSelectionOpen wsModel grps show
Parameters:
WaveSimModel
grps : (ComponentGroup * string list) list
show : bool
Returns: WaveSimModel
|
|
Full Usage:
setWaveSheetSelectionOpen wsModel subSheets show
Parameters:
WaveSimModel
subSheets : string list list
show : bool
Returns: WaveSimModel
|
Open or close nodes of the wave selector's hierarchy, each named by its path of design-time sheet names. Opening one closes any other node of the same sheet. A sheet that several routes reach appears in several places, and showing more than one of them at once is the multiplying that collapsing the hierarchy is there to prevent. Where only one route reaches a sheet this is vacuous - there is only one such node - so the rule needs no test for which kind of sheet it is.
|
|
|
|
The pane below the controls, holding the waveforms, their horizontal scrollbar and the RAM tables. It is the space left under the controls, and it NEVER scrolls: the waveforms scroll inside it, and so do the RAM tables when there are any. It used to be sized from its CONTENT - the height of the whole selection, or the whole window when RAMs were shown - so a selection taller than the pane made the pane taller than the window, and the tab body scrolled to reach the rest. That is where the second scrollbar came from: an outer one that moved the controls off the top of the screen, and an inner one that moved the waveforms.
|
|
|
Full Usage:
singleValueOnWaveProps isStart textFont textWeight xpos
Parameters:
bool
textFont : float
textWeight : 'a
xpos : 'b
-
Starting X-direction position.
Returns: IProp list
|
|
|
|
Full Usage:
summaryProps isSummary cBox ws dispatch
Parameters:
bool
cBox : CheckBoxStyle
ws : WaveSimModel
dispatch : Msg -> Unit
Returns: IHTMLProp list
|
|
|
|
|
|
|
|
|
|
Full Usage:
topRow ws background topRowContent
Parameters:
WaveSimModel
background : CSSProp list
topRowContent : ReactElement seq
Returns: ReactElement list
|
Empty row used in namesColumn and valuesColumn. Shifts these down by one to allow for the row of clk cycle numbers in waveformsColumn. The background carries the line under the row: the names column insets that line past the view button strip, the values column has no strip and draws it as a plain border.
|
|
Style for top row of buttons. Each is as wide as its own label needs. It used to be one fixed width for a shipped build and a wider one for a development build - where the button that starts a simulation also names the simulator it will start - which made every OTHER button in the row that much fatter to hold a label none of them has, ran the row past the edge of the pane, and left the development build looking nothing like the one people use.
|
|
|
|
|
|
|
|
|
Full Usage:
valuesColumnStyle ws colWidth
Parameters:
WaveSimModel
colWidth : int
Returns: HTMLAttr
|
|
Full Usage:
viewBoxMinX m
Parameters:
'a
Returns: string
|
|
|
|
|
Style of the button which shows a waveform's component on the schematic. It sits in a slot of its own at the outer edge of the name row, beyond the delete icon, so that it reads as an extra beside the label rather than as one of the label's own controls. Green when the component cannot be seen and grey when it is already in front of the user; shown only while the row is hovered.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The waveforms within that pane: whatever height is left after the scrollbar and the RAM tables, scrolling within it. With no RAMs that is all of it. `min-height: 0` is what lets it be SHORTER than its content: a flex item's floor is its content by default, which would push the pane out again and put the outer scrollbar back.
|
|
|
|
|