]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.swt.ontology/graph/Components.pgraph
edc7381d5d2133ad138277896ea134718b39e77f
[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.alignment
51     @SWT.defAttribute L0.Value "String"
52         
53   @attribute COMPONENTS.Component.background
54     (255,255,255) : DATA.RGB.Integer 
55   @attribute COMPONENTS.Component.foreground
56     (0,0,0) : DATA.RGB.Integer 
57   @attribute COMPONENTS.Component.font
58     ("Arial",10,"Normal") : DATA.Font 
59   @attribute COMPONENTS.Component.alignment "left"
60
61 COMPONENTS.GridComposite <T COMPONENTS.Component
62
63   >-- COMPONENTS.GridComposite.extendedMargins
64     @SWT.defAttribute LITERALS.Margins "(Integer,Integer,Integer,Integer)"
65   >-- COMPONENTS.GridComposite.numColumns
66     @SWT.defAttribute L0.Value "Integer"
67
68   @attribute COMPONENTS.GridComposite.extendedMargins
69     (0, 0, 0, 0) : LITERALS.Margins
70   @attribute COMPONENTS.GridComposite.numColumns
71     1 : L0.Integer
72
73 SWT.gridComposite : L0.Template
74     @template %instance %numColumns
75         %instance : COMPONENTS.GridComposite
76             COMPONENTS.GridComposite.numColumns %numColumns 
77
78 COMPONENTS.ScrolledComposite <T COMPONENTS.Component
79
80 SWT.scrolledComposite : L0.Template
81     @template %instance
82         %instance : COMPONENTS.ScrolledComposite 
83
84 COMPONENTS.GridCell <T COMPONENTS.Component
85
86   >-- COMPONENTS.GridCell.grabVertical
87     @SWT.defAttribute L0.Value "Boolean"
88   >-- COMPONENTS.GridCell.grabHorizontal
89     @SWT.defAttribute L0.Value "Boolean"
90   >-- COMPONENTS.GridCell.span
91     @SWT.defAttribute L0.Value "Integer"
92
93   @attribute COMPONENTS.GridCell.grabVertical
94     false
95   @attribute COMPONENTS.GridCell.grabHorizontal
96     false
97   @attribute COMPONENTS.GridCell.span
98     1
99
100 SWT.gridCell : L0.Template
101     @template %instance %connection %grabHorizontal %grabVertical %span %child
102         %instance : COMPONENTS.GridCell
103             COMPONENTS.GridCell.grabVertical %grabVertical 
104             COMPONENTS.GridCell.grabHorizontal %grabHorizontal 
105             COMPONENTS.GridCell.span %span 
106         %instance
107             DOC.Relations.part1 %connection 
108         %child
109             DOC.Relations.parent %connection
110         %connection : STR.Connection
111
112 COMPONENTS.Label <T COMPONENTS.Component
113
114   >-- COMPONENTS.Label.text
115     @SWT.defAttribute L0.Value "String"
116
117   @attribute COMPONENTS.Label.text
118     ""
119
120 SWT.label : L0.Template
121     @template %instance %text
122         %instance : COMPONENTS.Label
123             COMPONENTS.Label.text %text 
124     
125 COMPONENTS.Button <T COMPONENTS.Component
126
127   >-- COMPONENTS.Button.text
128     @SWT.defAttribute L0.Value "String"
129   >-- COMPONENTS.Button.onPress
130     @SWT.defAttribute L0.Value "EventHandler"
131
132   @attribute COMPONENTS.Button.text
133     ""
134
135 SWT.button : L0.Template
136     @template %instance %caption
137         %instance : COMPONENTS.Button
138             COMPONENTS.Button.text %caption 
139
140 COMPONENTS.TrackedText <T COMPONENTS.Component
141
142   >-- COMPONENTS.TrackedText.text
143     @SWT.defAttribute L0.Value "String"
144   >-- COMPONENTS.TrackedText.invalidBackground 
145     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
146   >-- COMPONENTS.TrackedText.inactiveBackground 
147     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
148   >-- COMPONENTS.TrackedText.hoverBackground 
149     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
150   >-- COMPONENTS.TrackedText.editingBackground 
151     @SWT.defAttribute DATA.RGB.Integer "(Integer,Integer,Integer)"
152   >-- COMPONENTS.TrackedText.onModify 
153     @SWT.defAttribute L0.Value "AbstractEventHandler"
154   >-- COMPONENTS.TrackedText.validator
155     @SWT.defAttribute L0.Value "StringInputValidator"
156
157   @attribute COMPONENTS.TrackedText.text
158     ""
159   @attribute COMPONENTS.TrackedText.invalidBackground
160     (255,128,128) : DATA.RGB.Integer
161   @attribute COMPONENTS.TrackedText.inactiveBackground
162     (245,246,190) : DATA.RGB.Integer
163   @attribute COMPONENTS.TrackedText.hoverBackground
164     (254,255,197) : DATA.RGB.Integer
165   @attribute COMPONENTS.TrackedText.editingBackground
166     (255,255,255) : DATA.RGB.Integer
167
168 SWT.trackedText : L0.Template
169     @template %instance %text %onModify
170         %instance : COMPONENTS.TrackedText
171             COMPONENTS.TrackedText.text %text
172             COMPONENTS.TrackedText.onModify %onModify 
173
174
175 COMPONENTS.Explorer <T COMPONENTS.Component
176
177   >-- COMPONENTS.Explorer.browseContext
178     @SWT.defAttribute L0.Value "String"
179   >-- COMPONENTS.Explorer.displayFilter
180     @SWT.defAttribute L0.Value "Boolean"
181   >-- COMPONENTS.Explorer.displayHeader
182     @SWT.defAttribute L0.Value "Boolean"
183   >-- COMPONENTS.Explorer.contextMenuId
184     @SWT.defAttribute L0.Value "String"
185   >-- COMPONENTS.Explorer.explorerInput
186     @SWT.defAttribute L0.Value "Variable"
187   >-- COMPONENTS.Explorer.columns
188     @SWT.defAttribute LITERALS.Columns "Columns"
189   >-- COMPONENTS.Explorer.editingColumn
190     @SWT.defAttribute L0.Value "String"
191   >-- COMPONENTS.Explorer.dragSourceListenerFactory
192     @SWT.defAttribute L0.Value "DragSourceListenerFactory"
193
194   @attribute COMPONENTS.Explorer.browseContext
195     ""
196   @attribute COMPONENTS.Explorer.displayFilter
197     false
198   @attribute COMPONENTS.Explorer.displayHeader
199     false
200   @attribute COMPONENTS.Explorer.explorerInput
201     FUNCTIONS.explorerInput
202
203 SWT.explorer : L0.Template
204     @template %instance %displayFilter %displayHeader %browseContext %contextMenuId %columns
205         %instance : COMPONENTS.Explorer
206             COMPONENTS.Explorer.displayFilter %displayFilter 
207             COMPONENTS.Explorer.displayHeader %displayHeader 
208             COMPONENTS.Explorer.browseContext %browseContext 
209             COMPONENTS.Explorer.contextMenuId %contextMenuId 
210             COMPONENTS.Explorer.columns %columns 
211                 
212 COMPONENTS.Combo <T COMPONENTS.Component
213   >-- COMPONENTS.Combo.available
214     @SWT.defAttribute L0.Value "[String]"
215   >-- COMPONENTS.Combo.selected
216     @SWT.defAttribute L0.Value "String"
217   >-- COMPONENTS.Combo.onModify 
218     @SWT.defAttribute L0.Value "AbstractEventHandler"
219
220 SWT.combo : L0.Template
221     @template %instance %available %selected %onModify
222         %instance : COMPONENTS.Combo
223             COMPONENTS.Combo.available %available 
224             COMPONENTS.Combo.selected %selected 
225             COMPONENTS.Combo.onModify %onModify 
226     
227 COMPONENTS.Browser <T SWT.Components.Component
228   >-- COMPONENTS.Browser.url
229     @SWT.defAttribute L0.Value "String"    
230
231 COMPONENTS.SCLTextEditor <T SWT.Components.Component
232   >-- COMPONENTS.SCLTextEditor.textAndErrors
233     @SWT.defAttribute L0.Value "TextAndErrors"    
234   >-- COMPONENTS.SCLTextEditor.onModify 
235     @SWT.defAttribute L0.Value "AbstractEventHandler"
236
237 SWT.sclTextEditor : L0.Template
238     @template %instance %textAndErrors %onModify
239         %instance : COMPONENTS.SCLTextEditor
240             COMPONENTS.SCLTextEditor.textAndErrors %textAndErrors
241             COMPONENTS.SCLTextEditor.onModify %onModify 
242
243