]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.ui.ontology/graph/DocumentUI.pgraph
Make Write-interfaces as @FunctionalInterface for lambdas
[simantics/platform.git] / bundles / org.simantics.document.ui.ontology / graph / DocumentUI.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 VIEWS = <http://www.simantics.org/Views-1.2>
3 SG = <http://www.simantics.org/Scenegraph-1.1>
4 DOC = <http://www.simantics.org/Document-1.2>
5 ACT = <http://www.simantics.org/Action-1.1>
6 VP = <http://www.simantics.org/Viewpoint-1.2>
7 MOD = <http://www.simantics.org/Modeling-1.2>
8 SIMU = <http://www.simantics.org/Simulation-1.1>
9 SEL = <http://www.simantics.org/SelectionView-1.2>
10 SILK = <http://www.simantics.org/Silk-1.1>
11 DATA = <http://www.simantics.org/Datatypes-1.1>
12
13 UI = <http://www.simantics.org/DocumentUI-1.1> : L0.Ontology
14     @L0.new
15     L0.HasResourceClass "org.simantics.document.ui.DocumentUIResource"
16
17 UI.Functions : L0.Library
18 UI.Functions.editorLoaded : L0.Function
19
20 UI.CSSEditorContribution
21     L0.HasLabel "Wiki Style Editor"
22     @MOD.editorContribution "org.simantics.document.ui.csseditor"
23         -1 : L0.Integer
24         SILK.css
25         "\r -> isInstanceOf r L0.IndexRoot"
26
27 UI.WikitextContribution : SEL.VariableTabContribution
28     SEL.VariableTabContribution.HasTest UI.Functions.isWikitext : L0.Function
29     SEL.VariableTabContribution.HasView UI.WikitextContribution.View
30     SEL.VariableTabContribution.HasPriority 1
31     L0.HasLabel "Wiki"
32
33 UI.WikitextContribution.View : VIEWS.Composite
34   VIEWS.Control.layoutData
35     _ : VIEWS.GridLayout.GridData
36       VIEWS.GridLayout.GridData.horizontalGrab true
37       VIEWS.GridLayout.GridData.verticalGrab true
38   VIEWS.Composite.layout _ : VIEWS.GridLayout 
39   SG.Node.children _ : L0.List
40     @L0.list
41       _ : VIEWS.Composite
42         VIEWS.Composite.layout _ : VIEWS.RowLayout
43           //VIEWS.RowLayout.type VIEWS.Control.Style.Constant.Horizontal
44           //VIEWS.RowLayout.spacing 0
45           //VIEWS.RowLayout.justify true
46           //VIEWS.RowLayout.pack true
47           //VIEWS.RowLayout.wrap true
48         VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
49           VIEWS.GridLayout.GridData.horizontalGrab true
50         SG.Node.children _ : L0.List
51           @L0.list
52             _ : VIEWS.Button
53               @VIEWS.Control.style1 VIEWS.Control.Style.Constant.NoFocus
54               VIEWS.Button.tooltip "Makes selection bold or inserts some bold text at cursor"
55               VIEWS.Button.modifier UI.Functions.boldModifier : L0.Function
56               VIEWS.Button.image SILK.text_bold
57               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
58             _ : VIEWS.Button
59               VIEWS.Button.tooltip "Makes selection italic or inserts some italic text at cursor"
60               VIEWS.Button.modifier UI.Functions.italicModifier : L0.Function
61               VIEWS.Button.image SILK.text_italic
62               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
63             _ : VIEWS.Button
64               VIEWS.Button.tooltip "Makes selection strikethrough or inserts some strikethrough text at cursor"
65               VIEWS.Button.modifier UI.Functions.strikethroughModifier : L0.Function
66               VIEWS.Button.image SILK.text_strikethrough
67               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
68             _ : VIEWS.Button
69               VIEWS.Button.tooltip "Makes selection underlined or inserts some underlined text at cursor"
70               VIEWS.Button.modifier UI.Functions.underlineModifier : L0.Function
71               VIEWS.Button.image SILK.text_underline
72               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
73             _ : VIEWS.Button
74               VIEWS.Button.tooltip "Inserts a horizontal ruler at cursor"
75               VIEWS.Button.modifier UI.Functions.horizontalRulerModifier : L0.Function
76               VIEWS.Button.image SILK.text_horizontalrule
77               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
78             _ : VIEWS.Button
79               VIEWS.Button.tooltip "Indents text"
80               VIEWS.Button.modifier UI.Functions.indentModifier : L0.Function
81               VIEWS.Button.image SILK.text_indent
82               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
83             _ : VIEWS.Button
84               VIEWS.Button.tooltip "Modifies selection font or inserts text with font settings"
85               VIEWS.Button.modifier UI.Functions.fontModifier : L0.Function
86               VIEWS.Button.image SILK.font
87               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
88             _ : VIEWS.Button
89               VIEWS.Button.tooltip "Inserts an image"
90               VIEWS.Button.modifier UI.Functions.imageModifier : L0.Function
91               VIEWS.Button.image SILK.image
92               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
93             _ : VIEWS.Button
94               VIEWS.Button.tooltip "Inserts an internal model-specific document link"
95               VIEWS.Button.modifier UI.Functions.internalLinkModifier : L0.Function
96               VIEWS.Button.image SILK.database_link
97               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
98             _ : VIEWS.Button
99               VIEWS.Button.tooltip "Inserts an external website link"
100               VIEWS.Button.modifier UI.Functions.linkModifier : L0.Function
101               VIEWS.Button.image SILK.world_link
102               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
103             _ : VIEWS.Button
104               VIEWS.Button.tooltip "Inserts a 1st level header"
105               VIEWS.Button.modifier UI.Functions.header1Modifier : L0.Function
106               VIEWS.Button.image SILK.text_heading_1
107               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
108             _ : VIEWS.Button
109               VIEWS.Button.tooltip "Inserts a 2nd level header"
110               VIEWS.Button.modifier UI.Functions.header2Modifier : L0.Function
111               VIEWS.Button.image SILK.text_heading_2
112               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
113             _ : VIEWS.Button
114               VIEWS.Button.tooltip "Inserts a 3rd level header"
115               VIEWS.Button.modifier UI.Functions.header3Modifier : L0.Function
116               VIEWS.Button.image SILK.text_heading_3
117               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
118             _ : VIEWS.Button
119               VIEWS.Button.tooltip "Inserts a 4th level header"
120               VIEWS.Button.modifier UI.Functions.header4Modifier : L0.Function
121               VIEWS.Button.image SILK.text_heading_4
122               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
123             _ : VIEWS.Button
124               VIEWS.Button.tooltip "Inserts a numbered list"
125               VIEWS.Button.modifier UI.Functions.numberedListModifier : L0.Function
126               VIEWS.Button.image SILK.text_list_numbers
127               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
128             _ : VIEWS.Button
129               VIEWS.Button.tooltip "Inserts a bullet list"
130               VIEWS.Button.modifier UI.Functions.bulletListModifier : L0.Function
131               VIEWS.Button.image SILK.text_list_bullets
132               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
133             _ : VIEWS.Button
134               VIEWS.Button.tooltip "Inserts a table"
135               VIEWS.Button.modifier UI.Functions.tableModifier : L0.Function
136               VIEWS.Button.image SILK.table
137               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
138             _ : VIEWS.Button
139               VIEWS.Button.text "&Styles"
140               VIEWS.Button.tooltip "Edits document styles"
141               VIEWS.Button.modifier UI.Functions.styleModifier : L0.Function
142               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
143             _ : VIEWS.Button
144               VIEWS.Button.text "&Apply changes"
145               VIEWS.Button.tooltip "Applies any changes in the wiki markup into the document"
146               VIEWS.Button.modifier UI.Functions.wikitextModifier : L0.Function
147               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
148             _ : VIEWS.Button
149               VIEWS.Button.text "Delete document"
150               VIEWS.Button.tooltip "Deletes the document"
151               VIEWS.Button.modifier UI.Functions.onDeleteDocumentButton : L0.Function
152               VIEWS.Control.layoutData _ : VIEWS.RowLayout.RowData
153
154       UI.WikitextContribution.View.TextContainer : VIEWS.Composite
155         VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
156           VIEWS.GridLayout.GridData.horizontalSpan 17
157           VIEWS.GridLayout.GridData.horizontalGrab true
158           VIEWS.GridLayout.GridData.verticalGrab true
159         VIEWS.Composite.layout _ : VIEWS.GridLayout
160         SG.Node.children _ : L0.List
161           @L0.list
162             UI.WikitextContribution.View.Text : VIEWS.StyledText
163               @VIEWS.Control.style4 VIEWS.Control.Style.Constant.Multi VIEWS.Control.Style.Constant.Border VIEWS.Control.Style.Constant.VScroll VIEWS.Control.Style.Constant.HScroll
164               VIEWS.TextContainer.text UI.Functions.selectedDocumentPart : L0.Function
165                 L0.HasValueType "String"
166               VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
167                 VIEWS.GridLayout.GridData.verticalGrab true
168                 VIEWS.GridLayout.GridData.horizontalGrab true
169
170 UI.Content : VIEWS.Composite
171   VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
172     VIEWS.GridLayout.GridData.horizontalGrab true
173     VIEWS.GridLayout.GridData.verticalGrab true
174   VIEWS.Composite.layout _ : VIEWS.GridLayout
175     VIEWS.GridLayout.extendedMargins (2,2,2,2) : VIEWS.GridLayout.ExtendedMargins
176     VIEWS.GridLayout.horizontalSpacing 10
177     VIEWS.GridLayout.verticalSpacing 5
178   SG.Node.children _ : L0.List
179     @L0.list
180       UI.Alternative
181
182 UI.Alternative : VIEWS.Alternative
183   VIEWS.Alternative.condition UI.Functions.hasDocument : L0.Function
184     L0.HasValueType "Boolean"
185   SG.Node.children _ : L0.List
186     @L0.list
187       UI.Sash
188       UI.NoDocument
189
190 UI.Sash : VIEWS.SashForm
191   VIEWS.onLoaded UI.Functions.editorLoaded
192   VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
193     VIEWS.GridLayout.GridData.horizontalGrab true
194     VIEWS.GridLayout.GridData.verticalGrab true
195   VIEWS.Composite.layout _ : VIEWS.GridLayout
196     VIEWS.GridLayout.extendedMargins (2,2,2,2) : VIEWS.GridLayout.ExtendedMargins
197     VIEWS.GridLayout.horizontalSpacing 10
198     VIEWS.GridLayout.verticalSpacing 5
199   VIEWS.SashForm.weights [70,30]
200   VIEWS.SashForm.orientation VIEWS.SashForm.Vertical
201   SG.Node.children _ : L0.List
202     @L0.list
203 //      UI.Scroll : VIEWS.ScrolledComposite
204  //       VIEWS.Control.layoutData
205  //         _ : VIEWS.GridLayout.GridData
206  //           VIEWS.GridLayout.GridData.horizontalGrab true
207  //           VIEWS.GridLayout.GridData.verticalGrab true
208  //       SG.Node.children _ : L0.List
209  //         @L0.list
210       UI.Browser : VIEWS.Browser
211         VIEWS.Control.layoutData
212           _ : VIEWS.GridLayout.GridData
213             VIEWS.GridLayout.GridData.horizontalGrab true
214             VIEWS.GridLayout.GridData.verticalGrab true
215         VIEWS.Browser.variable DOC.Functions.documentationRootVariable
216         VIEWS.Browser.document DOC.Functions.documentationText
217         VIEWS.Browser.locationChanging UI.Functions.locationChanging : L0.Function
218             L0.HasValueType "a -> Boolean"
219       UI.WikitextContribution.View
220
221 UI.NoDocument : VIEWS.Composite
222   VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
223     VIEWS.GridLayout.GridData.horizontalGrab true
224     VIEWS.GridLayout.GridData.verticalGrab true
225   VIEWS.Control.background (255,255,255) : DATA.RGB.Integer
226   SG.Node.children _ : L0.List
227     @L0.list
228       _ : VIEWS.Text
229         VIEWS.TextContainer.text "No document to show"
230         VIEWS.Control.font ("Arial",14,"Bold") : DATA.Font
231       _ : VIEWS.Text
232         VIEWS.TextContainer.text UI.Functions.noDocumentText : L0.Function
233           L0.HasValueType "String"
234         VIEWS.Control.font ("Arial",8,"Normal") : DATA.Font
235       _ : VIEWS.Alternative
236         VIEWS.Alternative.condition UI.Functions.canCreateDocument : L0.Function
237           L0.HasValueType "Boolean"
238         VIEWS.Control.background (255,255,255) : DATA.RGB.Integer
239         SG.Node.children _ : L0.List
240           @L0.list
241             _ : VIEWS.Button
242               VIEWS.Button.text "Create a document"
243               VIEWS.Button.tooltip "Creates a document based on a template"
244               VIEWS.Button.modifier UI.Functions.onCreateDocumentButton : L0.Function
245
246 UI.Editor : VIEWS.Composite
247   VIEWS.onLoaded UI.Functions.editorLoaded
248     L0.HasValueType "WriteGraph => Variable -> Variable -> Boolean"
249   VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
250     VIEWS.GridLayout.GridData.horizontalGrab true
251     VIEWS.GridLayout.GridData.verticalGrab true
252   VIEWS.Composite.layout _ : VIEWS.GridLayout
253   SG.Node.children _ : L0.List
254     @L0.list
255       UI.Content
256
257 UI.View : VIEWS.Composite
258   VIEWS.HasInputSource VIEWS.WorkbenchSelectionInputSource
259   VIEWS.onInputChanged UI.Functions.viewInputChanged : L0.Function
260     L0.HasValueType "Variable -> Boolean"
261   VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
262     VIEWS.GridLayout.GridData.horizontalGrab true
263     VIEWS.GridLayout.GridData.verticalGrab true
264   VIEWS.Composite.layout _ : VIEWS.GridLayout
265   SG.Node.children _ : L0.List
266     @L0.list
267       UI.Content
268
269
270       
271 BC = UI.BrowseContext : VP.BrowseContext
272
273 BC        
274   VP.BrowseContext.HasChildContribution _ : VP.ChildContribution
275     VP.ChildContribution.HasParentNodeType MOD.ModelingBrowseContext.Variable
276     VP.ChildContribution.HasChildNodeType MOD.ModelingBrowseContext.Variable
277     VP.ChildContribution.HasRule _ : MOD.ModelingBrowseContext.VariablePropertyRule
278       MOD.ModelingBrowseContext.VariablePropertyRule.RequireProperty "userProperty"
279   VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
280     VP.VisualsContribution.HasNodeType MOD.ModelingBrowseContext.Variable
281     VP.VisualsContribution.HasRule MOD.ModelingBrowseContext.VariableLabelRule
282   VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
283     VP.VisualsContribution.HasNodeType MOD.ModelingBrowseContext.Variable
284     VP.VisualsContribution.HasRule _ : VP.ConstantImageRule
285       VP.ConstantImageRule.HasImage SILK.layout_content
286       
287