%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % examplescroll v1.0 % % Date: January 17, 1990 % Authors: % David G. Zawada % EAIS-VIS % Argonne National Laboratory % zawada@athens.ees.anl.gov % % David C. Mak % EAIS-VIS % Argonne National Laboratory % mak@athens.ees.anl.gov % % DualScrollBar.ps is the definition for a new subclass of % the SimpleScrollbar item. New features include % % --> Dual Scrolling is available, meaning that Up and Down % scrolling are both possible from either end of % the ScrollBar. % % --> Continuous Scrolling is possible by keeping any MouseButton % depressed within one of the ScrollButtons. % % --> Colorization is available via the /sethue method. % % --> Adjustable Thumb sizes are available via the /setrange % and /reshape methods. Through the use of these % methods, the size of the Thumb can reflect % what fraction of the scrolling list is currently % visible to the user. For examples of this % concept, look at applications which use scrollbars % and run under the SunView or NeXT environments. % % --> Scrollbar width can be adjustable. The smallest % width that aesthetically pleasing is 18. % % A simple example: % systemdict /DualScrollBar known not { (/DualScrollBar.ps) append run } if %Adjust path as necessary /win framebuffer /new DefaultWindow send def { 100 dup 400 dup reshape /items [ [ 1 0 0.1 0.5 0.1] 0 {} ClientCanvas /new DualScrollBar send dup /BarVertical? true put { 0.1 sethue 10 20 dup 300 reshape } 1 index send [ 1 0 0.1 0.5 0.5] 0 {} ClientCanvas /new DualScrollBar send dup /BarVertical? false put { 0.7 sethue 60 20 300 34 reshape } 1 index send ] def items forkitems pop /PaintClient { items paintitems } def totop map } win send