ISpinHandler

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:

true
The spin event requires no additional processing. Do not pass it to another handler.
false
The spin event requires additional processing. Pass the spin event to the next handler for additional processing, as follows:
  • If there is another handler for the spin button, pass the spin event to the next handler.
  • If this is the last handler for the spin button, call IWindow::dispatch to dispatch the spin event to the spin button's owner window.
  • If this is the last handler for the owner window, call IWindow::defaultProcedure to process the spin event.
    Note: There is no defaultProcedure in the AIX environment.


ISpinHandler - Member Functions and Data by Group

Constructors & Destructor

The 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.


[view class]
~ISpinHandler
public:
virtual ~ISpinHandler()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ISpinHandler
protected:
ISpinHandler()

Used by derived classes to construct objects of this class. This is the default constructor and accepts no parameters.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Dispatching

Event-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.


[view class]
dispatchHandlerEvent
protected:
virtual bool dispatchHandlerEvent(IEvent& event)

If a spin event is received, the appropriate virtual function is called.

event
An IEvent object constructed as a result of a user or library action.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Event Processing

Event-processing members must be supplied to process a spin event. You can override these virtual members in a derived class.


[view class]
arrowDown
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.

event
An IControlEvent object constructed as a result of a user action.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
arrowUp
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.

event
An IControlEvent object constructed as a result of a user action.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
spinEnded
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.

event
An IControlEvent object constructed as a result of a user action.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


ISpinHandler - Inherited Member Functions and Data

Inherited Public Functions

IHandler

Inherited Public Data

Inherited Protected Functions

IHandler

Inherited Protected Data