]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.swt.ontology/graph/Components.pgraph
Merge "Revert "Support enumerated property types in UC interface""
[simantics/platform.git] / bundles / org.simantics.document.swt.ontology / graph / Components.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 DOC = <http://www.simantics.org/Documentation-1.2>
3 SWT = <http://www.simantics.org/SWT-1.0>
4 DATA = <http://www.simantics.org/Datatypes-1.1>
5 PROPERTIES = <http://www.simantics.org/SWT-1.0/Properties>
6 LITERALS = <http://www.simantics.org/SWT-1.0/Literals>
7 FUNCTIONS = <http://www.simantics.org/SWT-1.0/Functions>
8 STR = <http://www.simantics.org/Structural-1.2>
9
10 SWT.connect : L0.Template
11     @template %parent %relation %connection %child  
12         %parent
13             %relation %connection 
14         %child
15             DOC.Relations.parent %connection
16         %connection : STR.Connection
17         
18 SWT.defAttribute : L0.Template
19     @template %subject %range %valueType
20         %subject <R L0.HasProperty : PROPERTIES.ParameterType : DOC.Document.AttributeRelation : L0.FunctionalRelation
21             L0.HasRange %range
22             L0.RequiresValueType %valueType
23
24 attribute = COMPONENTS.attribute : L0.Template
25     @template %subject %relation %default
26         %subject
27             L0.Asserts _ : L0.Assertion
28                 L0.HasPredicate %relation
29                 L0.HasObject %default
30                 L0.default false
31
32 COMPONENTS = SWT.Components : L0.Library
33
34 COMPONENTS.Component <T DOC.Components.PrimitiveComponent
35
36   >-- COMPONENTS.Component.background
37     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
38   >-- COMPONENTS.Component.foreground
39     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
40   >-- COMPONENTS.Component.font
41     @SWT.defAttribute DATA.Font "(String,Integer,String)"
42   >-- COMPONENTS.Component.multiLine
43     @SWT.defAttribute L0.Value "Boolean"
44   >-- COMPONENTS.Component.VScroll
45     @SWT.defAttribute L0.Value "Boolean"
46   >-- COMPONENTS.Component.HScroll
47     @SWT.defAttribute L0.Value "Boolean"
48   >-- COMPONENTS.Component.NoScroll
49     @SWT.defAttribute L0.Value "Boolean"
50   >-- COMPONENTS.Component.Check
51     @SWT.defAttribute L0.Value "Boolean"
52   >-- COMPONENTS.Component.alignment
53     @SWT.defAttribute L0.Value "String"
54         
55   @attribute COMPONENTS.Component.background
56     (255,255,255) : DATA.RGB.Integer 
57   @attribute COMPONENTS.Component.foreground
58     (0,0,0) : DATA.RGB.Integer 
59   @attribute COMPONENTS.Component.font
60     ("Arial",10,"Normal") : DATA.Font 
61   @attribute COMPONENTS.Component.alignment "left"
62
63 COMPONENTS.GridComposite <T COMPONENTS.Component
64
65   >-- COMPONENTS.GridComposite.extendedMargins
66     @SWT.defAttribute LITERALS.Margins "(Integer,Integer,Integer,Integer)"
67   >-- COMPONENTS.GridComposite.numColumns
68     @SWT.defAttribute L0.Value "Integer"
69
70   @attribute COMPONENTS.GridComposite.extendedMargins
71     (0, 0, 0, 0) : LITERALS.Margins
72   @attribute COMPONENTS.GridComposite.numColumns
73     1 : L0.Integer
74
75 SWT.gridComposite : L0.Template
76     @template %instance %numColumns
77         %instance : COMPONENTS.GridComposite
78             COMPONENTS.GridComposite.numColumns %numColumns 
79
80 COMPONENTS.ScrolledComposite <T COMPONENTS.Component
81
82 SWT.scrolledComposite : L0.Template
83     @template %instance
84         %instance : COMPONENTS.ScrolledComposite 
85
86 COMPONENTS.GridCell <T COMPONENTS.Component
87
88   >-- COMPONENTS.GridCell.grabVertical
89     @SWT.defAttribute L0.Value "Boolean"
90   >-- COMPONENTS.GridCell.grabHorizontal
91     @SWT.defAttribute L0.Value "Boolean"
92   >-- COMPONENTS.GridCell.span
93     @SWT.defAttribute L0.Value "Integer"
94
95   @attribute COMPONENTS.GridCell.grabVertical
96     false
97   @attribute COMPONENTS.GridCell.grabHorizontal
98     false
99   @attribute COMPONENTS.GridCell.span
100     1
101
102 SWT.gridCell : L0.Template
103     @template %instance %connection %grabHorizontal %grabVertical %span %child
104         %instance : COMPONENTS.GridCell
105             COMPONENTS.GridCell.grabVertical %grabVertical 
106             COMPONENTS.GridCell.grabHorizontal %grabHorizontal 
107             COMPONENTS.GridCell.span %span 
108         %instance
109             DOC.Relations.part1 %connection 
110         %child
111             DOC.Relations.parent %connection
112         %connection : STR.Connection
113
114 COMPONENTS.Label <T COMPONENTS.Component
115
116   >-- COMPONENTS.Label.text
117     @SWT.defAttribute L0.Value "String"
118
119   @attribute COMPONENTS.Label.text
120     ""
121
122 SWT.label : L0.Template
123     @template %instance %text
124         %instance : COMPONENTS.Label
125             COMPONENTS.Label.text %text 
126     
127 COMPONENTS.Button <T COMPONENTS.Component
128
129   >-- COMPONENTS.Button.text
130     @SWT.defAttribute L0.Value "String"
131   >-- COMPONENTS.Button.onPress
132     @SWT.defAttribute L0.Value "AbstractEventHandler"
133
134   @attribute COMPONENTS.Button.text
135     ""
136
137 SWT.button : L0.Template
138     @template %instance %caption
139         %instance : COMPONENTS.Button
140             COMPONENTS.Button.text %caption 
141
142 COMPONENTS.TrackedText <T COMPONENTS.Component
143
144   >-- COMPONENTS.TrackedText.text
145     @SWT.defAttribute L0.Value "String"
146   >-- COMPONENTS.TrackedText.invalidBackground 
147     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
148   >-- COMPONENTS.TrackedText.inactiveBackground 
149     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
150   >-- COMPONENTS.TrackedText.hoverBackground 
151     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
152   >-- COMPONENTS.TrackedText.editingBackground 
153     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
154   >-- COMPONENTS.TrackedText.onModify 
155     @SWT.defAttribute L0.Value "AbstractEventHandler"
156   >-- COMPONENTS.TrackedText.validator
157     @SWT.defAttribute L0.Value "StringInputValidator"
158
159   @attribute COMPONENTS.TrackedText.text
160     ""
161   @attribute COMPONENTS.TrackedText.invalidBackground
162     (255,128,128) : DATA.RGB.Integer
163   @attribute COMPONENTS.TrackedText.inactiveBackground
164     (245,246,190) : DATA.RGB.Integer
165   @attribute COMPONENTS.TrackedText.hoverBackground
166     (254,255,197) : DATA.RGB.Integer
167   @attribute COMPONENTS.TrackedText.editingBackground
168     (255,255,255) : DATA.RGB.Integer
169
170 SWT.trackedText : L0.Template
171     @template %instance %text %onModify
172         %instance : COMPONENTS.TrackedText
173             COMPONENTS.TrackedText.text %text
174             COMPONENTS.TrackedText.onModify %onModify 
175
176
177 COMPONENTS.Explorer <T COMPONENTS.Component
178
179   >-- COMPONENTS.Explorer.browseContext
180     @SWT.defAttribute L0.Value "String"
181   >-- COMPONENTS.Explorer.displayFilter
182     @SWT.defAttribute L0.Value "Boolean"
183   >-- COMPONENTS.Explorer.displayHeader
184     @SWT.defAttribute L0.Value "Boolean"
185   >-- COMPONENTS.Explorer.contextMenuId
186     @SWT.defAttribute L0.Value "String"
187   >-- COMPONENTS.Explorer.explorerInput
188     @SWT.defAttribute L0.Value "Variable"
189   >-- COMPONENTS.Explorer.columns
190     @SWT.defAttribute LITERALS.Columns "Columns"
191   >-- COMPONENTS.Explorer.editingColumn
192     @SWT.defAttribute L0.Value "String"
193   >-- COMPONENTS.Explorer.dragSourceListenerFactory
194     @SWT.defAttribute L0.Value "DragSourceListenerFactory"
195   >-- COMPONENTS.Explorer.onCheck
196     @SWT.defAttribute L0.Value "AbstractEventHandler"
197
198   @attribute COMPONENTS.Explorer.browseContext
199     ""
200   @attribute COMPONENTS.Explorer.displayFilter
201     false
202   @attribute COMPONENTS.Explorer.displayHeader
203     false
204   @attribute COMPONENTS.Explorer.explorerInput
205     FUNCTIONS.explorerInput
206
207 SWT.explorer : L0.Template
208     @template %instance %displayFilter %displayHeader %browseContext %contextMenuId %columns
209         %instance : COMPONENTS.Explorer
210             COMPONENTS.Explorer.displayFilter %displayFilter 
211             COMPONENTS.Explorer.displayHeader %displayHeader 
212             COMPONENTS.Explorer.browseContext %browseContext 
213             COMPONENTS.Explorer.contextMenuId %contextMenuId 
214             COMPONENTS.Explorer.columns %columns
215             COMPONENTS.Explorer.explorerInput FUNCTIONS.explorerInput  
216                 
217 COMPONENTS.Combo <T COMPONENTS.Component
218   >-- COMPONENTS.Combo.available
219     @SWT.defAttribute L0.Value "[String]"
220   >-- COMPONENTS.Combo.selected
221     @SWT.defAttribute L0.Value "String"
222   >-- COMPONENTS.Combo.onModify 
223     @SWT.defAttribute L0.Value "AbstractEventHandler"
224
225 SWT.combo : L0.Template
226     @template %instance %available %selected %onModify
227         %instance : COMPONENTS.Combo
228             COMPONENTS.Combo.available %available 
229             COMPONENTS.Combo.selected %selected 
230             COMPONENTS.Combo.onModify %onModify 
231     
232 COMPONENTS.Browser <T SWT.Components.Component
233   >-- COMPONENTS.Browser.url
234     @SWT.defAttribute L0.Value "String"    
235
236 COMPONENTS.SCLTextEditor <T SWT.Components.Component
237   >-- COMPONENTS.SCLTextEditor.textAndErrors
238     @SWT.defAttribute L0.Value "TextAndErrors"    
239   >-- COMPONENTS.SCLTextEditor.onModify 
240     @SWT.defAttribute L0.Value "AbstractEventHandler"
241
242 SWT.sclTextEditor : L0.Template
243     @template %instance %textAndErrors %onModify
244         %instance : COMPONENTS.SCLTextEditor
245             COMPONENTS.SCLTextEditor.textAndErrors %textAndErrors
246             COMPONENTS.SCLTextEditor.onModify %onModify 
247
248