(FILECREATED " 5-Sep-85 11:57:20" {ERIS}<LISPCORE>SOURCES>DSKDISPLAY.;7 7373 changes to: (FNS DSKDISPLAY) previous date: " 6-Aug-85 14:12:06" {ERIS}<LISPCORE>SOURCES>DSKDISPLAY.;6) (* Copyright (c) 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT DSKDISPLAYCOMS) (RPAQQ DSKDISPLAYCOMS ((DECLARE: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP) LOCALFILE)) (DECLARE: (LOCALVARS . T)) (FNS DSKDISPLAY VOLUMEDISPLAY \DSKDISPLAY.BUTTONEVENTFN \DSKDISPLAY.UPDATE \DSKDISPLAY.CREATE.WINDOW \DSKDISPLAY.DESTROY.WINDOW \DSKDISPLAY.REPAINTFN \DSKDISPLAY.RESHAPEFN) (GLOBALVARS \DSKDISPLAY.FONT \DSKDISPLAY.BOLD \DSKDISPLAY.STATE \DSKDISPLAY.WINDOW DSKDISPLAY.POSITION) (INITVARS (\DSKDISPLAY.FONT (FONTCREATE (QUOTE GACHA) 10 (QUOTE MRR))) (\DSKDISPLAY.BOLD (FONTCREATE (QUOTE GACHA) 10 (QUOTE BRR))) (DSKDISPLAY.POSITION (CREATE POSITION XCOORD ← 100 YCOORD ← 50)) (\DSKDISPLAY.STATE (QUOTE CLOSED)) (\DSKDISPLAY.WINDOW NIL)))) (DECLARE: EVAL@COMPILE DONTCOPY (FILESLOAD (LOADCOMP) LOCALFILE) ) (DECLARE: (DECLARE: DOEVAL@COMPILE DONTCOPY (LOCALVARS . T) ) ) (DEFINEQ (DSKDISPLAY (LAMBDA (newState) (* ejs: " 5-Sep-85 11:55") (* * Returns the old state of the file system display window. If newState is one of {ON, OFF, CLOSED}, sets this to be the new state: ON means updates continuously, OFF means updates only when buttoned, CLOSED means the display window is indeed closed.) (SELECTQ (MACHINETYPE) ((DANDELION DOVE) (if (\PFEnsureInitialized) then (LET ((oldState \DSKDISPLAY.STATE)) (SELECTQ newState ((ON OFF) (SETQ \DSKDISPLAY.STATE newState) (\DSKDISPLAY.CREATE.WINDOW) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE TITLE) (CONCAT "Local File System Display: " \DSKDISPLAY.STATE)) (REDISPLAYW \DSKDISPLAY.WINDOW)) (CLOSED (SETQ \DSKDISPLAY.STATE newState) (\DSKDISPLAY.DESTROY.WINDOW)) NIL) oldState))) NIL))) (VOLUMEDISPLAY (LAMBDA (newState) (* edited: " 4-Jul-85 05:05") (* * stub for backward compatibility.) (DSKDISPLAY newState))) (\DSKDISPLAY.BUTTONEVENTFN (LAMBDA (W) (* hts: "30-Jan-85 15:26") (* * Button event function to allow user to change file system display state with the mouse.) (if (MOUSESTATE LEFT) then (\DSKDISPLAY.REPAINTFN W) elseif (MOUSESTATE MIDDLE) then (DSKDISPLAY (MENU (create MENU ITEMS ←(QUOTE (ON OFF CLOSED)))))))) (\DSKDISPLAY.UPDATE (LAMBDA NIL (* hts: "29-Jan-85 18:53") (* * IF the local file system window stuff is set for continuous update, and there is a valid display window, update the display window.) (if (AND (EQ \DSKDISPLAY.STATE (QUOTE ON)) (WINDOWP \DSKDISPLAY.WINDOW)) then (REDISPLAYW \DSKDISPLAY.WINDOW)))) (\DSKDISPLAY.CREATE.WINDOW (LAMBDA NIL (* hts: " 6-Aug-85 14:11") (* * Creates the local file system display window.) (if (NOT (WINDOWP \DSKDISPLAY.WINDOW)) then (SETQ \DSKDISPLAY.WINDOW (CREATEW (create REGION WIDTH ← 300 HEIGHT ←(IPLUS 45 (ITIMES 15 (LENGTH ( \PFGetVols)))) LEFT ←(fetch (POSITION XCOORD) of DSKDISPLAY.POSITION) BOTTOM ←(fetch (POSITION YCOORD) of DSKDISPLAY.POSITION)) "1108 Local File System")) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE REPAINTFN) (FUNCTION \DSKDISPLAY.REPAINTFN)) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE RESHAPEFN) (FUNCTION (LAMBDA (W) (\DSKDISPLAY.REPAINTFN W) (LET ((REG (WINDOWPROP W (QUOTE REGION)))) (SETQ DSKDISPLAY.POSITION (create POSITION XCOORD ←(fetch (REGION LEFT) of REG) YCOORD ←(fetch (REGION BOTTOM) of REG))))))) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE MOVEFN) (FUNCTION (LAMBDA (W POS) (SETQ DSKDISPLAY.POSITION POS)))) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE BUTTONEVENTFN) (FUNCTION \DSKDISPLAY.BUTTONEVENTFN)) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE CLOSEFN) (FUNCTION (LAMBDA NIL (DSKDISPLAY (QUOTE CLOSED)))))))) (\DSKDISPLAY.DESTROY.WINDOW (LAMBDA NIL (* edited: " 4-Jul-85 02:35") (* * Purges the local file system display window) (if (AND (WINDOWP \DSKDISPLAY.WINDOW) (NULL (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE CLOSING)))) then (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE CLOSING) T) (CLOSEW \DSKDISPLAY.WINDOW) (SETQ \DSKDISPLAY.WINDOW NIL)))) (\DSKDISPLAY.REPAINTFN (LAMBDA (W) (* edited: " 4-Jul-85 03:08") (CLEARW W) (printout W .FONT \DSKDISPLAY.FONT "Default directory: " .FONT \DSKDISPLAY.BOLD (DIRECTORYNAME (QUOTE {DSK})) .FONT \DSKDISPLAY.FONT T "Logical Volumes:" T) (for vol in (\PFGetVols) do (printout W .FONT \DSKDISPLAY.FONT (if (\LFDirectoryP vol) then "* " else " ") (\PFVolumeNumber vol) " " .FONT \DSKDISPLAY.BOLD (fetch (LogicalVolumeDescriptor LVlabel) of vol) " " .FONT \DSKDISPLAY.FONT .FR 22 (fetch ( LogicalVolumeDescriptor volumeSize) of vol) " Pages" .FR 35 (fetch (LogicalVolumeDescriptor freePageCount) of vol) " Free" T)))) (\DSKDISPLAY.RESHAPEFN (LAMBDA (W) (* hts: " 6-Aug-85 14:11") (* * Takes care of the necessary glop after reshaping the display window: redisplays it and remembers the new position.) (\DSKDISPLAY.REPAINTFN W) (LET ((REG (WINDOWPROP W (QUOTE REGION)))) (SETQ DSKDISPLAY.POSITION (create POSITION XCOORD ←(fetch (REGION LEFT) of REG) YCOORD ←(fetch (REGION BOTTOM) of REG)))) NIL)) ) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS \DSKDISPLAY.FONT \DSKDISPLAY.BOLD \DSKDISPLAY.STATE \DSKDISPLAY.WINDOW DSKDISPLAY.POSITION) ) (RPAQ? \DSKDISPLAY.FONT (FONTCREATE (QUOTE GACHA) 10 (QUOTE MRR))) (RPAQ? \DSKDISPLAY.BOLD (FONTCREATE (QUOTE GACHA) 10 (QUOTE BRR))) (RPAQ? DSKDISPLAY.POSITION (CREATE POSITION XCOORD ← 100 YCOORD ← 50)) (RPAQ? \DSKDISPLAY.STATE (QUOTE CLOSED)) (RPAQ? \DSKDISPLAY.WINDOW NIL) (PUTPROPS DSKDISPLAY COPYRIGHT ("Xerox Corporation" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (1247 6811 (DSKDISPLAY 1257 . 2266) (VOLUMEDISPLAY 2268 . 2469) ( \DSKDISPLAY.BUTTONEVENTFN 2471 . 2916) (\DSKDISPLAY.UPDATE 2918 . 3347) (\DSKDISPLAY.CREATE.WINDOW 3349 . 4915) (\DSKDISPLAY.DESTROY.WINDOW 4917 . 5391) (\DSKDISPLAY.REPAINTFN 5393 . 6273) ( \DSKDISPLAY.RESHAPEFN 6275 . 6809))))) STOP