[comp.sys.amiga.tech] Prop Gadg Proposal

ajk@goanna.oz (Alan Kent) (07/07/89)

This may have been suggested before, I have not read these groups for
a long time. I also dont know if its already in 1.2/1.3.

PROPOSAL:
How about a new proportional gadget in which instead of having a value
of 0x0000 to 0xffff, allow the user to specify the from and to range
(or even just 0 to n). Intuition would then scale the values to what
ever range it needed to draw the gadget. The gadgets can look and behave
exactly the same as they do now. The PotSize(?) would also be specified
in units of 0 to n.

WHY:
My first and main reason is simply because its so much easier to use.
The second reason is with the current approach it just is not possible
to get a gadget that will exactly scroll through any size set of values
(e.g. a file requester will come up with different numbers of values
based on the number of files in the directory). This is due to rounding
problems with the integer arithmetic. I have seen a number of bits of
code that people say work, but I have managed to get ALL of them at
some time either to display the last line of one page at the top of the
next page, or worse, not display a line because it skipped too much.
Its also a pain to try and rescale the values you get back to a number
that is useful to the program. 99% of the cases you use a prop gadget,
you have a known range of values you want to scroll through - e.g. an
array of file names.

If you could specify 0 to n, you would have to be able to dynamically
change the n value, but this should not be too hard.

There are a number of other changes that would be nice (e.g. automatic
arrows at the end of proportional gadgets), but the proposal as above
should be fairly simple to implement (and therefore more likely to
actually get done). The existing gadget would become just a special
case where n was set to 0xffff (you would have to keep the existing
interface however so old programs didnt break).

Dr. Alan Kent
Dept. of Comp. Sci, RMIT, 	  ACSnet: ajk@goanna.cs.rmit.oz.au
GPO BOX 2476 V,                   ARPA:ajk%goanna.cs.rmit.oz.au@uunet.uu.net
Melbourne, 3001 		  CSNET: ajk%goanna.cs.rmit.oz.au@australia
AUSTRALIA                         UUCP: ...!uunet!goanna.cs.rmit.oz.au!ajk