### ISpinHandler

  The ISpinHandler class processes spin events for objects of the following classes:

  - INumericSpinButton
  - ITextSpinButton
  - ISpinButton (obsolete)

  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.

~ISpinHandler

      public:
      virtual ~ISpinHandler()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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.

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.

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

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

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

  -     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)

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IHandler

  -     virtual IEventResult defaultProcedure(IEvent& event)

  -     virtual bool dispatchHandlerEvent(IEvent& event) = 0

#### Inherited Protected Data

  - None