type gr_radio =
{ ra_window : gr_window
; mutable ra_left : int
; mutable ra_top : int
; mutable ra_state : bool
; mutable ra_name : string
; mutable ra_callback : gr_radio -> event -> bool
}
;;
The radio-buttons are buttons that toggle state each time
the user clicks on them.
The type gr_radio is composed of:
- the attached window (ra_window),
- the coordinates of lower left corner (ra_left,ra_top),
- the label string (ra_name),
- the state: the button is pressed (ra_state=true) or
released (ra_state=false),
- the callback function, called each time the button's state is
modified (ra_callback).
The functions linked with the gr_radio type are:
gr_draw_radio -> unit
- gr_draw_radio Rad draws the radio-button Rad.
gr_radio_managed : gr_radio -> event -> bool
- this is the function used by Camlwin to manage the radio- button
objects.