IContainers80

In addition to TerraExplorer’s four standard containers: 3D Window, Project Tree and Message Bar, new containers can be created to display information or to contain custom tools. The IContainers80 interface gives the client access to all of TerraExplorer application’s containers, enabling the client to create a new container or remove an old one.

 

 

Properties

 

Count

Gets the number of containers in the project.

Item

Gets the IContainerItem80 element in the specified zero-based index.

 

Methods

 

AddContainer

Adds a new container.

GetContainer

Returns an interface to a container based on the container ID.

RemoveContainer

Removes a specified container.

Count

Gets the number of containers in the project.

 

JavaScript

 

Count

 

C#

 

int Count { get; }

 

C++

 

HRESULT Count([out, retval] long* pVal)

Item

Gets the IContainerItem80 element in the specified zero-based index. To access a specific element use the following syntax: IContainers80(index).

C# exposes this property as an indexer accessed using the following syntax: IContainers80[index].

Note: This property can be used to open the Presentation Editor:

SGWorld.Application.Containers.Item(editorIndex).URL

Where URL = the URL of the presentation editor (" .\Tools\Presentation\PresentationEditor.html")

 

JavaScript

 

Item(

       Index)

 

C#

 

dynamic this[object Index] { get; }

 

C++

 

HRESULT Item(

       [in] VARIANT Index,

       [out, retval] VARIANT* pVal)

AddContainer

Adds a new container.

 

JavaScript

 

AddContainer(

       Name,

       URL,

       StartupSite)

 

C#

 

int AddContainer(

       string Name,

       string URL,

       ContainerSite StartupSite)

 

C++

 

HRESULT AddContainer(

       BSTR Name,

       BSTR URL,

       ContainerSite StartupSite,

       long* Index)

Parameters

Name

The name that appears on the container caption or on the tab (if multiple windows are placed in the same container).

URL

The URL of the file to be opened in the added container.

StartupSite

An enum that determines where the container is initially docked. The following are the possible values:

·          CS_NOT_VALID = -1,

·          CS_DOCK_LEFT = 0,

·          CS_DOCK_RIGHT= 1

·          CS_DOCK_TOP = 2

·          CS_DOCK_BOTTOM = 3

·          CS_DOCK_FLOAT= 4

·          CS_MAIN = 5

Return Value

Index

The zero-based index of the container to be added.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

GetContainer

Returns an interface to a container based on the container ID.

JavaScript

 

GetContainer(

       Index)

 

C#

 

IContainerItem80 GetContainer(

       int Index)

 

C++

 

HRESULT GetContainer(

       long Index,

       IContainerItem80** pContainerItem)

Parameters

Index

The zero-based index of the container the client wants to retrieve.

Return Value

pContainerItem

An IContainerItem80 representing the container object.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

RemoveContainer

Removes a specified container.

 

JavaScript

 

RemoveContainer(

       Index)

 

C#

 

void RemoveContainer(

       int Index)

 

C++

 

HRESULT RemoveContainer(

       long Index)

Parameters

Index

The zero-based index of the container to be removed.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.