IMenuNotifyHandler

IMenuNotifyHandler objects process events for all classes of menus.

This class is designed to handle events that require the menu class to generate a notification. If notifications are enabled for the menu object, a notification will be generated and sent to all its observers when the proper conditions for the specific notification exist.

If you create a class derived from IMenu that needs to notify observers of additional events, create a class derived from IMenuNotifyHandler that overrides dispatchHandlerEvent. In the class derived from IMenu, implement enableNotification to call IWindow::setNotificationHandler, passing it an object of the class derived from IMenuNotifyHandler.


IMenuNotifyHandler - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~IMenuNotifyHandler
public:
virtual ~IMenuNotifyHandler()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IMenuNotifyHandler
public:
IMenuNotifyHandler()

Default constructor.
Note: Generally you do not need to construct an object of this class. Calling IMenu::enableNotification causes an IMenuNotifyHandler object to be constructed and added to the window, if necessary.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Dispatching

Notification handlers process events that are sent or posted to a window by calling observer objects interested in those events.


[view class]
dispatchHandlerEvent
protected:
virtual bool dispatchHandlerEvent(IEvent& event)

Notifies the menu observers when it receives any of the following events:

This function also calls IWindowNotifyHandler::dispatchHandlerEvent so that observers will also be notified of generic window events.

If you create a class derived from IMenuNotifyHandler, its dispatchHandlerEvent function should call IMenuNotifyHandler::dispatchHandlerEvent for events it does not process.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IMenuNotifyHandler - Inherited Member Functions and Data

Inherited Public Functions

IHandler
IWindowNotifyHandler

Inherited Public Data

Inherited Protected Functions

IHandler

Inherited Protected Data