]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram.ontology/graph/DiagramElements.pgraph
Font property for DIA.TextElement
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / DiagramElements.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 G2D = <http://www.simantics.org/G2D-1.1>
4 DIA = <http://www.simantics.org/Diagram-2.2>
5 SEL = <http://www.simantics.org/SelectionView-1.2>
6
7 // SHAPE ELEMENT (NOT USED, DEPRECATE?)
8
9 DIA.Shape <T DIA.Element <T G2D.Shape
10
11 //// RASTER ELEMENT
12
13 DIA.RasterElement <T DIA.Element
14     @L0.singleProperty G2D.HasSVGDocument
15
16 //// SVG ELEMENT
17
18 DIA.SVGElement <T DIA.Element
19     @L0.singleProperty G2D.HasSVGDocument
20       // Parameters are id of edited element and new text.
21     >-- DIA.SVGElement.enableEditing ==> "Boolean" <R L0.HasProperty : DIA.DefinedElement.Parameter
22
23 //// ANIMATED SVG ELEMENT
24
25 DIA.AnimatedSVGElement <T DIA.Element
26     @L0.singleProperty G2D.HasSVGDocument
27     @L0.singleProperty G2D.HasSVGScript
28
29 //// TEXT ELEMENT
30
31 DIA.TextElement <T DIA.Element <T DIA.ColorProvider <T DIA.FontProvider
32     @L0.singleProperty DIA.HasText
33     @L0.optionalProperty DIA.FixedWidth
34     @L0.optionalProperty DIA.TextFieldName
35     @L0.singleProperty G2D.HasHorizontalAlignment
36     @L0.singleProperty G2D.HasVerticalAlignment
37     @L0.singleProperty G2D.HasStrokeWidth
38     @L0.assert DIA.TextFieldName ""
39     @L0.assert G2D.HasHorizontalAlignment G2D.Alignment.Leading
40     @L0.assert G2D.HasVerticalAlignment G2D.Alignment.Baseline
41     @L0.assert G2D.HasStrokeWidth
42         0 : L0.Float
43     >-- DIA.TextElement.font ==> "String" <R L0.HasProperty <R G2D.HasFont : SEL.GenericParameterType
44       L0.HasLabel "Font"
45       SEL.HasDisplayValue
46         _ : SEL.DisplayValue
47           SEL.HasCustomModifier
48             DIA.Functions.fontModifier : L0.Function
49           L0.valueAccessor
50             _ : L0.SCLValue
51               L0.SCLValue.expression "textFontValueAccessor"
52               L0.HasValueType "ValueAccessor" 
53               
54 DIA.HasText <R L0.HasProperty : L0.FunctionalRelation
55     L0.HasLabel "Text"
56     --> L0.String
57 DIA.FixedWidth <R L0.HasProperty : L0.FunctionalRelation
58     L0.HasLabel "Fixed Width"
59     --> L0.Double
60 DIA.TextFieldName <R L0.HasProperty : L0.FunctionalRelation 
61     L0.HasLabel "Text Field Name"
62     L0.HasDescription "A name used for identifying fields in PDF outputs."
63     --> L0.String
64
65 //// LINK
66
67 DIA.Link <T DIA.SVGElement
68     L0.HasDescription "Links are used on diagrams for navigating to other diagrams."
69
70 DIA.HasLinkTarget <R L0.IsRelatedTo
71     L0.HasDomain DIA.Link
72
73 DIA.UpwardLink <T DIA.SVGElement
74     L0.HasDescription "This link navigates upward the structural path."
75
76 //// MONITOR
77
78 DIA.Monitor <T DIA.Element
79     L0.HasDescription "Monitors display data from various sources e.g. model configuration or simulation state."
80     >-- DIA.Monitor.gain --> L0.Double <R L0.HasProperty : L0.FunctionalRelation
81         L0.HasLabel "Gain"
82     >-- DIA.Monitor.bias --> L0.Double <R L0.HasProperty : L0.FunctionalRelation
83         L0.HasLabel "Bias"
84     @L0.optionalProperty L0.HasLabel
85     @L0.optionalProperty DIA.HasDirection
86     @L0.optionalProperty DIA.HasFormat
87     @L0.optionalProperty G2D.HasHorizontalAlignment
88     @L0.optionalProperty G2D.HasVerticalAlignment
89     @L0.optionalProperty G2D.HasFont
90     @L0.optionalProperty G2D.HasBounds
91     @L0.optionalProperty DIA.HasMonitorComponent
92     @L0.optionalProperty DIA.HasMonitorSuffix
93     @L0.optionalProperty DIA.TextFieldName
94     // Enable to show these properties to users once MonitorClassFactory2 gets support for gain/bias.
95     //@L0.assert DIA.Monitor.gain 1.0
96     //@L0.assert DIA.Monitor.bias 0.0
97     L0.Asserts _ : L0.Assertion
98       L0.HasPredicate DIA.HasFont
99       L0.HasObject _ : DIA.ObtainedFont
100     L0.Asserts _ : L0.Assertion
101       L0.HasPredicate DIA.HasColor
102       L0.HasObject _ : DIA.ObtainedColor
103     L0.Asserts _ : L0.Assertion
104       L0.HasPredicate DIA.HasFormatter
105       L0.HasObject _ : DIA.ObtainedFormatter
106     L0.Asserts _ : L0.Assertion
107       L0.HasPredicate L0X.HasExpression
108       L0.HasObject _ : DIA.ObtainedMonitorExpression
109     @L0.assert DIA.TextFieldName ""
110     @L0.assert DIA.FixedWidth 0.0
111     @L0.assert G2D.HasHorizontalAlignment G2D.Alignment.Center
112     @L0.assert G2D.HasVerticalAlignment G2D.Alignment.Center
113
114 DIA.HasDirection <R L0.HasProperty
115     L0.HasLabel "Direction"
116     L0.HasDescription "An angular direction in degrees"
117     --> L0.Double
118
119 DIA.SymbolMonitor <T DIA.Element
120     L0.HasDescription "Symbol monitors are embedded configurable monitors in symbols."
121
122 DIA.HasMonitorComponent <R L0.IsWeaklyRelatedTo
123     <-- DIA.Monitor 
124     L0.InverseOf DIA.HasMonitorComponent.Inverse <R L0.IsWeaklyRelatedTo
125         --> DIA.Monitor 
126 DIA.HasMonitorSuffix <R L0.HasProperty
127     --> L0.String
128
129 //// TREND
130
131 DIA.Trend <T DIA.Element
132     L0.HasDescription "Trends display data from various sources e.g. model configuration or simulation state."
133     @L0.optionalProperty L0.HasLabel
134
135 DIA.HasTrendTitle <R L0.HasProperty : L0.FunctionalRelation
136     L0.HasLabel "Title"
137     --> L0.String
138 DIA.HasXAxisLabel <R L0.HasProperty : L0.FunctionalRelation
139     L0.HasLabel "X-Axis Label"
140     --> L0.String
141 DIA.HasYAxisLabel <R L0.HasProperty : L0.FunctionalRelation
142     L0.HasLabel "Y-Axis Label"
143     --> L0.String
144
145 //// SLIDER
146
147 DIA.Slider <T DIA.Element <T DIA.ColorProvider <T DIA.FontProvider <T DIA.FormatProvider
148     L0.HasDescription "Sliders can be used to alter input value."
149     @L0.optionalProperty L0.HasLabel
150     @L0.optionalProperty DIA.HasDirection
151     @L0.optionalProperty DIA.HasFormat
152     @L0.optionalProperty G2D.HasBounds
153
154 DIA.HasSliderComponent <R L0.IsRelatedTo
155 DIA.HasSliderSuffix <R L0.HasProperty : L0.FunctionalRelation
156     L0.HasLabel "Suffix" : L0.String
157     --> L0.String
158 DIA.HasSliderMinValue <R L0.HasProperty : L0.FunctionalRelation
159     L0.HasLabel "Min Value" : L0.String
160     --> L0.Double
161 DIA.HasSliderMaxValue <R L0.HasProperty : L0.FunctionalRelation
162     L0.HasLabel "Max Value" : L0.String
163     --> L0.Double
164 DIA.HasSliderMajorTickSpacing <R L0.HasProperty : L0.FunctionalRelation
165     L0.HasLabel "Major Tick Spacing" : L0.String
166     --> L0.Integer
167 DIA.HasSliderMinorTickSpacing <R L0.HasProperty : L0.FunctionalRelation
168     L0.HasLabel "Minor Tick Spacing" : L0.String
169     --> L0.Integer
170 DIA.SliderPaintLabels <R L0.HasProperty : L0.FunctionalRelation
171     L0.HasLabel "Paint Labels" : L0.String
172     --> L0.Boolean
173 DIA.SliderPaintTicks <R L0.HasProperty : L0.FunctionalRelation
174     L0.HasLabel "Paint Ticks" : L0.String
175     --> L0.Boolean
176 DIA.SliderSnapToTicks <R L0.HasProperty : L0.FunctionalRelation
177     L0.HasLabel "Snap To Ticks" : L0.String
178     --> L0.Boolean
179 DIA.SliderPaintTrack <R L0.HasProperty : L0.FunctionalRelation
180     L0.HasLabel "Paint Track" : L0.String
181     --> L0.Boolean
182 DIA.SliderInverted <R L0.HasProperty : L0.FunctionalRelation
183     L0.HasLabel "Inverted" : L0.String
184     --> L0.Boolean
185 DIA.HasSliderValueExtent <R L0.HasProperty : L0.FunctionalRelation
186     L0.HasLabel "Value Extent" : L0.String
187     --> L0.Integer