The ISelectHandler-derived classes handle events resulting from a user interacting with a selectable item, such as clicking a radio button. ISelectHandler objects process item selection events for the following controls:
You can create a handler derived from ISelectHandler and attach it to a control that generates a selection event or to the control's owner window by calling IHandler::handleEventsFor.
When the selection handler receives a selection event, it creates an IControlEvent object and routes that object to the appropriate ISelectHandler virtual function. You override these "Event Processing" virtual functions to supply customized processing of a selection event.
The return value from the virtual functions specifies whether the selection event is be passed on for additional processing, as follows:
The ISelectHandler is called when ISettingButton::select and IButton::click are called for radio button and check box controls.
The ISelectHandler is called when you call IButton::click. Calling ISettingButton::select does not cause an ISelectHandler to be called.
Constructors & DestructorOnly derived classes can construct objects of this class.
![]() |
protected:
ISelectHandler()
Derived classes call this default constructor to create objects of this class.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Event DispatchingThe 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 ISelectHandler object processes only selection events.
![]() |
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
If a selection event is received, this function calls the appropriate virtual function.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Event Processing FunctionsA select handler allows you to process a selection or enter action through its event-processing members. You should override at least one of these virtual functions in a derived class.
![]() |
protected:
virtual bool enter(IControlEvent& event)
Implemented by derived classes to process an enter action. An enter action is caused by the user double clicking on a button, double clicking or pressing the Enter key on a list box, container, or combination box, or selecting an item from the drop-down list box of a combination box.
For buttons, this function calls the function selected.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
virtual bool selected(IControlEvent& event)
Implemented by derived classes to process a selection action.
| 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