The ControlSet structure provides facilities for managing sets
of controls, with associated information, by name.
Synopsis
signature CONTROL_SET
structure ControlSet : CONTROL_SET
Interface
type 'a control = 'a Controls.control
type ('a, 'b) control_set
val new : unit -> ('a, 'b) control_set
val member : (('a, 'b) control_set * Atom.atom) -> bool
val find : (('a, 'b) control_set * Atom.atom)
-> {ctl : 'a control, info : 'b} option
val insert : (('a, 'b) control_set * 'a control * 'b) -> unit
val remove : (('a, 'b) control_set * Atom.atom) -> unit
val infoOf : ('a, 'b) control_set -> 'a control -> 'b option
val listControls : ('a, 'b) control_set -> {ctl : 'a control, info : 'b} list
val listControls' : (('a, 'b) control_set * int) -> {ctl : 'a control, info : 'b} list
val app : ({ctl : 'a control, info : 'b} -> unit) -> ('a, 'b) control_set -> unit
val stringControls : 'a Controls.value_cvt -> ('a, 'b) control_set
-> (string, 'b) control_set
Description
type ('a, 'b) control_set-
The abstract type of control set, where the first type parameter is the value-type of the controls in the set and the second is the type of the information associated with each control.
val new : unit -> ('a, 'b) control_set-
new ()creates a new, empty, set of controls. val member : (('a, 'b) control_set * Atom.atom) -> bool-
member (ctlSet, name)returns true if there is a control with the given name in the set. val find : (('a, 'b) control_set * Atom.atom) -> {ctl : 'a control, info : 'b} option-
find (ctsSet, name)returnsSOME{ctl, info}when the controlctl, which has the namenameis in the set andinfois its associated information. Otherwise,NONEis returned. val insert : (('a, 'b) control_set * 'a control * 'b) -> unit-
insert (ctsSet, ctl, info)inserts the controlctlwith associated informationintointo the control set. val remove : (('a, 'b) control_set * Atom.atom) -> unit-
remove (ctlSet, name)removes the named control from the set (if it is present). val infoOf : ('a, 'b) control_set -> 'a control -> 'b option-
infoOf ctlSet ctlreturnsSOME info, whenctlis in the set with associated informationinfo. Ifctlis not in the set, thenNONEis returned. val listControls : ('a, 'b) control_set -> {ctl : 'a control, info : 'b} list-
listControls ctlSetreturns a list of the controls in the set ordered by priority. val listControls' : (('a, 'b) control_set * int) -> {ctl : 'a control, info : 'b} list-
listControls (ctlSet, level)returns a list of the controls in the set ordered by priority, but omits any controls with an obscurity level greater or equal tolevel. val app : ({ctl : 'a control, info : 'b} -> unit) -> ('a, 'b) control_set -> unit-
app f ctlSetapplies the functionfto the controls (and their associated information). The order in whichfis applied is unspecified. val stringControls : 'a Controls.value_cvt -> ('a, 'b) control_set -> (string, 'b) control_set-
stringControls cvt ctlSetreturns a set of string controls, where the controls in the new set are created by applying the value-convertercvtto the controls inctlSet. The associated information is preserved.