home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / winterp-1.13 / examples / SHELL.lsp < prev    next >
Encoding:
Lisp/Scheme  |  1991-10-05  |  5.2 KB  |  203 lines

  1. ; -*-Lisp-*-
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;
  4. ; File:         SHELL.lsp
  5. ; RCS:          $Header: SHELL.lsp,v 1.2 91/10/05 04:01:39 mayer Exp $
  6. ; Description:  
  7. ; Author:       Niels Mayer, HPLabs
  8. ; Created:      Sun Feb 10 20:34:10 1991
  9. ; Modified:     Sat Oct  5 03:59:29 1991 (Niels Mayer) mayer@hplnpm
  10. ; Language:     Lisp
  11. ; Package:      N/A
  12. ; Status:       X11r5 contrib tape release
  13. ;
  14. ; WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  15. ; XLISP version 2.1, Copyright (c) 1989, by David Betz.
  16. ;
  17. ; Permission to use, copy, modify, distribute, and sell this software and its
  18. ; documentation for any purpose is hereby granted without fee, provided that
  19. ; the above copyright notice appear in all copies and that both that
  20. ; copyright notice and this permission notice appear in supporting
  21. ; documentation, and that the name of Hewlett-Packard and Niels Mayer not be
  22. ; used in advertising or publicity pertaining to distribution of the software
  23. ; without specific, written prior permission.  Hewlett-Packard and Niels Mayer
  24. ; makes no representations about the suitability of this software for any
  25. ; purpose.  It is provided "as is" without express or implied warranty.
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27.  
  28. (if (and (eq *MOTIF_VERSION* 1) (>= *MOTIF_REVISION* 1))
  29.     (send *TOPLEVEL_WIDGET* :get_argv)    ;get_argv has problems in Motif 1.0 when no args supplied at WINTERP startup time.
  30.   )
  31.  
  32. (send *TOPLEVEL_WIDGET* :set_argv #("foo" "bar" "baz" "jimmy" "hat" "in" "the" "mix"))
  33.  
  34. (send *TOPLEVEL_WIDGET* :get_argv)
  35.  
  36. (setq top_w
  37.       (send TOP_LEVEL_SHELL_WIDGET_CLASS :new "top"
  38.         :XMN_GEOMETRY "=200x50+0+0"
  39.         ))
  40. (send top_w :realize)
  41. (send top_w :IS_MOTIF_WM_RUNNING)
  42.  
  43. (setq app_w 
  44.       (send APPLICATION_SHELL_WIDGET_CLASS :new "app"
  45.         :XMN_GEOMETRY "=200x50+100+100"
  46.         ))
  47. (send app_w :set_argv #("foo" "bar" "baz" "jimmy" "hat" "in" "the" "mix"))
  48. (send app_w :realize)
  49. (send app_w :IS_MOTIF_WM_RUNNING)
  50. (send app_w :get_argv)
  51.  
  52. (if (and (eq *MOTIF_VERSION* 1) (>= *MOTIF_REVISION* 1))
  53.     (progn
  54.       (setq ov_w
  55.         (send OVERRIDE_SHELL_WIDGET_CLASS :new "override"
  56.           :XMN_GEOMETRY "=200x50+200+200"
  57.           ))
  58.       (send ov_w :realize)
  59.       (send ov_w :IS_MOTIF_WM_RUNNING)
  60.       )
  61.   )
  62.  
  63.  
  64. (setq tx_w
  65.       (send TRANSIENT_SHELL_WIDGET_CLASS :new "transient"
  66.         :XMN_GEOMETRY "=200x50+300+300"
  67.         ))
  68. (send tx_w :realize)
  69. (send tx_w :IS_MOTIF_WM_RUNNING)
  70.  
  71. (xt_add_timeout 10000
  72.         '(
  73.           (send top_w :unrealize)
  74.           ))
  75.  
  76. (xt_add_timeout 12000
  77.         '(
  78.           (send app_w :unrealize)
  79.           ))
  80.  
  81. (if (and (eq *MOTIF_VERSION* 1) (>= *MOTIF_REVISION* 1))
  82.     (xt_add_timeout 14000
  83.             '(
  84.               (send ov_w :unrealize)
  85.               ))
  86.   )
  87.  
  88. (xt_add_timeout 16000
  89.         '(
  90.           (send tx_w :unrealize)
  91.           ))
  92.  
  93. (xt_add_timeout 18000 
  94.         '(
  95.           (send xmdia_popup_w :unrealize)
  96.           ))
  97.  
  98.  
  99. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  100. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  101.  
  102. (progn
  103.   (setq top_popup_w 
  104.     (send TOP_LEVEL_POPUP_SHELL_WIDGET_CLASS :new "top_popup" top_w
  105.           :XMN_GEOMETRY "=200x50+50+50"
  106.           ))
  107.   (send top_popup_w :IS_MOTIF_WM_RUNNING)
  108.  
  109.   (setq app_popup_w
  110.     (send APPLICATION_POPUP_SHELL_WIDGET_CLASS :new "app_popup" top_w
  111.           :XMN_GEOMETRY "=200x50+150+150"
  112.           ))
  113.   (send app_popup_w :set_argv #("foo" "bar" "baz" "jimmy" "hat" "in" "the" "mix"))
  114.   (send app_popup_w :get_argv)
  115.   (send app_popup_w :IS_MOTIF_WM_RUNNING)
  116.  
  117.   (if (and (eq *MOTIF_VERSION* 1) (>= *MOTIF_REVISION* 1))
  118.       (progn
  119.     (setq ov_popup_w
  120.           (send OVERRIDE_POPUP_SHELL_WIDGET_CLASS :new "override_popup" top_w
  121.             :XMN_GEOMETRY "=200x50+250+250"
  122.             ))
  123.     (send ov_popup_w :IS_MOTIF_WM_RUNNING)
  124.     ))
  125.  
  126.   (setq tx_popup_w
  127.     (send TRANSIENT_POPUP_SHELL_WIDGET_CLASS :new "transient_popup" top_w
  128.           :XMN_GEOMETRY "=200x50+350+350"
  129.           ))
  130.   (send tx_popup_w :IS_MOTIF_WM_RUNNING)
  131.  
  132.   (setq xmdia_popup_w
  133.     (send XM_DIALOG_POPUP_SHELL_WIDGET_CLASS :new "dialog_popup" top_w
  134.           :XMN_GEOMETRY "=200x50+400+400"
  135.           ))
  136.   (send xmdia_popup_w :IS_MOTIF_WM_RUNNING)
  137.  
  138.   ;; (setq xmnu_popup_w
  139.   ;;(send XM_MENU_POPUP_SHELL_WIDGET_CLASS :new "menu_popup" top_w
  140.   ;;         :XMN_GEOMETRY "=200x50+450+450"
  141.   ;;         ))
  142.   ;; 
  143.   ;; (send xmnu_popup_w  :popup :grab_exclusive)
  144.   ;; (send xmnu_popup_w :manage)
  145.  
  146.  
  147.   (xt_add_timeout 1000 
  148.           '(
  149.             (send top_popup_w :popup :grab_none)
  150.             ))
  151.  
  152.   (xt_add_timeout 2000 
  153.           '(
  154.             (send app_popup_w :popup :grab_none)
  155.             ))
  156.  
  157.   (if (and (eq *MOTIF_VERSION* 1) (>= *MOTIF_REVISION* 1))
  158.       (xt_add_timeout 3000 
  159.               '(
  160.             (send ov_popup_w :popup :grab_none)
  161.             ))
  162.     )
  163.  
  164.   (xt_add_timeout 4000 
  165.           '(
  166.             (send tx_popup_w :popup :grab_none)
  167.             ))
  168.  
  169.   (xt_add_timeout 5000 
  170.           '(
  171.             (send xmdia_popup_w :manage)
  172.             ))
  173.  
  174.  
  175.   (xt_add_timeout 6000 
  176.           '(
  177.             (send top_popup_w :popdown)
  178.             ))
  179.  
  180.   (xt_add_timeout 7000 
  181.           '(
  182.             (send app_popup_w :popdown)
  183.             ))
  184.  
  185.   (if (and (eq *MOTIF_VERSION* 1) (>= *MOTIF_REVISION* 1))
  186.       (xt_add_timeout 8000 
  187.               '(
  188.             (send ov_popup_w :popdown)
  189.             ))
  190.     )
  191.  
  192.   (xt_add_timeout 9000 
  193.           '(
  194.             (send tx_popup_w :popdown)
  195.             ))
  196.  
  197.   (xt_add_timeout 10000 
  198.           '(
  199.             (send xmdia_popup_w :unmanage)
  200.             ))
  201.  
  202.   )
  203.