(DEFINE-FILE-INFO READTABLE "INTERLISP" PACKAGE "INTERLISP") (FILECREATED "13-Jul-99 10:05:38" {DSK}medley3.5>lispusers>WDWHACKS.;3 6218 changes to%: (VARS WDWHACKSCOMS) (FNS Filebrowsericide) previous date%: " 1-Dec-96 21:15:33" {DSK}medley3.5>lispusers>WDWHACKS.;2) (PRETTYCOMPRINT WDWHACKSCOMS) (RPAQQ WDWHACKSCOMS [(FNS CLOSE.WINDOWS.IN.REGION SHAPEW.AND.SAVE SHAPEW.POP SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW Filebrowsericide Inspecticide SEditicide) (DECLARE%: DONTEVAL@LOAD DOCOPY (P (RPLACA (CDR (ASSOC 'Shape WindowMenuCommands)) ''SHAPEW.AND.SAVE) [RPLACD (CDDR (ASSOC 'Shape WindowMenuCommands)) (COPY '((SUBITEMS ("PopShape" 'SHAPEW.POP "Return a reshaped window to its original form."] (SETQ WindowMenu NIL) (SETQ BackgroundMenuCommands (CONS [COPY '("SlamWs" '(CLOSE.WINDOWS.IN.REGION) "Close all the windows in a region of the screen." (SUBITEMS ("Inspectors" '(Inspecticide) "Close only inspector windows.") ("SEdit" '(SEditicide) "Close only SEdit windows.") ("Filebrowsers" '(Filebrowsericide) "Close only file browser windows."] BackgroundMenuCommands)) (SETQ BackgroundMenu NIL) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW]) (DEFINEQ (CLOSE.WINDOWS.IN.REGION (LAMBDA (R) (* edited%: "12-May-85 22:27") (OR R (SETQ R (GETREGION))) (for W in (OPENWINDOWS) do (COND ((INTERSECTREGIONS R (WINDOWPROP W (QUOTE REGION))) (CLOSEW W))))) ) (SHAPEW.AND.SAVE (LAMBDA (WINDOW NEWREGION) (* Jeff.Shrager "18-Mar-86 18:01") (WINDOWPROP WINDOW (QUOTE OLD.SHAPE) (WINDOWREGION WINDOW)) (SHAPEW WINDOW NEWREGION)) ) (SHAPEW.POP (LAMBDA (WINDOW) (* Jeff.Shrager "18-Mar-86 18:01") (COND ((WINDOWPROP WINDOW (QUOTE OLD.SHAPE)) (SHAPEW WINDOW (WINDOWPROP WINDOW (QUOTE OLD.SHAPE) (WINDOWREGION WINDOW)))))) ) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW (LAMBDA NIL (* Jeff.Shrager "18-Mar-86 18:48") (* * This is the universe's worst known hack. Whoever wrote ATTACHEDWINDOW put hard constants into the ATTACHWINDOW fn which get inserted into the PASSTOMAINCOMS prop of attached windows. This should be a var so that we can tell it what messages to pass or not in a general case. This function creates an attached window and (you'll love this) smashes the prop's value so that the const in the ATTACHWINDOW function is smashed so that everything works pretty generally. Yuko!!!) (LET ((TEMPWINDOW (CREATEW (QUOTE (0 0 10 10)))) MAINWINDOW) (ATTACHWINDOW TEMPWINDOW (SETQ MAINWINDOW (CREATEW (QUOTE (0 0 10 10)))) (QUOTE TOP)) (RPLACD (WINDOWPROP TEMPWINDOW (QUOTE PASSTOMAINCOMS)) (APPEND (COPY (QUOTE (SHAPEW.POP SHAPEW.AND.SAVE))) (CDR (WINDOWPROP TEMPWINDOW (QUOTE PASSTOMAINCOMS))))) (CLOSEW TEMPWINDOW) (CLOSEW MAINWINDOW))) ) (Filebrowsericide [LAMBDA NIL (* ; "Edited 13-Jul-99 10:05 by rmk:") (FOR W IN (OPENWINDOWS) WHEN (AND (EQ 'TB.REPAINTFN (WINDOWPROP W 'REPAINTFN)) (WINDOWPROP W 'FILEBROWSER)) DO (CLOSEW W]) (Inspecticide [LAMBDA NIL (* ; "Edited 1-Dec-96 20:51 by rmk:") (* ; "Edited 18-Feb-88 09:48 by Rao") (for w in (OPENWINDOWS) when (OR [AND (EQ 'INSPECTW.REPAINTFN (WINDOWPROP w 'REPAINTFN)) (STRPOS "Inspect" (WINDOWPROP w 'TITLE] (WINDOWPROP w 'INSPECTWINDOW)) do (CLOSEW w]) (SEditicide [LAMBDA NIL (* ; "Edited 1-Dec-96 21:15 by rmk:") (* ; "Edited 18-Feb-88 09:48 by Rao") (FOR W IN (OPENWINDOWS) WHEN (OR [AND (EQ 'SEDIT::REPAINTFN (WINDOWPROP W 'REPAINTFN)) (STRPOS "SEdit" (WINDOWPROP W 'TITLE] (WINDOWPROP W 'INSPECTWINDOW)) DO (CLOSEW W]) ) (DECLARE%: DONTEVAL@LOAD DOCOPY (RPLACA (CDR (ASSOC 'Shape WindowMenuCommands)) ''SHAPEW.AND.SAVE) [RPLACD (CDDR (ASSOC 'Shape WindowMenuCommands)) (COPY '((SUBITEMS ("PopShape" 'SHAPEW.POP "Return a reshaped window to its original form."] (SETQ WindowMenu NIL) (SETQ BackgroundMenuCommands (CONS [COPY '("SlamWs" '(CLOSE.WINDOWS.IN.REGION) "Close all the windows in a region of the screen." (SUBITEMS ("Inspectors" '(Inspecticide) "Close only inspector windows.") ("SEdit" '(SEditicide) "Close only SEdit windows.") ("Filebrowsers" '(Filebrowsericide) "Close only file browser windows."] BackgroundMenuCommands)) (SETQ BackgroundMenu NIL) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW) ) (PUTPROPS WDWHACKS COPYRIGHT (NONE)) (DECLARE%: DONTCOPY (FILEMAP (NIL (1868 4997 (CLOSE.WINDOWS.IN.REGION 1878 . 2079) (SHAPEW.AND.SAVE 2081 . 2252) ( SHAPEW.POP 2254 . 2447) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW 2449 . 3371) (Filebrowsericide 3373 . 3698) (Inspecticide 3700 . 4387) (SEditicide 4389 . 4995))))) STOP