%! % % This file is a product of Sun Microsystems, Inc. and is provided for % unrestricted use provided that this legend is included on all tape % media and as a part of the software program in whole or part. % Users may copy, modify or distribute this file at will. % % THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE % WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR % PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. % % This file is provided with no support and without any obligation on the % part of Sun Microsystems, Inc. to assist in its use, correction, % modification or enhancement. % % SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE % INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS FILE % OR ANY PART THEREOF. % % In no event will Sun Microsystems, Inc. be liable for any lost revenue % or profits or other special, indirect and consequential damages, even % if Sun has been advised of the possibility of such damages. % % Sun Microsystems, Inc. % 2550 Garcia Avenue % Mountain View, California 94043 % /NewsLineWin PicWindow dictbegin /ItemBarSize 25 def /CanWidth null def /CanHeight null def /ViewWidth null def /ViewHeight null def /Pic null def /PicArray null def /MBar null def /PageItem null def dictend classbegin /BorderLeft 16 def /BorderRight 16 def /BorderBottom 16 def /FrameLabel (NewsLine...) def /BorderSize 25 def /FontSize 18 def /FrameFont /Times-Roman findfont FontSize scalefont def /BorderTop BorderSize def /new { % canvaswidth canvasheight framebuffer /new super send begin /CanHeight exch def /CanWidth exch def currentdict end } def /destroy { EXIT /destroy super send } def /reshapeview { % x y w h -> - BorderBottom add BorderTop add ItemBarSize add exch BorderLeft add BorderRight add exch /reshape self send } def /reshape { % x y w h -> - /reshape super send /ViewWidth FrameWidth BorderLeft sub BorderRight sub def /ViewHeight FrameHeight BorderTop sub BorderBottom sub ItemBarSize sub def Pic null eq { /Pic ClientCanvas CanWidth CanHeight /new Picture send def /PicArray [ Pic ] def PicArray /setpicarray super send } if MBar null eq { /MBar 5 ViewHeight 2 add 5 ClientCanvas /new MenuBar send def } if PageItem null eq { /PageItem (Page Number: ) [ 1 2 1 ] /Right { ItemValue new_page } ClientCanvas 200 0 /new SliderItem send dup /ItemFrame 1 put 300 ViewHeight 2 add /move 3 index send store } if 0 0 ViewWidth ViewHeight /reshape Pic send } def /addmenu { % menu label proc -> - /addmenu MBar send } def /reshapebuffer { % w h -> - Change the size of the buffer /reshapebuffer Pic send } def /PaintClient { % - -> - /paint MBar send /paint PageItem send /PaintClient super send } def /map { % - -> - /map super send [ PicArray aload pop PageItem ] forkitems pop /activate MBar send } def /getpic { % - -> pic Pic } def /ClientMenu [ (Next Page) { NEXT } (Previous Page) { PREV } % (Redisplay) { REDIS } (First Page) { FIRST } (Last Page) { LAST } ] /new DefaultMenu send def /setcurrent { % int -> - PageItem /ItemValue 2 index put pop /paint PageItem send } def /setminmax { % int int -> - % This should be a method in SliderItem { /SliderMax exch def /SliderMin exch def /ItemValue SliderMin def /SliderZone SliderMax SliderMin 3 div def /Scale ObjectWidth SliderWidth sub SliderMax SliderMin sub div def } PageItem send /paint PageItem send } def classend def