home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls074c.sunsparc.Z / tls074c.sunsparc / lib / vtcl / examples / info.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  1.5 KB  |  45 lines

  1. #!/bin/vtcl
  2. # ---------------------------------------------------------------------
  3. # Copyright 1994 by SCO, Inc.
  4. # Permission to use, copy, modify, distribute, and sell this software
  5. # and its documentation for any purpose is hereby granted without fee,
  6. # provided that the above copyright notice appear in all copies and that
  7. # both that copyright  notice  and  this  permission  notice  appear  in
  8. # supporting documentation, and that the name  of  SCO  not  be used  in
  9. # advertising or publicity pertaining  to distribution of  the  software
  10. # without   specific,   written  prior   permission.    SCO   makes   no
  11. # representations  about  the  suitability  of  this  software  for  any
  12. # purpose.  It is provided "as is" without express or implied warranty.
  13. # ---------------------------------------------------------------------
  14.  
  15. # Demo        : info.tcl
  16. # Description    : Simple message dialog, displaying general environmental
  17. #          information.
  18.  
  19. proc QuitCB {cbs} {
  20.     VtClose; exit 0
  21. }
  22.  
  23. # Must establish connection with the display engine before
  24. # querying about the graphical environment.
  25. set app [VtOpen info]
  26.  
  27. set charm [VtInfo -charm]
  28. set version [VtInfo -version]
  29. set colors [VtInfo -colors]
  30. set height [VtInfo -displayHeight]
  31. set width [VtInfo -displayWidth]
  32.  
  33. set msg "Charm is $charm\nVersion is $version\nNumber of Colors: $colors
  34. Dimension: $width X $height"
  35.  
  36. set dlog [VtMessageDialog $app.mess \
  37.     -message $msg \
  38.     -ok \
  39.     -okCallback QuitCB \
  40.     -font medItalicFont \
  41.     ]
  42.  
  43. VtShow $dlog
  44. VtMainLoop
  45.