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.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~ICnrHandler()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
ICnrHandler()
Provides the default constructor, which does not accept any parameters.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to implement the class.
![]() |
public:
virtual ICnrHandler& handleEventsFor( IContainerControl* container )
Attaches the handler to the specified container control.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual ICnrHandler& stopHandlingEventsFor( IContainerControl* container )
Detaches the handler from the specified container control.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
If a container event is received, the appropriate virtual function is called.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Event-processing members must be supplied by a derived class to provide processing for an edit event.
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool deltaReached(ICnrQueryDeltaEvent& event)
Called when the container is scrolled to the predefined delta.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
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.
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool help(ICnrHelpEvent& event)
Called when help is requested in a container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool inuseChanged(ICnrEmphasisEvent& event)
Called when the in-use emphasis of an object changes. By default, this function calls IContainerObject::handleInuseChange.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool selectedChanged(ICnrEmphasisEvent& event)
Called when the selection emphasis of an object changes. By default, this function calls IContainerObject::handleSelectedChange.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool windowScrolled(ICnrScrollEvent& event)
Called when the container window is scrolled.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This function is not called for a Motif container widget as ICnrScrollEvent is not supported in this case.
This function is not called for a native Windows container as ICnrScrollEvent is not supported in this case.
virtual IEventResult defaultProcedure(IEvent& event)
virtual bool dispatchHandlerEvent(IEvent& event) = 0