VSelectScaleValue


 
Name
  VSelectScaleValue - selects a value on a multi-resolution scale in the 
dialog window.
 
Synopsis
  VSelectScaleValue(event, label, update, args, value)
  XEvent *event;
  char *label;
  int (*update)();
  void *args;
  float *value;                         /*RETURN*/
 
Description
  VSelectScaleValue selects a value on a multi-resolution scale in the dialog
window if the LEFT button is pressed and the cursor is within the scale.
The cursor remains confined to the scale window. By pressing the LEFT button,
one can step to a higher resolution scale; by pressing the MIDDLE button
to a lower resolution scale; and by pressing the RIGHT button one can quit
the scale selection process. When the X cursor moves along the horizontal
direction, a corresponding value is displayed in the box at the upper right
corner of the scale and the corresponding cursor (vertical bar) is displayed
on the scale. VSelectScaleValue computes the resolution steps for the scale;
if the resolution step specified is higher than the highest resolution
defined by VSelectScaleValue, then VSelectScaleValue assigns the current
resolution step as the highest one. The same applies for lowest resolution.
The width of the high resolution scale is half of the scale width.
VSelectScaleValue lets the user pass a function to be executed when the scale
is updated. VCheckScaleEvents should be called in the function passed as
update to check whether an event is waiting in the event queue. If there is an
event in the queue, update should be interrupted. 
 
Return Value
  0 - work successfully.
  204 - the type of event is invalid.
  205 - the window in which the event happens is invalid.
  214 - the dialog window is not displayed at the front the image window.
  218 - the specified scale is not displayed in the dialog window.
  244 - the scale does not exist.
 
Parameters
  event - specifies the current event removed from the event queue.
  label - specifies a scale label which is to be used.
  update - user-defined function to determine what action should be taken
        when the scale value is changed; arguments are (*value, args); 
	return value is ignored.
  args - specifies the second argument that is passed to the update procedure.
  value - returns the value from the scale.
 
Side Effects
  Extraneous events will be removed from the queue.
 
Entry Conditions
  The scale should be displayed. If the label or value is NULL, or 
VCreateColormap has not been called, VSelectScaleValue prints an error message
to the standard error stream, produces a core dump file and exits from the
current process.
 
Related Functions
VDisplayScale, VEraseScale, VGetScaleInformation, VSetScaleInformation, VGetScaleLayoutInformation, VCheckScaleEvents.