type gr_grpbut =
{ gb_window : gr_window
; mutable gb_top : int
; mutable gb_left : int
; mutable gb_width : int
; mutable gb_height : int
; mutable gb_delta : int
; mutable gb_btwidth : int
; mutable gb_btheight : int
; mutable gb_dir : direction
; mutable gb_button : int
; mutable gb_name : melted_type vect
; mutable gb_callback : gr_grpbut -> event -> bool
}
;;
The object of type gr_grpbut is an area filled with buttons
with one pressed and the others released. All the buttons inside
the area have the same size, but can display a string, a bitmap, an
integer or a boolean.
The type gr_grpbut is the sum of the
following variables:
- the attached window (gb_window),
- the coordinates of upper left corner (gb_left,gb_top),
- the area's width (gb_width),
- the area's height (gb_height);
- the width (gb_btwidth) and the height (gb_btheight) of the
buttons,
- the distance between each button (gb_delta),
- the number of the pressed button (gb_button),
- the list of labels (gb_name),
- the filling direction, which can be horizontal
(gb_dir=Horizontal, Camlwin draws buttons line by line) or
vertical (gb_dir=Vertical, Camlwin draws row by row),
- the callback function, called when the pressed button
changes (gb_callback).
The functions linked to the gr_grpbut type are:
gr_draw_grpbut : gr_grpbut -> unit
- gr_draw_grpbut Grpbut draws the group of buttons Grpbut.
gr_draw_unfilled_grpbut : gr_grpbut -> unit
- gr_draw_unfilled_grpbut Grpbut draws only the outlines of all
the buttons of the group of buttons Grpbut.
gr_grpbut_managed : gr_grpbut -> event -> bool
- this is the function used by Camlwin to manage the button group
objects.