The ICommandConnectionTo class is a template class, derived from ICommandHandler, that processes application and system command events and routes them to the template argument class. This class allows you to process command events in objects that do not derive from ICommandHandler without having to manually derive from ICommandHandler, override the command and systemCommand functions, and pass the events to the object.
The ICommandConnectionTo class routes both command and system command events to the same member of the template argument class. You can use the eventId member of ICommandEvent to distinguish between these two events.
To use the ICommandConnectionTo class, follow these steps:
You use an ICommandConnectionTo object anywhere you use an ICommandHandler object. See the class description of ICommandHandler for a description of the uses and limitations of these classes.
You can construct and destruct template objects of this class. You cannot copy or assign objects of this class.
![]() |
public:
virtual ~ICommandConnectionTo()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
ICommandConnectionTo( ATarget& target, MemberFunction memberFunction )
Constructs the ICommandConnectionTo object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members are overridden to route command and system command events to the target object provided on construction.
![]() |
protected:
virtual bool command(ICommandEvent& event)
Overridden to route command events to the member function of the target object provided on construction.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual bool systemCommand(ICommandEvent& event)
Overridden to route system command events to the member function of the target object provided on construction.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
typedef bool (ATarget::*MemberFunction)(ICommandEvent&)
A pointer to a member function of Class ATarget that takes a reference to an ICommandEvent and returns a boolean.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~ICommandHandler()
ICommandHandler()
virtual ~IHandler()
virtual IString asDebugInfo() const
virtual IString asString() const
virtual IHandler& disable()
virtual IHandler& enable(bool enable = true)
virtual IHandler& handleEventsFor(IWindow* window)
IHandler()
bool isEnabled() const
virtual IHandler& stopHandlingEventsFor(IWindow* window)
virtual IEventResult defaultProcedure(IEvent& event)
virtual bool dispatchHandlerEvent(IEvent& event) = 0