NewControl:
PROC [
name: ROPE ¬ NIL, -- control label
type: ControlType ¬ vSlider, -- vSlider, hSlider, dial, function, contour, sketch
clientData: REF ANY ¬ NIL, -- client data
min: REAL ¬ 0.0, -- lower bounds of control
max: REAL ¬ 1.0, -- upper bounds of control
init: REAL ¬ 0.5, -- initial control setting
proc: ControlProc ¬ NIL, -- client callback whenever control is adjusted
report: BOOL ¬ TRUE, -- display numeric value of control
precision: NAT ¬ 3, -- number of decimal places for control value
row: INTEGER ¬ 0, -- see below
x, y: INTEGER ¬ 0, -- position wrt parent viewer (y is control bottom)
w, h: INTEGER ¬ 0 , -- dimension of control
textLocation: TextLocation ¬ [up, left], -- position of control name and value labels
dummy: BOOL ¬ FALSE, -- iff dummy, invisible and inactive
detents: DetentList ¬ NIL, -- see Detent, above
taper: SliderTaper ¬ lin, -- log, lin, or exp control taper
queue: BOOL ¬ FALSE,
values: RealSequence ¬ NIL, -- intial values if control is of type function
color: Color ¬ Imager.black, -- color of control
font: Font ¬ NIL, -- if other than default font (Tioga10)
clientUse: ATOM ¬ $None, -- for subsequent client reference
flavor: ATOM ¬ $Nil] -- wizards only
RETURNS [Control];
Return a control but do not allocate its viewer; viewer allocation is done by ControlViewer.
The controls are normally ordered by OuterViewer, from right to left, beginning new rows as needed; if row is non-zero, however, the control will appear in the specified row and all subsequent controls will follow it; 0 is the lowest row. If y is non-zero, however, the control will appear at the specified y value, regardless of the value of row.
If there are any detents, the taper is constrained to be linear.
If queue, then queue all down, up, and most recent held mouse events; otherewise, discard mouse events that occur during control.proc.
control.proc is called on mouse event within the control, or whenever a value is typed into the text display of the control, followed by a carriage-return. Clients should read the value of the control before executing a function, to ensure consistency with values shown in the text display that may have been typed by the user without a carriage-return.