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

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

#### 17.5.3 Counter Interaction

The user changes the value of the counter by keeping his mouse pressed on one of the buttons. Per default whenever the mouse is released and the counter value is changed the counter is returned to the application program or its callback is invoked.

In some applications you might want the counter to be returned to the application program (or the callback invoked) e.g., whenever the value changes and not only when the mouse is released. To this end use

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

where `when` can be either

`FL_RETURN_NONE`

  Never report or invoke callback.

`FL_RETURN_END_CHANGED`

  Return or invoke callback at end (mouse release) and only if the counter value is changed.

`FL_RETURN_CHANGED`

  Return or invoke callback whenever the counter value is changed. This is the default setting.

`FL_RETURN_END`

  Return or invoke callback at the end regardless if the counter value is changed or not.

`FL_RETURN_ALWAYS`

  Return or invoke callback when the counter value has changed or mouse button has been released.