Class IImageViewer

3DS Max Plug-In SDK

Class IImageViewer

See Also: Class DADMgr , Class BaseInterface, Class IMaxBitmapViewer

class IImageViewer

Description:

This class is available in release 4.0 and later only.

This class represents an abstract interface class for an image viewer.

Methods:

public:

Prototype:

virtual void PostDisplayCallback::PostDisplayCB(HWND hWnd) = 0;

Remarks:

The PostDisplayCB method of the PostDisplayCallback class is called after an image is displayed in the image viewer. Developers can use this to do any post-display related work.

Parameters:

HWND hWnd

The handle of the image viewer window.

Prototype:

virtual BaseInterface* PostDisplayCallback::GetInterface(Interface_ID id);

Remarks:

This method provides a way to extend the class with interfaces.

Parameters:

Interface_ID id

The interface ID.

Default Implementation:

{ return NULL; }

Prototype:

virtual LRESULT PreEventHandlerCallback::EventHandlerCB(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool &propagate) = 0;

Remarks:

The EventHanderCB method of the PreEventHandlerCallback class allows you to intercept window events prior to them being passed through.

Parameters:

HWND hWnd

The handle of the image viewer window.

UINT message

The message identifier.

WPARAM wParam

The WPARAM value.

LPARAM lParam

The LPARAM value.

bool &propagate

TRUE if the message and event are to be propagated, otherwise FALSE.

Prototype:

virtual BaseInterface* PreEventHandlerCallback::GetInterface(Interface_ID id);

Remarks:

This method provides a way to extend the class with interfaces.

Parameters:

Interface_ID id

The interface ID.

Default Implementation:

{ return NULL; }

Prototype:

virtual void Show() = 0;

Remarks:

This method will show the image viewer. In the IMaxBitmapViewer class, the Display() method must initially be used to display the viewer; this method only displays the viewer after using Hide().

Prototype:

virtual void Hide() = 0;

Remarks:

This method will hide the image viewer. In the IMaxBitmapViewer class, the UnDisplay() method should be used to close the viewer when done; use Hide() to temporarily hide the window.

Prototype:

virtual HWND GetHDisplayWindow() = 0;

Remarks:

This method returns the handle to the display window of the image viewer.

Prototype:

virtual void SetPos(int x, int y, int w, int h) = 0;

Remarks:

This method allows you to set the position of the image viewer window.

Parameters:

int x, y

The position of the window.

int w, h

The width and height of the window.

Prototype:

virtual DisplayStyle GetDisplayStyle() const = 0;

Remarks:

This method will return the display style used by the image viewer window, which is either IV_FLOATING or IV_DOCKED.

Prototype:

virtual void SetContextHelpId(DWORD helpID) = 0;

Remarks:

This method allows you to set the context help identifier for the image viewer.

Parameters:

DWORD helpID

The help identifier.

Prototype:

virtual DWORD GetContextHelpId() const = 0;

Remarks:

This method returns the context help identifier.

Prototype:

virtual void SetDADMgr(DADMgr *pDADMgr) = 0;

Remarks:

This method allows you to set the drag and drop manager which should be used for the image viewer.

Parameters:

DADMgr *pDADMgr

A pointer to the drag and drop manager.

Prototype:

virtual void SetPreEventHandlerCallback(PreEventHandlerCallback* pPreEventHandlerCB) = 0;

Remarks:

This method allows you to set the pre-event handler callback method.

Parameters:

PreEventHandlerCallback* pPreEventHandlerCB

A pointer to the callback function.

Prototype:

virtual PreEventHandlerCallback* GetPreEventHandlerCallback() const = 0;

Remarks:

This method returns a pointer to the pre-event handler callback function.

Prototype:

virtual void SetPostDisplayCallback(PostDisplayCallback* pPostDisplayCB) = 0;

Remarks:

This method allows you to set the post display callback function.

Parameters:

PostDisplayCallback* pPostDisplayCB

A pointer to the callback function.

Prototype:

virtual PostDisplayCallback* GetPostDisplayCallback() const = 0;

Remarks:

This method returns a pointer to the post display callback function.

Prototype:

virtual BaseInterface* GetInterface(Interface_ID id);

Remarks:

This method provides a way to extend the class with interfaces.

Parameters:

Interface_ID id

The interface ID.

Default Implementation:

{ return NULL; }