]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram.ontology/graph/DiagramStyling.pgraph
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / DiagramStyling.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
6 // Old StyleProvider-styling
7  
8 DIA.StyleProvider <T L0.Entity
9
10 DIA.FontProvider <T DIA.StyleProvider
11     L0.HasDescription """An element inheriting this type tells its font is configurable."""
12     @L0.singleProperty G2D.HasFont
13
14 DIA.ColorProvider <T DIA.StyleProvider
15     L0.HasDescription """An element inheriting this type tells its color is configurable."""
16     @L0.singleProperty G2D.HasColor
17
18 //String formatting for monitors (to be defined later)
19 DIA.FormatProvider <T DIA.StyleProvider
20 //    @L0.singleProperty HasFormat
21
22 DIA.HasPattern <R L0.HasProperty
23     L0.HasDescription "MetricsFormat pattern"
24     L0.HasRange L0.String
25
26 DIA.Format <T L0.Entity
27     @L0.singleProperty DIA.HasPattern
28
29 DIA.HasFormat <R L0.HasProperty
30     L0.HasLabel "Format"
31     L0.HasDescription "Number formatter as input to DoubleFormatter"
32     L0.HasRange DIA.Format
33
34
35 // Monitor styling using realized and obtained properties
36
37 DIA.HasFont <R L0.HasProperty : L0.FunctionalRelation
38 DIA.HasColor <R L0.HasProperty : L0.FunctionalRelation
39 DIA.HasFormatter <R L0.DependsOn : L0.FunctionalRelation
40
41 DIA.ObtainedFont <T L0.Entity
42 DIA.RealizedFont <T L0.Entity
43 DIA.RealizedFont.HasFamily <R L0.HasProperty : L0.FunctionalRelation
44 DIA.RealizedFont.HasSize <R L0.HasProperty : L0.FunctionalRelation
45 DIA.RealizedFont.HasStyle <R L0.HasProperty : L0.FunctionalRelation
46
47 DIA.ObtainedColor <T L0.Entity
48 DIA.RealizedColor <T L0.Entity
49 DIA.RealizedColor.HasRGB <R L0.HasProperty : L0.FunctionalRelation
50
51 DIA.ObtainedFormatter <T L0.Entity
52 DIA.RealizedFormatter <T L0.Entity
53 DIA.RealizedFormatter.HasDefinition <R L0.HasProperty : L0.FunctionalRelation
54   >-- DIA.RealizedFormatter.sortKey --> L0.String <R L0.HasProperty : L0.FunctionalRelation
55
56 DIA.ObtainedMonitorExpression <T L0.Entity
57
58 DIA.MonitorTemplate <T L0.Entity
59 DIA.HasDefaultMonitorTemplate <R L0.DependsOn : L0.FunctionalRelation
60
61 DIA.DefaultMonitorTemplate : DIA.MonitorTemplate
62   L0.HasLabel "Simple"
63   DIA.HasFont _ : DIA.RealizedFont
64     DIA.RealizedFont.HasFamily "Verdana"
65     DIA.RealizedFont.HasSize 8
66     DIA.RealizedFont.HasStyle 0
67   DIA.HasColor _ : DIA.RealizedColor
68     DIA.RealizedColor.HasRGB [0.1, 0.3, 0.0]
69   DIA.HasFormatter DIA.DefaultFormatter
70   L0X.HasExpression """FormattedVariableLabel("")"""
71
72 DIA.DescriptiveMonitorTemplate : DIA.MonitorTemplate
73   L0.HasLabel "Descriptive"
74   DIA.HasFont _ : DIA.RealizedFont
75     DIA.RealizedFont.HasFamily "Verdana"
76     DIA.RealizedFont.HasSize 8
77     DIA.RealizedFont.HasStyle 0
78   DIA.HasColor _ : DIA.RealizedColor
79     DIA.RealizedColor.HasRGB [0.1, 0.3, 0.0]
80   DIA.HasFormatter DIA.DefaultFormatter
81   L0X.HasExpression """#HasDisplayProperty + ' = ' + FormattedVariableLabel("") + ' ' + #HasDisplayUnit"""
82
83 DIA.Formatter0: DIA.RealizedFormatter
84   L0.HasLabel "No Decimals"
85   DIA.RealizedFormatter.sortKey "0"
86   DIA.RealizedFormatter.HasDefinition "0"
87
88 DIA.Formatter1: DIA.RealizedFormatter
89   L0.HasLabel "1 Decimals"
90   DIA.RealizedFormatter.sortKey "1"
91   DIA.RealizedFormatter.HasDefinition "0.0"
92
93 DIA.DefaultFormatter : DIA.RealizedFormatter
94   L0.HasLabel "2 Decimals"
95   DIA.RealizedFormatter.sortKey "2"
96   DIA.RealizedFormatter.HasDefinition "0.00"
97
98 DIA.Formatter3: DIA.RealizedFormatter
99   L0.HasLabel "3 Decimals"
100   DIA.RealizedFormatter.sortKey "3"
101   DIA.RealizedFormatter.HasDefinition "0.000"
102
103 DIA.Formatter5: DIA.RealizedFormatter
104   L0.HasLabel "5 Decimals"
105   DIA.RealizedFormatter.sortKey "5"
106   DIA.RealizedFormatter.HasDefinition "0.00000"
107
108 DIA.Formatter15: DIA.RealizedFormatter
109   L0.HasLabel "Up To 15 Decimals"
110   DIA.RealizedFormatter.sortKey "15"
111   DIA.RealizedFormatter.HasDefinition "0.###############"
112   
113 DIA.FormatterScientific : DIA.RealizedFormatter
114   L0.HasLabel "Scientific"
115   DIA.RealizedFormatter.sortKey "100-scientific"
116   DIA.RealizedFormatter.HasDefinition "0.###E0"
117
118 DIA.FormatterEngineering : DIA.RealizedFormatter
119   L0.HasLabel "Engineering"
120   DIA.RealizedFormatter.sortKey "50-engineering"
121   DIA.RealizedFormatter.HasDefinition "##0.###E0"
122
123 DIA.RGB <T L0.DoubleArray