Module Simantics/SelectionView

This module is undocumented. This is a list of its definitions.

standardGetDisplayValue1 :: Variable -> <ReadGraph> a

The standard reading of the HasDisplayValue property of a property variable, that is the text the selection view shows for it. The argument is the display value variable itself; the property it belongs to is its parent.

A property that holds an SCL value reads as its expression prefixed with =. Otherwise the value is rendered by the formatter of the property if it has one, and by the databoard printer if it does not. A property whose value cannot be rendered at all reads as the text null.

standardGetDisplayValue2 :: Variable -> Binding a -> <ReadGraph> a

As standardGetDisplayValue1, but adapts the resulting text to the given binding. Fails if the text cannot be adapted to it.

standardGetDisplayValueDatatype :: Variable -> <ReadGraph> Datatype

The datatype of a HasDisplayValue property, which is always the string datatype regardless of the datatype of the property it displays.

standardSetDisplayValue2 :: Variable -> a -> <WriteGraph> ()

The standard writing of the HasDisplayValue property, that is what happens when the user types into the selection view. See standardSetDisplayValue3 for what the text may be.

standardSetDisplayValue3 :: Variable -> a -> Binding a -> <WriteGraph> ()

As standardSetDisplayValue2. The binding argument is not used.

The value must be a string. A string beginning with = replaces the property with an SCL value holding that expression. Any other string is parsed according to the datatype of the property, with a comma accepted in place of the decimal point of a number, and the write is recorded in the metadata with a comment. Fails if the value is not a string or does not parse.