Spinner Interaction (XForms (Forms Library) - Version 1.2 (Rev. 4) A Graphical User Interface Toolkit for X)

Next: Other Spinner Routines, Previous: Spinner Types, Up: Spinner Object [Contents][Index]

#### 17.6.3 Spinner Interaction

The user can change the value of a spinner in two ways. She can either edit the value in the spinner directly (exactly the same as for an integer or floating point input object (Part III Input Objects) or by clicking on one of the buttons that will increment or decrement the value.

Per default the spinner object gets returned to the application (or the associated callback is called) whenever the value changed and the interaction seems to have ended. If you want it returned under different circumstances use the function

    void fl_set_object_return(FL_OBJECT *obj, unsigned int when);

where the parameter `when` can be one of the four values

`FL_RETURN_NONE`

  Never return or invoke callback.

`FL_RETURN_END_CHANGED`

  Return or invoke callback at end of interaction (when either the input field loses the focus or one of the buttons was released) and the spinner’s value changed during the interaction.

`FL_RETURN_CHANGED`

  Return or invoke callback whenever the spinner’s value changed. This is the default.

`FL_RETURN_END`

  Return or invoke callback at end of interaction regardless of the spinner’s value having changed or not.

`FL_RETURN_ALWAYS`

  Return or invoke callback whenever the value changed or the interaction ended.