Public Member Functions

UndoNotify Class Reference

Search for all occurrences

Detailed Description

See also:
Class TVNodeNotify.

Description:
This class is available in release 2.0 and later only.

This class can be used so an ImageFilter plug-in can get notified on a change to one of its Track View Nodes.

This class provides an implementation of the NotifyRefChanged() method of class TVNodeNotify. The constructor of this class stores a window handle. Usually this is the control dialog window handle of the ImageFilter plug-in using this class. Upon receipt of a message via TVNodeNotify::NotifyRefChanged() this implementation sends a FLT_UNDO message to the ImageFilter control dialog window proc and invalidates the window. Most filters will set a flag indicating that an undo has occurred when they get the FLT_UNDO message, and actually update the UI controls when they process the WM_PAINT message. This is because the FLT_UNDO message may be sent many time and the controls shouldn't be updated each time (as they might appear to 'flicker'). See the code for the Negative filter in /MAXSDK/SAMPLES/FILTERS/NEGATIVE/NEGATIVE.CPP for details.

All methods of this class are implemented by the system.

#include <filters.h>

Inheritance diagram for UndoNotify:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  UndoNotify (HWND hwnd)
RefResult  NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message)

Constructor & Destructor Documentation

UndoNotify ( HWND  hwnd ) [inline]
Remarks:
Constructor.
Parameters:
HWND hwnd

The control dialog window handle where the FLT_UNDO message will be sent. This window handle is also passed to InvalidateRectangle() so a WM_PAINT message will be sent.
{hWnd = hwnd;}

Member Function Documentation

RefResult NotifyRefChanged ( Interval  changeInt,
RefTargetHandle  hTarget,
PartID partID,
RefMessage  message 
) [inline, virtual]
Remarks:
A plug-in which makes references must implement this method to receive and respond to messages broadcast by its dependents.
Parameters:
Interval changeInt

This is the interval of time over which the message is active. Currently, all plug-ins will receive FOREVER for this interval.

RefTargetHandle hTarget

This is the handle of the reference target the message was sent by. The reference maker uses this handle to know specifically which reference target sent the message.

PartID& partID

This contains information specific to the message passed in. Some messages don't use the partID at all. See the section Reference Messages and PartID for more information about the meaning of the partID for some common messages.

RefMessage message

The message parameters passed into this method is the specific message which needs to be handled. See Reference Messages.
Returns:
The return value from this method is of type RefResult. This is usually REF_SUCCEED indicating the message was processed. Sometimes, the return value may be REF_STOP. This return value is used to stop the message from being propagated to the dependents of the item.

Implements TVNodeNotify.

                                              {
         SendMessage(hWnd,FLT_UNDO,0,0);
         InvalidateRect(hWnd,NULL,FALSE);
         return(REF_SUCCEED);
   }

UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify
UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify UndoNotify