The ISpinHandler class processes spin events for objects of the following classes:
ISpinHandler handles events resulting from a user interacting with a spin button control, such as when the user selects the down arrow in a spin button. When the spin handler receives a spin event, it creates an IControlEvent object and routes that object to the appropriate ISpinHandler virtual function.
You can create a handler derived from ISpinHandler and attach it to a spin button or to the spin button's owner window by calling IHandler::handleEventsFor to pass the spin button or owner window to the spin handler. By overriding the virtual functions supplied by ISpinHandler, you can provide customized processing of a spin event.
The return value from the virtual functions specifies whether the spin event is passed on for additional processing, as follows:
Constructors & DestructorThe only way to create objects of this class is from a derived class. To enforce this, the only constructor we provide for this class is protected. This default constructor can be used by derived classes to create objects of this class. You can destruct objects of this class.
![]() |
protected:
ISpinHandler()
Used by derived classes to construct objects of this class. This is the default constructor and accepts no parameters.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Event DispatchingEvent-dispatching members evaluate an event to determine if it is appropriate for this handler object to process it. If it is, it calls the virtual function used to process the event.
![]() |
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
If a spin event is received, the appropriate virtual function is called.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Event ProcessingEvent-processing members must be supplied to process a spin event. You can override these virtual members in a derived class.
![]() |
protected:
virtual bool arrowDown(IControlEvent& event)
Implemented by derived classes to process the pressing of the down arrow key or clicking on the down arrow of the spin button.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
virtual bool arrowUp(IControlEvent& event)
Implemented by derived classes to process the pressing of the up arrow key or clicking on the up arrow of the spin button.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
virtual bool spinEnded(IControlEvent& event)
Implemented by derived classes to process the release of an arrow key or the mouse button while spinning the spin button.
| 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