The IEditHandler class handles events resulting from a user changing a control's input value, such as changing the value of an entry field or moving the arm of a slider. IEditHandler objects process edit events for the following controls:
You create a handler derived from IEditHandler and attach it to either the control whose input users can change or to the control's owner window. You can do this by calling IHandler::handleEventsFor to pass the appropriate control window or owner window to the edit handler.
When the edit handler receives an edit event, it creates an IControlEvent object and routes that object to the IEditHandler::edit virtual function. You override this virtual function to supply your own specialized processing of an edit event.
The following return values from the virtual function specify whether the control event is passed on for additional processing:
Only derived classes can construct objects of this class.
![]() |
protected:
IEditHandler()
Derived classes call this default constructor to create objects of this class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The Open Class Library dispatches events that have been sent or posted to a window to the handlers attached to that window. It does this by calling the event-dispatching function of the handler objects. An IEditHandler object processes only events related to changes to a window's value.
![]() |
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
If an edit event is received, this function calls the appropriate virtual function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
An edit handler allows you to process changes to a window's value through its event-processing members. Override at least one of these virtual functions in a derived class.
![]() |
protected:
virtual bool edit(IControlEvent& event) = 0
Implemented by the derived classes to process input changes to a window.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
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