Version 6.3.13 for Windows
 —  Extending Natural Studio with Plug-ins  —

INatAutoGenericDocuments

This document covers the following topics:


Purpose

Collection of the currently open generic document windows.

Top of page

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 VT_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 generic document windows.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

Top of page

Methods

The following methods are available:

Item

Returns a specific generic document window from the collection.

Parameters

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

The generic document window identified by the value specified in Index.

Index

Identifies a specific generic text object in the collection by its index in the collection (a value between 1 and Count).

Add

Creates a new generic document window from a Natural dialog instance. Before creating a generic document window, the plug-in opens a Natural dialog of type "MDI plug-in window" with the OPEN DIALOG statement. In order to make the dialog appear in Natural Studio as a document window, the plug-in passes the dialog ID returned from the OPEN DIALOG statement to the method Add in the parameter DialogID.

Parameters

Name Natural Data Format Variant Type Remark
Return value HANDLE OF OBJECT VT_DISPATCH (INatAutoGenericDocument)  
DialogID I4 VT_I4  
Caption A VT_BSTR Optional
IconFile A VT_BSTR Optional
FrameMenu A VT_DISPATCH (INatAutoFrameMenu) Optional
Return value

An interface to the newly created generic document window.

DialogID

A dialog ID that was returned from a previous OPEN DIALOG statement with a Natural dialog of type "MDI plug-in window".

Caption

The caption to be displayed in the generic document window. If Caption is omitted, the caption defined in the corresponding Natural dialog will be displayed.

IconFile

The file and path name of the .ico file that contains the icon to be displayed in the generic document window. If IconFile is omitted, the icon defined in the corresponding Natural dialog will be displayed.

FrameMenu

The frame menu to be displayed with the generic document window. If FrameMenu is omitted, the default frame menu for plug-in document windows will be used. But usually the plug-in will create its own frame menu by cloning (see INatAutoFrameMenus::Clone) this default menu and extending the clone according to its requirements.

Top of page