This is version 1.4 of the floating-point scale widget, suitable for
use with Tk versions 3.3 to 3.6.  Version 1.4 includes a -variable
option, thanks to Henning Schulzrinne (hgs@research.att.com).

This compressed tar file contains the source for a scale widget which
uses floating-point values rather than integers.  If you wish to
include the floating-point scale widget in `wish', you can do this
using the file fscale.patch to patch your Makefile.in and tkAppInit.c
as follows:

	patch <fscale.patch
	./configure	[ any site-specific switches here ]
	make

This will add a "fscale" command to wish.  If you wish to replace the
standard scale widget with the floating-point scale widget, just
change the string "fscale" in tkAppInit.c to "scale".  The default
behaviour of the floating-point scale should be completely compatible
with the integer scale; I would be interested to hear details of any
situations where it isn't.

If you have already installed other extensions to wish, the patch may
have problems, requiring hand-editing of Makefile.in and/or
tkAppInit.c.  fscale.patch details the necessary changes, which are
quite minimal.

If you have some other application within which you want to use the
floating-point scale, you will need to compile tkFScale.c and link it
with your application, and arrange for a command to be bound to the
procedure Tk_FScaleCmd.  You could use code something like the
following:

    extern int Tk_FScaleCmd _ANSI_ARGS_((ClientData clientData,
		Tcl_Interp *interp, int argc, char **argv));


	Tcl_CreateCommand(interp, "fscale", Tk_FScaleCmd, (ClientData) w,
			  (void (*)()) NULL);


The floating-point scale widget accepts all of the options that the
integer scale does, plus two more: `-resolution' and `-digits'.  The
`-resolution' option sets the widget's resolution value.  The widget
rounds all values to multiples of the resolution value.  The default
value is 1, which gives the same behaviour as an integer scale widget.
A resolution value of 0 disables the rounding and gives the same
behaviour as old versions of my floating-point scale widget.

The `-digits' option controls how many significant digits are shown on
the widget.  The default value is 0, which causes the widget to choose
a suitable number of digits based on the resolution, the span of
values covered by the scale, and its length in pixels.

A man page describing the widget is in doc/fscale.n.

Paul Mackerras
Dept. Computer Science,
Australian National University.
paulus@cs.anu.edu.au
