Numeric scrollers

VBTkit contains a VBT that can be used to change a numeric value. It is similar to NumericVBT in that the value can be restricted to some minimum and maximum. But instead of a type-in field, the value is changed by dragging an indicator (called a stripe) toward one extreme or the other. Clicking the left or right mouse button moves the stripe one step. Holding the mouse button down causes continuous scrolling. Clicking the middle mouse button causes the top of the stripe to move to the position of the cursor (this is called thumbing). Holding the middle button down causes continuous thumbing.

A ScrollerVBT can be created as follows:

NEW(ScrollerVBT.T).init(axis, min, max, colors, step, thumb)
where axis makes the scroller either horizontal or vertical, min and max re the extreme integer values of the scroller, colors is a PaintOp.ColorQuad, step is the amount to change while continuously scrolling, and thumb governs the size of the stripe (the default size of 0 is usually the right choice). The program Scroll.m3 uses three numeric scrollers to keep track of degrees, minutes, and seconds in the range from -180 to 180 degrees. Actually, since the three scrollers are independent, the maximum value is 180 degrees 59 minutes and 59 seconds. Likewise the minimum value is less than $-180$. The following images shows two views of the application.