Now all escaping required for the C++ code generation is done when the .cpp/.h files are generated. Previously, only newlines were escaped automatically. This was a) inconsistent and b) leaked c++ details into the xml data. In addition, the escaping is now done in one central place, harmonizing the three previous implementations. Pre-existing c++ escape sequences in the XML files have been replaced by their literal equivalent so that the resulting python doc sting remains unchanged.
338 lines
11 KiB
XML
338 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
|
<PythonExport
|
|
Father="ExtensionContainerPy"
|
|
Name="ViewProviderPy"
|
|
Twin="ViewProvider"
|
|
TwinPointer="ViewProvider"
|
|
Include="Gui/ViewProvider.h"
|
|
Namespace="Gui"
|
|
FatherInclude="App/ExtensionContainerPy.h"
|
|
FatherNamespace="App">
|
|
<Documentation>
|
|
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
|
|
<UserDocu>This is the ViewProvider base class</UserDocu>
|
|
</Documentation>
|
|
<Methode Name="addProperty">
|
|
<Documentation>
|
|
<UserDocu>addProperty(type, name, group, doc, attr=0, ro=False, hd=False) -> ViewProvider
|
|
|
|
Add a generic property.
|
|
|
|
type : str
|
|
Property type.
|
|
name : str
|
|
Property name. Optional.
|
|
group : str
|
|
Property group. Optional.
|
|
attr : int
|
|
Property attributes.
|
|
ro : bool
|
|
Read only property.
|
|
hd : bool
|
|
Hidden property.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="removeProperty">
|
|
<Documentation>
|
|
<UserDocu>removeProperty(name) -> bool
|
|
|
|
Remove a generic property.
|
|
Only user-defined properties can be removed, not built-in ones.
|
|
|
|
name : str
|
|
Property name.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="supportedProperties">
|
|
<Documentation>
|
|
<UserDocu>supportedProperties() -> list
|
|
|
|
A list of supported property types.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="show">
|
|
<Documentation>
|
|
<UserDocu>show() -> None
|
|
|
|
Show the object.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="hide">
|
|
<Documentation>
|
|
<UserDocu>show() -> None
|
|
|
|
Hide the object.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="isVisible">
|
|
<Documentation>
|
|
<UserDocu>isVisible() -> bool
|
|
|
|
Check if the object is visible.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="canDragObject">
|
|
<Documentation>
|
|
<UserDocu>canDragObject(obj=None) -> bool
|
|
|
|
Check whether the child object can be removed by dragging.
|
|
If 'obj' is not given, check without filter by any particular object.
|
|
|
|
obj : App.DocumentObject
|
|
Object to be dragged.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="dragObject">
|
|
<Documentation>
|
|
<UserDocu>dragObject(obj) -> None
|
|
|
|
Remove a child object by dropping.
|
|
|
|
obj : App.DocumentObject
|
|
Object to be dragged.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="canDropObject" Keyword="true">
|
|
<Documentation>
|
|
<UserDocu>canDropObject(obj=None, owner=None, subname, elem=None) -> bool
|
|
|
|
Check whether the child object can be added by dropping.
|
|
If 'obj' is not given, check without filter by any particular object.
|
|
|
|
obj : App.DocumentObject
|
|
Object to be dropped.
|
|
owner : App.DocumentObject
|
|
Parent object of the dropping object.
|
|
subname : str
|
|
Subname reference to the dropping object. Optional.
|
|
elem : sequence of str
|
|
Non-objects subelements selected when the object is
|
|
being dropped.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="dropObject" Keyword="true">
|
|
<Documentation>
|
|
<UserDocu>dropObject(obj, owner=None, subname, elem=None) -> str
|
|
|
|
Add a child object by dropping.
|
|
|
|
obj : App.DocumentObject
|
|
Object to be dropped.
|
|
owner : App.DocumentObject
|
|
Parent object of the dropping object.
|
|
subname : str
|
|
Subname reference to the dropping object. Optional.
|
|
elem : sequence of str
|
|
Non-objects subelements selected when the object is
|
|
being dropped.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="canDragAndDropObject">
|
|
<Documentation>
|
|
<UserDocu>canDragAndDropObject(obj) -> bool
|
|
|
|
Check whether the child object can be removed from
|
|
other parent and added here by drag and drop.
|
|
|
|
obj : App.DocumentObject
|
|
Object to be dragged and dropped.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="replaceObject">
|
|
<Documentation>
|
|
<UserDocu>replaceObject(oldObj, newObj) -> int
|
|
|
|
Replace a child object.
|
|
Returns 1 if succeeded, 0 if not found, -1 if not supported.
|
|
|
|
oldObj : App.DocumentObject
|
|
Old object.
|
|
newObj : App.DocumentObject
|
|
New object.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="doubleClicked">
|
|
<Documentation>
|
|
<UserDocu>doubleClicked() -> bool
|
|
|
|
Trigger double clicking the corresponding tree item of this view object.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="addDisplayMode">
|
|
<Documentation>
|
|
<UserDocu>addDisplayMode(obj, mode) -> None
|
|
|
|
Add a new display mode to the view provider.
|
|
|
|
obj : coin.SoNode
|
|
Display mode.
|
|
mode : str
|
|
Name of the display mode.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="listDisplayModes">
|
|
<Documentation>
|
|
<UserDocu>listDisplayModes() -> list
|
|
|
|
Show a list of all display modes.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="toString">
|
|
<Documentation>
|
|
<UserDocu>toString() -> str
|
|
|
|
Return a string representation of the Inventor node.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="setTransformation">
|
|
<Documentation>
|
|
<UserDocu>setTransformation(trans) -> None
|
|
|
|
Set a transformation on the Inventor node.
|
|
|
|
trans : Base.Placement, Base.Matrix</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="claimChildren" Const="true">
|
|
<Documentation>
|
|
<UserDocu>claimChildren() -> list
|
|
|
|
Returns list of objects that are to be grouped in tree under this object.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="partialRender">
|
|
<Documentation>
|
|
<UserDocu>partialRender(sub=None, clear=False) -> int
|
|
|
|
Render only part of the object.
|
|
|
|
sub: None, str, sequence of str
|
|
Refer to the subelement. If it is None then reset the partial rendering.
|
|
clear: bool
|
|
True to add, or False to remove the subelement(s) for rendering.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getElementColors">
|
|
<Documentation>
|
|
<UserDocu>getElementColors(elementName) -> dict
|
|
|
|
Get a dictionary of the form {elementName : (r,g,b,a)}.
|
|
If no element name is given a dictionary with all the elements is returned.
|
|
|
|
elementName : str
|
|
Name of the element. Optional.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="setElementColors">
|
|
<Documentation>
|
|
<UserDocu>setElementColors(colors) -> None
|
|
|
|
Set element colors.
|
|
|
|
colors: dict
|
|
Color dictionary of the form {elementName:(r,g,b,a)}.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getElementPicked" Const="true">
|
|
<Documentation>
|
|
<UserDocu>getElementPicked(pickPoint) -> str
|
|
|
|
Return the picked subelement.
|
|
|
|
pickPoint : coin.SoPickedPoint</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getDetailPath" Const="true">
|
|
<Documentation>
|
|
<UserDocu>getDetailPath(subelement, path, append=True) -> coin.SoDetail or None
|
|
|
|
Return Coin detail and path of an subelement.
|
|
|
|
subname: str
|
|
Dot separated string reference to the sub element.
|
|
pPath: coin.SoPath
|
|
Output coin path leading to the returned element detail.
|
|
append: bool
|
|
If True, path will be first appended with the root node and the mode
|
|
switch node of this view provider.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="signalChangeIcon" Const="true">
|
|
<Documentation>
|
|
<UserDocu>signalChangeIcon() -> None
|
|
|
|
Trigger icon changed signal.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getBoundingBox">
|
|
<Documentation>
|
|
<UserDocu>getBoundingBox(subName, transform=True, view) -> Base.BoundBox
|
|
|
|
Obtain the bounding box of this view object.
|
|
|
|
subName : str
|
|
Name referring a sub-object. Optional.
|
|
transform: bool
|
|
Whether to apply the transformation matrix of this view provider.
|
|
view: View3DInventorPy
|
|
Default to active view. Optional.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Attribute Name="Annotation" ReadOnly="false">
|
|
<Documentation>
|
|
<UserDocu>A pivy Separator to add a custom scenegraph to this ViewProvider.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Annotation" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="Icon" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>The icon of this ViewProvider.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Icon" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="RootNode" ReadOnly="false">
|
|
<Documentation>
|
|
<UserDocu>A pivy Separator with the root of this ViewProvider.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="RootNode" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="SwitchNode" ReadOnly="false">
|
|
<Documentation>
|
|
<UserDocu>A pivy SoSwitch for the display mode switch of this ViewProvider.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="SwitchNode" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="DefaultMode" ReadOnly="false">
|
|
<Documentation>
|
|
<UserDocu>Get/Set the default display mode in turns of coin node index.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="DefaultNode" Type="Int" />
|
|
</Attribute>
|
|
<Attribute Name="IV" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Represents the whole ViewProvider as an Inventor string.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="IV" Type="String" />
|
|
</Attribute>
|
|
<Attribute Name="CanRemoveChildrenFromRoot" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Tells the tree view whether to remove the children item from root or not.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="CanRemoveChildrenFromRoot" Type="Boolean" />
|
|
</Attribute>
|
|
<Attribute Name="LinkVisibility">
|
|
<Documentation>
|
|
<UserDocu>Get/set visibilities of all links to this view object.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="LinkVisibility" Type="Boolean" />
|
|
</Attribute>
|
|
<Attribute Name="DropPrefix" ReadOnly="true" >
|
|
<Documentation>
|
|
<UserDocu>Subname referencing the sub-object for holding dropped object.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="DropPrefix" Type="String" />
|
|
</Attribute>
|
|
</PythonExport>
|
|
</GenerateModel>
|