1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
4
Father="ExtensionContainerPy"
7
TwinPointer="ViewProvider"
8
Include="Gui/ViewProvider.h"
10
FatherInclude="App/ExtensionContainerPy.h"
11
FatherNamespace="App">
13
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
14
<UserDocu>This is the ViewProvider base class</UserDocu>
16
<Methode Name="addProperty">
18
<UserDocu>addProperty(type, name, group, doc, attr=0, ro=False, hd=False) -> ViewProvider
20
Add a generic property.
25
Property name. Optional.
27
Property group. Optional.
33
Hidden property.</UserDocu>
36
<Methode Name="removeProperty">
38
<UserDocu>removeProperty(name) -> bool
40
Remove a generic property.
41
Only user-defined properties can be removed, not built-in ones.
44
Property name.</UserDocu>
47
<Methode Name="supportedProperties">
49
<UserDocu>supportedProperties() -> list
51
A list of supported property types.</UserDocu>
56
<UserDocu>show() -> None
58
Show the object.</UserDocu>
63
<UserDocu>show() -> None
65
Hide the object.</UserDocu>
68
<Methode Name="isVisible">
70
<UserDocu>isVisible() -> bool
72
Check if the object is visible.</UserDocu>
75
<Methode Name="canDragObject">
77
<UserDocu>canDragObject(obj=None) -> bool
79
Check whether the child object can be removed by dragging.
80
If 'obj' is not given, check without filter by any particular object.
82
obj : App.DocumentObject
83
Object to be dragged.</UserDocu>
86
<Methode Name="dragObject">
88
<UserDocu>dragObject(obj) -> None
90
Remove a child object by dropping.
92
obj : App.DocumentObject
93
Object to be dragged.</UserDocu>
96
<Methode Name="canDropObject" Keyword="true">
98
<UserDocu>canDropObject(obj=None, owner=None, subname, elem=None) -> bool
100
Check whether the child object can be added by dropping.
101
If 'obj' is not given, check without filter by any particular object.
103
obj : App.DocumentObject
104
Object to be dropped.
105
owner : App.DocumentObject
106
Parent object of the dropping object.
108
Subname reference to the dropping object. Optional.
109
elem : sequence of str
110
Non-objects subelements selected when the object is
111
being dropped.</UserDocu>
114
<Methode Name="dropObject" Keyword="true">
116
<UserDocu>dropObject(obj, owner=None, subname, elem=None) -> str
118
Add a child object by dropping.
120
obj : App.DocumentObject
121
Object to be dropped.
122
owner : App.DocumentObject
123
Parent object of the dropping object.
125
Subname reference to the dropping object. Optional.
126
elem : sequence of str
127
Non-objects subelements selected when the object is
128
being dropped.</UserDocu>
131
<Methode Name="canDragAndDropObject">
133
<UserDocu>canDragAndDropObject(obj) -> bool
135
Check whether the child object can be removed from
136
other parent and added here by drag and drop.
138
obj : App.DocumentObject
139
Object to be dragged and dropped.</UserDocu>
142
<Methode Name="replaceObject">
144
<UserDocu>replaceObject(oldObj, newObj) -> int
146
Replace a child object.
147
Returns 1 if succeeded, 0 if not found, -1 if not supported.
149
oldObj : App.DocumentObject
151
newObj : App.DocumentObject
152
New object.</UserDocu>
155
<Methode Name="doubleClicked">
157
<UserDocu>doubleClicked() -> bool
159
Trigger double clicking the corresponding tree item of this view object.</UserDocu>
162
<Methode Name="addDisplayMode">
164
<UserDocu>addDisplayMode(obj, mode) -> None
166
Add a new display mode to the view provider.
171
Name of the display mode.</UserDocu>
174
<Methode Name="listDisplayModes">
176
<UserDocu>listDisplayModes() -> list
178
Show a list of all display modes.</UserDocu>
181
<Methode Name="toString">
183
<UserDocu>toString() -> str
185
Return a string representation of the Inventor node.</UserDocu>
188
<Methode Name="setTransformation">
190
<UserDocu>setTransformation(trans) -> None
192
Set a transformation on the Inventor node.
194
trans : Base.Placement, Base.Matrix</UserDocu>
197
<Methode Name="claimChildren" Const="true">
199
<UserDocu>claimChildren() -> list
201
Returns list of objects that are to be grouped in tree under this object.</UserDocu>
204
<Methode Name="claimChildrenRecursive" Const="true">
206
<UserDocu>claimChildrenRecursive() -> list
208
Returns list of objects that are to be grouped in tree under this object recursively.</UserDocu>
211
<Methode Name="partialRender">
213
<UserDocu>partialRender(sub=None, clear=False) -> int
215
Render only part of the object.
217
sub: None, str, sequence of str
218
Refer to the subelement. If it is None then reset the partial rendering.
220
True to add, or False to remove the subelement(s) for rendering.</UserDocu>
223
<Methode Name="getElementColors">
225
<UserDocu>getElementColors(elementName) -> dict
227
Get a dictionary of the form {elementName : (r,g,b,a)}.
228
If no element name is given a dictionary with all the elements is returned.
231
Name of the element. Optional.</UserDocu>
234
<Methode Name="setElementColors">
236
<UserDocu>setElementColors(colors) -> None
241
Color dictionary of the form {elementName:(r,g,b,a)}.</UserDocu>
244
<Methode Name="getElementPicked" Const="true">
246
<UserDocu>getElementPicked(pickPoint) -> str
248
Return the picked subelement.
250
pickPoint : coin.SoPickedPoint</UserDocu>
253
<Methode Name="getDetailPath" Const="true">
255
<UserDocu>getDetailPath(subelement, path, append=True) -> coin.SoDetail or None
257
Return Coin detail and path of an subelement.
260
Dot separated string reference to the sub element.
262
Output coin path leading to the returned element detail.
264
If True, path will be first appended with the root node and the mode
265
switch node of this view provider.</UserDocu>
268
<Methode Name="signalChangeIcon" Const="true">
270
<UserDocu>signalChangeIcon() -> None
272
Trigger icon changed signal.</UserDocu>
275
<Methode Name="getBoundingBox">
277
<UserDocu>getBoundingBox(subName, transform=True, view) -> Base.BoundBox
279
Obtain the bounding box of this view object.
282
Name referring a sub-object. Optional.
284
Whether to apply the transformation matrix of this view provider.
285
view: View3DInventorPy
286
Default to active view. Optional.</UserDocu>
289
<Attribute Name="Annotation" ReadOnly="false">
291
<UserDocu>A pivy Separator to add a custom scenegraph to this ViewProvider.</UserDocu>
293
<Parameter Name="Annotation" Type="Object" />
295
<Attribute Name="Icon" ReadOnly="true">
297
<UserDocu>The icon of this ViewProvider.</UserDocu>
299
<Parameter Name="Icon" Type="Object" />
301
<Attribute Name="RootNode" ReadOnly="false">
303
<UserDocu>A pivy Separator with the root of this ViewProvider.</UserDocu>
305
<Parameter Name="RootNode" Type="Object" />
307
<Attribute Name="SwitchNode" ReadOnly="false">
309
<UserDocu>A pivy SoSwitch for the display mode switch of this ViewProvider.</UserDocu>
311
<Parameter Name="SwitchNode" Type="Object" />
313
<Attribute Name="DefaultMode" ReadOnly="false">
315
<UserDocu>Get/Set the default display mode in turns of coin node index.</UserDocu>
317
<Parameter Name="DefaultNode" Type="Int" />
319
<Attribute Name="IV" ReadOnly="true">
321
<UserDocu>Represents the whole ViewProvider as an Inventor string.</UserDocu>
323
<Parameter Name="IV" Type="String" />
325
<Attribute Name="CanRemoveChildrenFromRoot" ReadOnly="true">
327
<UserDocu>Tells the tree view whether to remove the children item from root or not.</UserDocu>
329
<Parameter Name="CanRemoveChildrenFromRoot" Type="Boolean" />
331
<Attribute Name="LinkVisibility">
333
<UserDocu>Get/set visibilities of all links to this view object.</UserDocu>
335
<Parameter Name="LinkVisibility" Type="Boolean" />
337
<Attribute Name="DropPrefix" ReadOnly="true" >
339
<UserDocu>Subname referencing the sub-object for holding dropped object.</UserDocu>
341
<Parameter Name="DropPrefix" Type="String" />