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="partialRender">
206
<UserDocu>partialRender(sub=None, clear=False) -> int
208
Render only part of the object.
210
sub: None, str, sequence of str
211
Refer to the subelement. If it is None then reset the partial rendering.
213
True to add, or False to remove the subelement(s) for rendering.</UserDocu>
216
<Methode Name="getElementColors">
218
<UserDocu>getElementColors(elementName) -> dict
220
Get a dictionary of the form {elementName : (r,g,b,a)}.
221
If no element name is given a dictionary with all the elements is returned.
224
Name of the element. Optional.</UserDocu>
227
<Methode Name="setElementColors">
229
<UserDocu>setElementColors(colors) -> None
234
Color dictionary of the form {elementName:(r,g,b,a)}.</UserDocu>
237
<Methode Name="getElementPicked" Const="true">
239
<UserDocu>getElementPicked(pickPoint) -> str
241
Return the picked subelement.
243
pickPoint : coin.SoPickedPoint</UserDocu>
246
<Methode Name="getDetailPath" Const="true">
248
<UserDocu>getDetailPath(subelement, path, append=True) -> coin.SoDetail or None
250
Return Coin detail and path of an subelement.
253
Dot separated string reference to the sub element.
255
Output coin path leading to the returned element detail.
257
If True, path will be first appended with the root node and the mode
258
switch node of this view provider.</UserDocu>
261
<Methode Name="signalChangeIcon" Const="true">
263
<UserDocu>signalChangeIcon() -> None
265
Trigger icon changed signal.</UserDocu>
268
<Methode Name="getBoundingBox">
270
<UserDocu>getBoundingBox(subName, transform=True, view) -> Base.BoundBox
272
Obtain the bounding box of this view object.
275
Name referring a sub-object. Optional.
277
Whether to apply the transformation matrix of this view provider.
278
view: View3DInventorPy
279
Default to active view. Optional.</UserDocu>
282
<Attribute Name="Annotation" ReadOnly="false">
284
<UserDocu>A pivy Separator to add a custom scenegraph to this ViewProvider.</UserDocu>
286
<Parameter Name="Annotation" Type="Object" />
288
<Attribute Name="Icon" ReadOnly="true">
290
<UserDocu>The icon of this ViewProvider.</UserDocu>
292
<Parameter Name="Icon" Type="Object" />
294
<Attribute Name="RootNode" ReadOnly="false">
296
<UserDocu>A pivy Separator with the root of this ViewProvider.</UserDocu>
298
<Parameter Name="RootNode" Type="Object" />
300
<Attribute Name="SwitchNode" ReadOnly="false">
302
<UserDocu>A pivy SoSwitch for the display mode switch of this ViewProvider.</UserDocu>
304
<Parameter Name="SwitchNode" Type="Object" />
306
<Attribute Name="DefaultMode" ReadOnly="false">
308
<UserDocu>Get/Set the default display mode in turns of coin node index.</UserDocu>
310
<Parameter Name="DefaultNode" Type="Int" />
312
<Attribute Name="IV" ReadOnly="true">
314
<UserDocu>Represents the whole ViewProvider as an Inventor string.</UserDocu>
316
<Parameter Name="IV" Type="String" />
318
<Attribute Name="CanRemoveChildrenFromRoot" ReadOnly="true">
320
<UserDocu>Tells the tree view whether to remove the children item from root or not.</UserDocu>
322
<Parameter Name="CanRemoveChildrenFromRoot" Type="Boolean" />
324
<Attribute Name="LinkVisibility">
326
<UserDocu>Get/set visibilities of all links to this view object.</UserDocu>
328
<Parameter Name="LinkVisibility" Type="Boolean" />
330
<Attribute Name="DropPrefix" ReadOnly="true" >
332
<UserDocu>Subname referencing the sub-object for holding dropped object.</UserDocu>
334
<Parameter Name="DropPrefix" Type="String" />