]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.template2d.ontology/graph/DrawingTemplate.pgraph
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.template2d.ontology / graph / DrawingTemplate.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 STR = <http://www.simantics.org/Structural-1.2>
4 DIA = <http://www.simantics.org/Diagram-2.2>
5 MOD = <http://www.simantics.org/Modeling-1.2>
6 TEMPLATE2D = <http://www.simantics.org/ModelingTemplate2d-1.0>
7 ACT = <http://www.simantics.org/Action-1.1>
8 G2D = <http://www.simantics.org/G2D-1.1>
9 SEL = <http://www.simantics.org/SelectionView-1.2>
10 SG = <http://www.simantics.org/Scenegraph-1.1>
11 VIEW = <http://www.simantics.org/Views-1.2>
12 DATA = <http://www.simantics.org/Datatypes-1.1>
13
14 TEMPLATE2D.DrawingTemplateLibrary <T L0.Library
15
16 TEMPLATE2D.HasDrawingTemplateRoot <R L0.DependsOn : L0.FunctionalRelation
17     --> L0.Library
18
19 TEMPLATE2D.HasDrawingTemplate <R L0.DependsOn : L0.FunctionalRelation
20     --> TEMPLATE2D.DrawingTemplate
21
22 TEMPLATE2D.DiagramTemplates : TEMPLATE2D.DrawingTemplateLibrary : TEMPLATE2D.DrawingTemplateLibraryUI
23     @L0.tag L0.Deprecated
24     L0.HasLabel "Diagram Templates"
25
26 TEMPLATE2D.FlagTable.Column <T DIA.Scenegraph.Composite
27     >-- TEMPLATE2D.FlagTable.Column.HasWeight --> L0.Float <R L0.HasProperty : SEL.GenericParameterType
28         L0.HasLabel "weight"
29     @L0.assert TEMPLATE2D.FlagTable.Column.HasWeight
30         30.0 : L0.Float
31 //    >-- TEMPLATE2D.FlagTable.Column.horizontalAlignment --> TEMPLATE2D.FlagTable.Alignment <R L0.IsRelatedTo : SEL.GenericParameterType
32 //        L0.HasLabel "Horizontal Alignment"
33 //    @L0.assert TEMPLATE2D.FlagTable.Column.horizontalAlignment
34 //        TEMPLATE2D.FlagTable.Alignment.Left
35 //    >-- TEMPLATE2D.FlagTable.Column.verticalAlignment --> TEMPLATE2D.FlagTable.Alignment <R L0.IsRelatedTo : SEL.GenericParameterType
36 //        L0.HasLabel "Vertical Alignment"
37 //    @L0.assert TEMPLATE2D.FlagTable.Column.verticalAlignment
38 //        TEMPLATE2D.FlagTable.Alignment.Left
39
40 TEMPLATE2D.FlagTable.Column.Data <T DIA.Scenegraph.Monitor
41 TEMPLATE2D.FlagTable.Column.Header <T DIA.Scenegraph.Monitor
42
43 TEMPLATE2D.FlagTable.RowNumberColumn <T TEMPLATE2D.FlagTable.Column
44     >-- TEMPLATE2D.FlagTable.RowNumberColumn.start --> L0.Integer <R L0.HasProperty : SEL.GenericParameterType
45         L0.HasLabel "Starting Number"
46     @L0.assert TEMPLATE2D.FlagTable.RowNumberColumn.start
47         1 : L0.Integer
48
49 TEMPLATE2D.FlagTable.Alignment <T L0.Value
50     @L0.tag L0.Enumeration
51
52 TEMPLATE2D.FlagTable.Alignment.Left : TEMPLATE2D.FlagTable.Alignment
53     L0.HasLabel "Left"
54 TEMPLATE2D.FlagTable.Alignment.Right : TEMPLATE2D.FlagTable.Alignment
55     L0.HasLabel "Right"
56
57 TEMPLATE2D.FlagTypeVisual <T DIA.Scenegraph.Composite
58 //  >-- TEMPLATE2D.FlagTypeVisual.filters --> L0.Value <R L0.HasProperty : L0.FunctionalRelation
59 //    L0.RequiresValueType "[Resource]"
60
61 TEMPLATE2D.FlagTypeVisual.Filter <T L0.Entity
62     >-- TEMPLATE2D.FlagTypeVisual.Filter.HasProperty --> L0.String <R L0.HasProperty : SEL.GenericParameterType
63         L0.HasLabel "reference"
64     >-- TEMPLATE2D.FlagTypeVisual.Filter.HasPattern --> L0.String <R L0.HasProperty : SEL.GenericParameterType
65         L0.HasLabel "pattern"
66     >-- TEMPLATE2D.FlagTypeVisual.Filter.matchRequired--> L0.Boolean <R L0.HasProperty : SEL.GenericParameterType
67         L0.HasLabel "match required"
68     @L0.assert TEMPLATE2D.FlagTypeVisual.Filter.HasProperty
69         "" : L0.String
70     @L0.assert TEMPLATE2D.FlagTypeVisual.Filter.HasPattern
71         ".*" : L0.String
72     @L0.assert TEMPLATE2D.FlagTypeVisual.Filter.matchRequired
73         true : L0.Boolean
74
75 TEMPLATE2D.FlagTable <T DIA.Scenegraph.Composite
76     >-- TEMPLATE2D.FlagTable.HasAlignment --> TEMPLATE2D.FlagTable.Alignment <R L0.HasProperty : SEL.GenericParameterType
77         L0.HasLabel "alignment"
78     >-- TEMPLATE2D.FlagTable.HasWidth --> L0.Float <R L0.HasProperty : SEL.GenericParameterType
79         L0.HasLabel "width"
80     >-- TEMPLATE2D.FlagTable.HasRowCount --> L0.Integer <R L0.HasProperty : SEL.GenericParameterType
81         L0.HasLabel "row count"
82     >-- TEMPLATE2D.FlagTable.HasRowHeigth --> L0.Float <R L0.HasProperty : SEL.GenericParameterType
83         L0.HasLabel "row height"
84     @L0.assert TEMPLATE2D.FlagTable.HasAlignment
85         TEMPLATE2D.FlagTable.Alignment.Left
86     @L0.assert TEMPLATE2D.FlagTable.HasRowCount
87         10 : L0.Integer
88     @L0.assert TEMPLATE2D.FlagTable.HasRowHeigth
89         10.0 : L0.Float
90     @L0.assert TEMPLATE2D.FlagTable.HasWidth
91         80.0 : L0.Float
92 //    >-- TEMPLATE2D.FlagTable.HasRowOffset --> L0.Integer <R L0.HasProperty : SEL.GenericParameterType
93 //        L0.HasLabel "row offset"
94 //    @L0.assert TEMPLATE2D.FlagTable.HasRowOffset
95 //        1 : L0.Integer
96
97
98 TEMPLATE2D.DrawingTemplate <T L0.Entity : MOD.TypeWithChangeInformation 
99     @L0.assert TEMPLATE2D.HasPage 
100         _ : TEMPLATE2D.Page 
101     @L0.assert TEMPLATE2D.HasPageOrientation TEMPLATE2D.PageOrientation.Landscape
102     @L0.assert TEMPLATE2D.HasMargin
103         [20.0, 20.0, 20.0, 20.0] : L0.FloatArray
104     @L0.assert TEMPLATE2D.HasBorder
105         _ : TEMPLATE2D.Border : TEMPLATE2D.BrowseNode
106             TEMPLATE2D.HasSize [1.0, 1.0, 1.0, 1.0] : L0.FloatArray
107             G2D.HasColor [0.0, 0.0, 0.0, 1.0] : G2D.Color
108     @L0.assert TEMPLATE2D.HasPadding
109         [10.0] : L0.FloatArray
110
111 TEMPLATE2D.HasScenegraph <R L0.DependsOn : L0.FunctionalRelation
112
113 // If there is only one value, it applies to all sides.
114 // If there are two values, the top and bottom margins are set to the first value and the right and left margins are set to the second.
115 // If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third.
116 // If there are four values, they apply to the top, right, bottom, and left, respectively.
117 TEMPLATE2D.HasMargin <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
118     --> L0.FloatArray
119
120 TEMPLATE2D.HasBorder <R L0.Relation : L0.FunctionalRelation
121     --> TEMPLATE2D.Border
122
123 TEMPLATE2D.HasPadding <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
124     --> L0.FloatArray
125
126 // two dimensional array (width, height)
127 TEMPLATE2D.HasSize <R L0.HasProperty : L0.FunctionalRelation
128     --> L0.FloatArray
129
130 TEMPLATE2D.HasSize2 <R L0.HasProperty : L0.FunctionalRelation
131     --> TEMPLATE2D.Size
132
133 TEMPLATE2D.Size <T L0.Literal
134     @L0.assert L0.HasDataType ${
135         width : Float,
136         heigth : Float}
137
138 TEMPLATE2D.HasOffset <R L0.HasProperty : L0.FunctionalRelation
139     --> L0.FloatArray
140
141 TEMPLATE2D.HasPage <R L0.Relation : L0.FunctionalRelation
142     --> TEMPLATE2D.Page
143
144 TEMPLATE2D.HasVerticalAlign <R L0.IsRelatedTo : L0.FunctionalRelation
145     --> TEMPLATE2D.Alignment
146
147 TEMPLATE2D.HasHorizontalAlign <R L0.IsRelatedTo : L0.FunctionalRelation
148     --> TEMPLATE2D.Alignment
149
150 TEMPLATE2D.HasPageOrientation <R L0.HasProperty : SEL.GenericParameterType
151     --> TEMPLATE2D.PageOrientation
152     L0.HasLabel "orientation"
153
154 TEMPLATE2D.Page <T L0.Entity
155     @L0.assert TEMPLATE2D.HasSize
156         [420.0, 297.0] : L0.FloatArray
157
158 // Note! Use r, g, b and alpha values from 0.0 to 1.0
159 TEMPLATE2D.Border <T L0.Entity
160     @L0.assert TEMPLATE2D.HasSize
161         [1.0, 1.0, 1.0, 1.0] : L0.FloatArray
162     @L0.assert G2D.HasColor
163         [0.0, 0.0, 0.0, 1.0] : G2D.Color
164
165 TEMPLATE2D.Page.A4 : TEMPLATE2D.Page
166     TEMPLATE2D.HasSize [297.0, 210.0] : L0.FloatArray
167
168 TEMPLATE2D.Page.A3 : TEMPLATE2D.Page
169     TEMPLATE2D.HasSize [420.0, 297.0] : L0.FloatArray
170
171 TEMPLATE2D.Page.A2 : TEMPLATE2D.Page
172     TEMPLATE2D.HasSize [594.0, 420.0] : L0.FloatArray
173
174 TEMPLATE2D.Page.A1 : TEMPLATE2D.Page
175     TEMPLATE2D.HasSize [841.0, 594.0] : L0.FloatArray
176
177 TEMPLATE2D.Page.A0 : TEMPLATE2D.Page
178     TEMPLATE2D.HasSize [1189.0, 841.0] : L0.FloatArray
179
180
181 TEMPLATE2D.PageOrientation <T L0.Value
182     @L0.tag L0.Enumeration
183
184 TEMPLATE2D.PageOrientation.Portrait : TEMPLATE2D.PageOrientation
185 TEMPLATE2D.PageOrientation.Landscape : TEMPLATE2D.PageOrientation
186
187 TEMPLATE2D.Alignment <T L0.Property
188     @L0.tag L0.Enumeration
189
190 TEMPLATE2D.Alignment.Top : TEMPLATE2D.Alignment : TEMPLATE2D.BrowseNode
191 TEMPLATE2D.Alignment.Middle : TEMPLATE2D.Alignment : TEMPLATE2D.BrowseNode
192 TEMPLATE2D.Alignment.Bottom : TEMPLATE2D.Alignment : TEMPLATE2D.BrowseNode
193 TEMPLATE2D.Alignment.Left : TEMPLATE2D.Alignment : TEMPLATE2D.BrowseNode
194 TEMPLATE2D.Alignment.Right : TEMPLATE2D.Alignment : TEMPLATE2D.BrowseNode
195
196 /*
197 TEMPLATE2D.DrawingTemplate.A4 <T TEMPLATE2D.DrawingTemplate
198   @L0.assert TEMPLATE2D.HasScenegraph 
199     TEMPLATE2D.DrawingTemplate.A4.SG : TEMPLATE2D.DrawingTemplate.A4.Scenegraph 
200
201 TEMPLATE2D.DrawingTemplate.A4.Scenegraph <T DIA.Scenegraph.Composite
202    @L0.assert SG.Node.children
203      _ : L0.List
204        @L0.list
205          _ : DIA.Scenegraph.Monitor
206            DIA.Scenegraph.Monitor.reference "#HasLabel"
207            DIA.Scenegraph.AbstractText.width 0.0 : L0.Float
208            DIA.Scenegraph.AbstractText.horizontalAlignment 0 : L0.Byte
209            DIA.Scenegraph.AbstractText.color (255,0,0) : DATA.RGB.Integer
210            DIA.Scenegraph.AbstractText.font ("Arial",7,"Bold") : DATA.Font
211            DIA.Scenegraph.AbstractText.transform [1.0, 0.0, 0.0, 1.0, 220.0, 209.0] : G2D.Transform
212 */