(FILECREATED "15-Feb-85 13:28:07" {PHYLUM}<STANSBURY>FASTLABEL>DSKDISPLAY.;10 6032 changes to: (FNS DSKDISPLAY \DSKDISPLAY.REPAINTFN \DSKDISPLAY.BUTTONEVENTFN \DSKDISPLAY.CREATE.WINDOW) (VARS DSKDISPLAYCOMS) previous date: "13-Feb-85 23:08:26" {PHYLUM}<STANSBURY>FASTLABEL>DSKDISPLAY.;9) (* Copyright (c) 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT DSKDISPLAYCOMS) (RPAQQ DSKDISPLAYCOMS [(DECLARE: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP) LFPILOTFILE)) (DECLARE: (LOCALVARS . T)) (FNS DSKDISPLAY \DSKDISPLAY.BUTTONEVENTFN \DSKDISPLAY.UPDATE \DSKDISPLAY.CREATE.WINDOW \DSKDISPLAY.DESTROY.WINDOW \DSKDISPLAY.REPAINTFN) (GLOBALVARS \DSKDISPLAY.FONT \DSKDISPLAY.BOLD \DSKDISPLAY.STATE \DSKDISPLAY.WINDOW) (INITVARS (\DSKDISPLAY.FONT (FONTCREATE (QUOTE GACHA) 10 (QUOTE MRR))) (\DSKDISPLAY.BOLD (FONTCREATE (QUOTE GACHA) 10 (QUOTE BRR))) (\DSKDISPLAY.STATE (QUOTE CLOSED)) (\DSKDISPLAY.WINDOW NIL)) (P (MOVD (QUOTE \DSKDISPLAY.UPDATE) (QUOTE \PFDsplyVolumes]) (DECLARE: EVAL@COMPILE DONTCOPY (FILESLOAD (LOADCOMP) LFPILOTFILE) ) (DECLARE: (DECLARE: DOEVAL@COMPILE DONTCOPY (LOCALVARS) ) ) (DEFINEQ (DSKDISPLAY [LAMBDA (newState) (* hts: "15-Feb-85 13:27") (* If newState = OFF, turns volume display window off; if ON, turns it on; if anything else, doesn't do anything. Returns old state (oneof {ON, OFF})) (SELECTQ (MACHINETYPE) [(DANDELION DOVE) (if (\PFEnsureInitialized) then (PROG ((oldState \DSKDISPLAY.STATE)) (SELECTQ newState (ON (* * Continuous update) (SETQ \DSKDISPLAY.STATE newState) (\DSKDISPLAY.CREATE.WINDOW) (REDISPLAYW \DSKDISPLAY.WINDOW)) (OFF (* * Update only when poked.) (SETQ \DSKDISPLAY.STATE newState) (\DSKDISPLAY.CREATE.WINDOW) (REDISPLAYW \DSKDISPLAY.WINDOW)) (CLOSED (* * Turn the whole mechanism off.) (SETQ \DSKDISPLAY.STATE newState) (\DSKDISPLAY.DESTROY.WINDOW)) NIL) (RETURN oldState] NIL]) (\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: "30-Jan-85 15:26") (* * 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 (fetch ( PhysicalVolumeDescriptor subVolumeCount) of \PhysVolumePage))) LEFT ← 100 BOTTOM ← 50) "1108 Local File System")) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE RESHAPEFN) (FUNCTION RESHAPEBYREPAINTFN)) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE REPAINTFN) (FUNCTION \DSKDISPLAY.REPAINTFN)) (WINDOWPROP \DSKDISPLAY.WINDOW (QUOTE BUTTONEVENTFN) (FUNCTION \DSKDISPLAY.BUTTONEVENTFN]) (\DSKDISPLAY.DESTROY.WINDOW [LAMBDA NIL (* hts: "29-Jan-85 18:27") (* * Purges the local file system display window) (if (WINDOWP \DSKDISPLAY.WINDOW) then (CLOSEW \DSKDISPLAY.WINDOW) (SETQ \DSKDISPLAY.WINDOW NIL]) (\DSKDISPLAY.REPAINTFN [LAMBDA (W) (* hts: "30-Jan-85 15:42") (WINDOWPROP W (QUOTE TITLE) (CONCAT "Local File System Display: " \DSKDISPLAY.STATE)) (CLEARW W) (printout W .FONT \DSKDISPLAY.FONT "Physical Volume: " .FONT \DSKDISPLAY.BOLD (fetch (PhysicalVolumeDescriptor PVlabel) of \PhysVolumePage) .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]) ) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS \DSKDISPLAY.FONT \DSKDISPLAY.BOLD \DSKDISPLAY.STATE \DSKDISPLAY.WINDOW) ) (RPAQ? \DSKDISPLAY.FONT (FONTCREATE (QUOTE GACHA) 10 (QUOTE MRR))) (RPAQ? \DSKDISPLAY.BOLD (FONTCREATE (QUOTE GACHA) 10 (QUOTE BRR))) (RPAQ? \DSKDISPLAY.STATE (QUOTE CLOSED)) (RPAQ? \DSKDISPLAY.WINDOW NIL) (MOVD (QUOTE \DSKDISPLAY.UPDATE) (QUOTE \PFDsplyVolumes)) (PUTPROPS DSKDISPLAY COPYRIGHT ("Xerox Corporation" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (1309 5508 (DSKDISPLAY 1319 . 2403) (\DSKDISPLAY.BUTTONEVENTFN 2405 . 2844) ( \DSKDISPLAY.UPDATE 2846 . 3273) (\DSKDISPLAY.CREATE.WINDOW 3275 . 4167) (\DSKDISPLAY.DESTROY.WINDOW 4169 . 4487) (\DSKDISPLAY.REPAINTFN 4489 . 5506))))) STOP