home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / mutt / popup.mut < prev    next >
Text File  |  1988-05-05  |  928b  |  33 lines

  1.     ; popup.mut : put a popup window on the screen
  2.     ; The window is transient - it goes away on redraw.
  3.     ; ME knows nothing about the window
  4.     ; C Durland
  5.  
  6. (string ztop 85 blanks 85)
  7. (int ulrow ulcol brow bcol)
  8.  
  9. (defun
  10.   popup-window (int row col width length) HIDDEN
  11.   {
  12.     (int j r)
  13.     (ulrow (brow (+ row 1)))(ulcol (bcol (+ col 1)))
  14.     (move-cursor row col)(puts "." (substr ztop 0 width) ".")
  15.     (for {(r ulrow)(j 0)} (< j length) {(+= j 1)(+= r 1)}
  16.     {
  17.       (move-cursor r col)
  18.       (puts "|" (substr blanks 0 width) "|")
  19.     })
  20.     (move-cursor r col)(puts "`" (substr ztop 0 width) "'")
  21.   }
  22.   wputs    (string msg) HIDDEN
  23.   {
  24.     (move-cursor brow bcol)(puts msg)
  25.     (+= brow 1)
  26.   }
  27.   MAIN
  28.   {
  29.     (ztop "--------------------------------------------------------------------------------")
  30.     (blanks "                                                                            ")
  31.   }
  32. )
  33.