Next: , Previous: , Up: Menu Object   [Contents][Index]


23.2.3 Menu Interaction

When the menu appears the user can make a selection using the left mouse button or make no selection by clicking outside the menu (or by simply releasing the mouse button in case of a FL_PULLDOWN_MENU type menu. Normally when he makes a selection the menu object is returned by the interaction routines.

You can control the condition under which the menu object gets returned to the application by using the function

int fl_set_object_return(FL_OBJECT *obj, unsigned int when)

where when can have the following values

FL_RETURN_NONE

Never return the object or invoke its callback.

FL_RETURN_END_CHANGED

Return or invoke callback if end of interaction and selection of an item coincide (this is the default for all menu objects except those of type FL_TOUCH_MENU).

FL_RETURN_CHANGED

Return or invoke callback whenever an item is selected (this is the default for all menu objects of type FL_TOUCH_MENU).

FL_RETURN_END

Return or invoke callback on end of an interaction.

FL_RETURN_ALWAYS

Return (or invoke callback) whenever the interaction ends and/or an item is selected.