Slider float control that allows the user to specify units.
For example: 1", 2.3cm etc. The constrainInput() method must be
called before attempting to get the input with
getData() or
getFloatValue(). A few notes about the class: 1. Information is
stored in default units(such as cms or meters) 2.
getData() and
SetValue() will return or set information in default units 3.
getFloatValue() will return information in current units such
as inches, feet etc. 4.
setLengthUnits() includes a boolean parameter which will force
the updating of the field to current units Constraining is a bit
complicated since there are several cases: a) If the user enters:
101 We take the value to be in current units and constrain based on
the unit less min and max b) If the user enters 10.5 cm, we
constrain after the enter key has been hit Example code is provided
at the end of this module.