%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % BtolPopup.ps 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 % % PopupItem.ps is the class definition for a new type % of cycle item. Given a list of items, a PopupItem % allows for the selection of one of the items in the % list through a popup menu that it displays when it % is clicked on. The function of a PopupItem is best % described by an example, so here's one... % /win framebuffer /new DefaultWindow send def { 20 dup 500 350 reshape /items [ [ (Popup Items) (by) (Dave Zawada) (and) (Dave Mak) (Argonne National Laboratory) ] {} ClientCanvas 0 0 /new BtolPopup send { /ItemLabelFont /Times-Roman findfont 32 scalefont def /ItemFont /Helvetica findfont 32 scalefont def 20 270 move % move to specific location; let PopupItem handle scaling 0 sethue } 1 index send [ (Option1) (Option2) (Option3) (Option4) (Option5) ] {} ClientCanvas 0 0 /new BtolPopup send { /ItemLabelFont /Times-Roman findfont 18 scalefont def /ItemFont /Times-Roman findfont 14 scalefont def 20 190 150 0 reshape % scale and move yourself if desired 0.3 sethue } 1 index send [ (Btol version 1.3) (coming) (SOON!!!) (watch news-makers) ] {} ClientCanvas 0 0 /new BtolPopup send 20 150 /move 3 index send true /setcycleon 2 index send ] def /PaintClient { 0.7 0.7 0.7 rgbcolor fillcanvas items paintitems } def items forkitems pop totop map } win send