Version 6.3.8 für Windows
 —  Extending Natural Studio with Plug-ins  —

INatAutoNodeImages

This document covers the following topics:


Purpose

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.

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 (INatAutoTypes) 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 available node images.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

Top of page

Methods

The following method is available:

AddImage

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.

Parameters

Name Natural Data Format Variant Type Remark
Return value I4 VT_I4  
ImageSmall

A
HANDLE OF OBJECT

VT_BSTR
VT_DISPATCH (IPictureDisp)

 
ImageLarge

A
HANDLE OF OBJECT

VT_BSTR
VT_DISPATCH (IPictureDisp)

Optional
Return value

An integer value that can later be used to refer to the image in the method INatAutoNodeTypes::Add.

ImageSmall

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:

ImageLarge

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:

Top of page