ICnrHandler

The ICnrHandler class provides the basic event-handling capability for the container.

Create a handler derived from ICnrHandler and attach it to the container whose events are to be handled. You can do this by calling handleEventsFor to pass the container to the container handler.

ICnrHandler processes the following events from the container:

When the container handler receives one of these events, it creates a corresponding event object and routes that object to the appropriate ICnrHandler virtual function. You must override these virtual functions to supply your own specialized processing of these events.


ICnrHandler - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ICnrHandler
public:
ICnrHandler()

Provides the default constructor, which does not accept any parameters.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Dispatching

Use these members to implement the class.


[view class]
handleEventsFor
public:
virtual ICnrHandler& handleEventsFor( IContainerControl* container )

Attaches the handler to the specified container control.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
stopHandlingEventsFor
public:
virtual ICnrHandler& stopHandlingEventsFor( IContainerControl* container )

Detaches the handler from the specified container control.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


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

If a container event is received, the appropriate virtual function is called.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Processing

Event-processing members must be supplied by a derived class to provide processing for an edit event.


[view class]
cursoredChanged
public:
virtual bool cursoredChanged(ICnrEmphasisEvent& event)

Called when the cursored emphasis of an object changes. By default, this function calls IContainerObject::handleCursoredChange on the object whose emphasis has changed.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
deltaReached
public:
virtual bool deltaReached(ICnrQueryDeltaEvent& event)

Called when the container is scrolled to the predefined delta.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support data caching. This function is not called in this case.


[view class]
enter
public:
virtual bool enter(ICnrEnterEvent& event)

Called when the user selects the Enter key or double-clicks the mouse select button on an object. If the enter occurs over an object, by default, this function calls IContainerObject::handleOpen. Otherwise, this function ignores the enter.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
help
public:
virtual bool help(ICnrHelpEvent& event)

Called when help is requested in a container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
inuseChanged
public:
virtual bool inuseChanged(ICnrEmphasisEvent& event)

Called when the in-use emphasis of an object changes. By default, this function calls IContainerObject::handleInuseChange.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
selectedChanged
public:
virtual bool selectedChanged(ICnrEmphasisEvent& event)

Called when the selection emphasis of an object changes. By default, this function calls IContainerObject::handleSelectedChange.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
treeCollapsed
public:
virtual bool treeCollapsed( IContainerObject* collapsedObject, IContainerControl* container )

Called when the specified object is collapsed in the specified container. By default, this function calls IContainerObject::handleTreeCollapse.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
treeExpanded
public:
virtual bool treeExpanded( IContainerObject* expandedObject, IContainerControl* container )

Called when the specified object is expanded in the specified container. By default, this function calls IContainerObject::handleTreeExpand on the expanded object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
windowScrolled
public:
virtual bool windowScrolled(ICnrScrollEvent& event)

Called when the container window is scrolled.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

This function is not called for a Motif container widget as ICnrScrollEvent is not supported in this case.

Windows Considerations

This function is not called for a native Windows container as ICnrScrollEvent is not supported in this case.


ICnrHandler - Inherited Member Functions and Data

Inherited Public Functions

IHandler

Inherited Public Data

Inherited Protected Functions

IHandler

Inherited Protected Data