This document covers the following topics:
A collection of images that shall be used to represent a user defined node type in tree views or list views. Each image is identified by an integer value.
The following properties are available:
Used to navigate to the parent interface of this interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoTypes) | Get only |
Used to navigate to the root interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoStudio) | Get only |
The number of available node images.
Natural Data Format | Variant Type | Remark |
---|---|---|
I4 | VT_I4 | Get only |
The following method is available:
Adds a new image to the collection.
A list view node requires a 16x16 bitmap to represent the node in the "Small icons" view and a 32x32 bitmap for the "Large icons" view. A tree view node requires two 16x16 bitmaps, one representing the closed state and one representing the open state.
In order to register a 16x16 bitmap, the plug-in passes the bitmap in
the parameter ImageSmall
. In order to register
additionally a corresponding 32x32 bitmap, the plug-in passes the bitmap in the
parameter ImageLarge
.
In order to register images for a node that shall be represented both
in list views and in tree views, the plug-in calls
AddImage
once with the 16x16 bitmap representing the
closed state and the corresponding 32x32 bitmap. Then it calls
AddImage
a second time passing the 16x16 bitmap
representing the open state and omitting the second parameter.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | I4 | VT_I4 | |
ImageSmall |
A |
VT_BSTR |
|
ImageLarge |
A |
VT_BSTR |
Optional |
An integer value that can later be used to refer to the image in
the method INatAutoNodeTypes::Add
.
A 16x16 bitmap. Areas in the bitmap that contain the color RGB(0,128,128) will be displayed transparent.
The bitmap can be specified in two ways:
As an absolute path name of a .bmp file.
As an IPictureDisp
interface. An
IPictureDisp
interface can be created in Natural using
the method INatAutoImages::LoadImage
.
Note that an IPictureDisp
interface cannot be passed
across process boundaries. This is due to a Microsoft restriction (MSDN
Q150034). Therefore this alternative can only be used with plug-ins running as
in-process servers. Natural written plug-ins always run as local servers and
can therefore not use this alternative.
A 32x32 bitmap. Areas in the bitmap that contain the color RGB(0,128,128) will be displayed transparent.
The bitmap can be specified in two ways:
As an absolute path name of a .bmp file.
As an IPictureDisp
interface. An
IPictureDisp
interface can be created in Natural using
the method INatAutoImages::LoadImage
.
Note that an IPictureDisp
interface cannot be passed
across process boundaries. This is due to a Microsoft restriction (MSDN
Q150034). Therefore this alternative can only be used with plug-ins running as
in-process servers. Natural written plug-ins always run as local servers and
can therefore not use this alternative.