INatAutoObjectTrees

This document covers the following topics:


Purpose

Collection of the currently open tree view document windows.

Properties

The following properties are available:

Parent

Used to navigate to the parent interface of this interface.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT DISPATCH (INatAutoObjects) Get only

Studio

Used to navigate to the root interface.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoStudio) Get only

Count

The number of currently open tree view document windows.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

Methods

The following methods are available:

Item

Returns a specific tree view document window from the collection.

Parameters

Name Natural Data Format Variant Type Remark
Return value HANDLE OF OBJECT VT_DISPATCH (INatAutoObjectTree)  
Index I4 VT_I4  
Return value

The tree view document window identified by the value specified in Index.

Index

Identifies a specific tree view document window in the collection. This is a value between 1 and Count.

Open

Opens a new tree view document window.

Parameters

Name Natural Data Format Variant Type Remark
Return value HANDLE OF OBJECT VT_DISPATCH (INatAutoObjectTree)  
Type I4 VT_I4  
Key A VT_BSTR  
Caption A VT_BSTR  
Template I4 VT_I4 Optional
PlugInID A VT_BSTR Optional
Info A VT_BSTR Optional
DisplayName A VT_BSTR Optional
HasChildren I4 VT_I4 Optional
Children A VT_BSTR Optional
NaturalType I4 VT_I4 Optional
NaturalKey A VT_BSTR Optional
Return value

The newly opened tree view document.

Type

The node type of the root object. This must be a plug-in defined type that may correspond to a predefined Natural Studio type.

Key

The key that identifies the object within its type.

Caption

Determines the caption of the document window.

In order to generate a caption that matches the caption format used in Natural Studio document windows, the string passed in this parameter may contain the format specifier %std. This format specifier will be dynamically replaced by an identifier of the root object in the following way: If the root node corresponds to a predefined Natural Studio object, the format specifier %std is replaced by "name [library] -". Otherwise the identifier is built in the form "node-type-caption display-name -", where node-type-caption is the caption that was passed when the node type was created and display-name is the string passed in DisplayName.

Template

The value specified here is passed back to the plug-in when Natural Studio later calls the plug-in through the interface INaturalStudioPlugInTree in order to retrieve data to fill the view. This enables the plug-in to deliver different data for the same root object.

PlugInID

The ID of the plug-in that defined the type.

Info

Additional information that a plug-in may want to assign to the root object. Natural Studio does not interpret this information. It just passes it back to the plug-in when it later calls the plug-in through the interface INaturalStudioPlugInTree in order to retrieve data to fill the view.

DisplayName

The text to be displayed at the root node.

HasChildren

Indicates if the root node has child nodes and shall hence be displayed with a plus-sign as expandable. A value of 1 means that the root node has children, -1 that the root node has no children, 0 or not specified means that the plug-in does not know yet. Natural Studio will then retrieve this information from the plug-in in a later call through the interface INaturalStudioPlugInTree.

Children

If the plug-in already knows not only that the root node has child nodes, but also already knows the child nodes themselves, it can pass them in this parameter as a subtree of arbitrary depth. The parameter must then contain an XML document describing the child nodes. The XML document is structured according to the DTD defined in INaturalStudioPlugInTree::GetChildren. If this parameter is specified, Natural Studio implicitly assumes that the root node has child nodes, ignores what is specified in HasChildren and performs no call through the interface INaturalStudioPlugInTree to determine if the root node has child nodes.

NaturalType

If the root node corresponds to a predefined Natural Studio object, this property contains the type of the corresponding predefined object.

NaturalKey

If the root node corresponds to a predefined Natural Studio object, this property contains the key of the corresponding predefined object.