Next: , Previous: , Up: Part III Button-like Objects   [Contents][Index]


16.2 Button Types

The following types of buttons are available:

FL_NORMAL_BUTTON

Returned to fl_do_forms() (or having its callback funtion invoked) when released.

FL_PUSH_BUTTON

Stays pushed until user pushes it again.

FL_MENU_BUTTON

Returned when pushed, useful e.g., for opening a popup when pushed.

FL_TOUCH_BUTTON

Returned at regulat intervals as long as the user pushes it.

FL_RADIO_BUTTON

Push button that switches off other radio buttons.

FL_HIDDEN_BUTTON

Invisible normal button.

FL_INOUT_BUTTON

Returned both when pushed and when released.

FL_RETURN_BUTTON

Like a normal button but also reacts to the <Return> key.

FL_HIDDEN_RET_BUTTON

Invisible return button.

Except for the FL_HIDDEN_BUTTON and FL_HIDDEN_RET_BUTTON, which are invisible, there’s not much visible indication of the button type but the function is quite different. For each of the types the button gets pushed down when the user presses the mouse on top of it. What actually happens when the user does so then depends on the type of the button. An FL_NORMAL_BUTTON, FL_TOUCH_BUTTON and FL_INOUT_BUTTON gets released when the user releases the mouse button. Their difference lies in the moment at which the interaction routines return them (see below). A FL_PUSH_BUTTON remains pushed and is only released when the user pushes it again. A FL_RADIO_BUTTON is a push button with the following extra property: whenever the user pushes a radio button, all other pushed radio buttons in the same form (or in the same group) are released. In this way the user can make its choice among several possibilities. A FL_RETURN_BUTTON behaves like a normal button, but it also reacts when the <Return> key on the keyboard is pressed. When a form contains such a button (of course there can only be one) the <Return> key can no longer be used to move between input fields. For this the <Tab> key must be used.

A FL_HIDDEN_BUTTON behaves like a normal button but is invisible. A FL_HIDDEN_RET_BUTTON is like a hidden button but also reacts to <Return> key presses.


Next: , Previous: , Up: Part III Button-like Objects   [Contents][Index]