home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / gprocs / win.icn < prev    next >
Text File  |  2001-05-02  |  1KB  |  55 lines

  1. ############################################################################
  2. #
  3. #    File:     win.icn
  4. #
  5. #    Subject:  Procedures to open bare-bones window
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     May 2, 2001
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  These procedures are provided as quick-and-dirty ways to get a
  18. #  nominal window as, for example, when testing.
  19. #
  20. #  win() causes error termination if a window can't be opened.
  21. #  winf(), on the other hand, just fails.
  22. #
  23. ############################################################################
  24. #
  25. #  Requires:  Version 9 graphics
  26. #
  27. ############################################################################
  28. #
  29. #  Links:  wopen
  30. #
  31. ############################################################################
  32.  
  33. link wopen
  34.  
  35. procedure win(width, height)
  36.  
  37.    /width := 500
  38.    /height := 500
  39.  
  40.    return WOpen("size=" || width || "," || height) |
  41.       stop("*** can't open window")
  42.  
  43.    return
  44.  
  45. end
  46.  
  47. procedure winf(width, height)
  48.  
  49.    /width := 500
  50.    /height := 500
  51.  
  52.    return WOpen("size=" || width || "," || height) | fail
  53.  
  54. end
  55.