Module Simantics/Diagram/Internal/DiagramOntologyEntryPoint

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

decodeFont :: Variable -> <ReadGraph> String

The font of the text element that owns the given property variable, as the string family,size,style that textFontValueAccessor shows to the user. The style is one of Normal, Bold, Italic and BoldItalic.

The element is the resource of the grandparent of the variable. An element with no font at all gives the empty string; a font that leaves a part unset is reported as Arial, size 12 and Normal. Requires a read transaction.

encodeFont :: Variable -> String -> <WriteGraph> ()

Sets the font of the text element that owns the given property variable from the string family,size,style, the form decodeFont produces. The old font of the element is detached and a new one written in its place.

A value that does not split into exactly three comma-separated parts is ignored. A size that is not an integer, or a style outside Normal, Bold, Italic and BoldItalic, makes this fail. Requires a write transaction.

textFontValueAccessor :: ValueAccessor