home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / hyperbole / hui-menu.el < prev    next >
Encoding:
Text File  |  1995-08-22  |  6.5 KB  |  197 lines

  1. ;;!emacs
  2. ;;
  3. ;; FILE:         hui-menu.el
  4. ;; SUMMARY:      InfoDock/Emacs menubar menu of Hyperbole commands.
  5. ;; USAGE:        GNU Emacs Lisp Library
  6. ;; KEYWORDS:     hypermedia, mouse
  7. ;;
  8. ;; AUTHOR:       Bob Weiner
  9. ;; ORG:          Motorola, Inc., PPG
  10. ;;
  11. ;; ORIG-DATE:    28-Oct-94 at 10:59:44
  12. ;; LAST-MOD:     22-Aug-95 at 12:07:56 by Bob Weiner
  13. ;;
  14. ;; Copyright (C) 1994-1995 Free Software Foundation, Inc.
  15. ;;
  16. ;; This file is part of Hyperbole.
  17. ;;
  18. ;; DESCRIPTION:  
  19. ;; DESCRIP-END.
  20.  
  21. ;;; ************************************************************************
  22. ;;; Other required Elisp libraries
  23. ;;; ************************************************************************
  24.  
  25. (require 'wrolo-menu)
  26.  
  27. ;;; ************************************************************************
  28. ;;; Public functions
  29. ;;; ************************************************************************
  30.  
  31. ;; Add Hyperbole menu to menubar.
  32. (defun hyperbole-menubar-menu ()
  33.   "Add the Hyperbole menu to the global menubar."
  34.   (if (and (boundp 'current-menubar)
  35.        current-menubar
  36.        (not (car (find-menu-item current-menubar '("Hyperbole")))))
  37.       (let ((add-before (if (and (boundp 'infodock-menubar-type)
  38.                  (eq infodock-menubar-type 'menubar-infodock))
  39.                 "Key" nil)))
  40.     (if (fboundp 'add-submenu)
  41.         (add-submenu nil infodock-hyperbole-menu add-before)
  42.       (add-menu nil (car infodock-hyperbole-menu)
  43.             (cdr infodock-hyperbole-menu) add-before)))))
  44.  
  45. ;;; ************************************************************************
  46. ;;; Public variables
  47. ;;; ************************************************************************
  48.  
  49. ;;; Don't change this name; doing so will break the way InfoDock
  50. ;;; initializes the Hyperbole menu.
  51. (defconst infodock-hyperbole-menu
  52.   (delq nil
  53.     (list
  54.      "Hyperbole"
  55.      '["Browse-Manual"      (id-info "(hyperbole.info)Top") t]
  56.      "----"
  57.      '["Activate-Button-at-Point" hui:hbut-act t]
  58.      '["Back-to-Prior-Location" (hhist:remove current-prefix-arg) t]
  59.      '("Button-File"
  60.        ["Manual"  (id-info "(hyperbole.info)Button Files") t]
  61.        "----"
  62.        ["Edit-Per-Directory-File" (find-file hbmap:filename) t]
  63.        ["Edit-Personal-File" (find-file
  64.                   (expand-file-name
  65.                    hbmap:filename hbmap:dir-user)) t]
  66.        )
  67.      '("Documentation"
  68.        ["Manual"      (id-info "(hyperbole.info)Top") t]
  69.        "----"
  70.        ["Demonstration"  (find-file-read-only
  71.                   (expand-file-name "DEMO" hyperb:dir)) t]
  72.        ["Glossary"     (id-info "(hyperbole.info)Glossary") t]
  73.        ["Mail-Lists"   (progn
  74.                  (hact 'link-to-string-match "* Mail Lists" 2
  75.                    (expand-file-name "README" hyperb:dir))
  76.                  (setq buffer-read-only nil)
  77.                  (toggle-read-only)) t]
  78.        ["New-Features" (progn
  79.                  (hact 'link-to-string-match "* What's New" 2
  80.                    (expand-file-name "README" hyperb:dir))
  81.                  (setq buffer-read-only nil)
  82.                  (toggle-read-only)) t]
  83.        ["Smart-Key-Summary" (id-browse-file (hypb:mouse-help-file)) t]
  84.        )
  85.      '("Explicit-Button"
  86.        ["Manual"   (id-info "(hyperbole.info)Explicit Buttons") t]
  87.        "----"
  88.        ["Activate-at-Point" hui:hbut-act t]
  89.        ["Create" hui:ebut-create t]
  90.        ["Delete" hui:ebut-delete t]
  91.        ["Edit"   hui:ebut-modify t]
  92.        ("Help"  
  93.         ["Manual"   (id-info "(hyperbole.info)Location") t]
  94.         "----"
  95.         ["Buffer-Buttons"   (hui:hbut-report -1) t]
  96.         ["Current-Button"   (hui:hbut-report)    t]
  97.         ["Ordered-Buttons"  (hui:hbut-report 1)  t]
  98.         )
  99.        ["Modify" hui:ebut-modify t]
  100.        ["Rename" hui:ebut-rename t]
  101.        ["Search" hui:ebut-search t]
  102.        )
  103.      '("Global-Button"
  104.        ["Manual" (id-info "(hyperbole.info)Global Buttons") t]
  105.        "----"
  106.        ["Activate" gbut:act t]
  107.        ["Create" hui:gbut-create t]
  108.        ["Edit"   hui:gbut-modify t]
  109.        ["Help"   gbut:help t]
  110.        ["Modify" hui:gbut-modify t]
  111.        )
  112.      '("Implicit-Button"
  113.        ["Manual"   (id-info "(hyperbole.info)Implicit Buttons and Types") t]
  114.        "----"
  115.        ["Activate-at-Point"    hui:hbut-act t]
  116.        ["Delete-Type"         (hui:htype-delete 'ibtypes) t]
  117.        ["Help"   hui:hbut-help t]
  118.        ["Types"  (hui:htype-help 'ibtypes 'no-sort) t]
  119.        )
  120.      '("Mail-Lists"
  121.        ["Manual" (id-info "(hyperbole.info)Suggestion or Bug Reporting")
  122.         t]
  123.        "----"
  124.        ["Change-Hyperbole-Address"
  125.         (hmail:compose "hyperbole-request@hub.ucsb.edu"
  126.                '(hact 'hyp-request)) t]
  127.        ["Change-Hyperbole-Announce-Address"
  128.         (hmail:compose "hyperbole-request@hub.ucsb.edu"
  129.                '(hact 'hyp-request)) t]
  130.        ["Mail-to-Hyperbole-List"
  131.         (hmail:compose "hyperbole@hub.ucsb.edu" '(hact 'hyp-config)) t]
  132.        )
  133.      (if hyperb:kotl-p
  134.          '("Outline"
  135.            ["Manual" (id-info "(hyperbole.info)Outliner") t]
  136.            ["Example"   (find-file-read-only
  137.                  (expand-file-name
  138.                   "EXAMPLE.kotl" (concat hyperb:dir "kotl/")))
  139.         t]
  140.            "----"
  141.            ["Create-File"    kfile:find t]
  142.            ["View-File"      kfile:view t]
  143.            "----"
  144.            ["Collapse-Tree" (progn (kotl-mode:is-p)
  145.                        (kotl-mode:hide-tree
  146.                     (kcell-view:label))) t]
  147.            ["Create-Link" klink:create t]
  148.            ["Expand-All-Trees" kotl-mode:show-all t]
  149.            ["Expand-Tree" (progn (kotl-mode:is-p)
  150.                      (kotl-mode:show-tree
  151.                       (kcell-view:label))) t]
  152.            ["Show-Top-Level-Only" kotl-mode:hide-body t]
  153.            ))
  154.      infodock-wrolo-menu
  155.      '("Types"
  156.        ["Action-Types-Manual"
  157.         (id-info "(hyperbole.info)Action Types and Actions") t]
  158.        ["Implicit-Button-Types-Manual"
  159.         (id-info "(hyperbole.info)Implicit Buttons and Types") t]
  160.        "----"
  161.        ["Action-Types"      (hui:htype-help 'actypes) t]
  162.        ["Implicit-Button-Types" (hui:htype-help 'ibtypes 'no-sort) t]
  163.        )
  164.      '("Window-Configuration"
  165.        ["Manual" (id-info "(hyperbole.info)Window Configurations") t]
  166.        "----"
  167.        ["Name-Configuration" wconfig-add-by-name     t]
  168.        ["Delete-Name"        wconfig-delete-by-name  t]
  169.        ["Restore-Name"       wconfig-restore-by-name t]
  170.        "----"
  171.        ["Pop-from-Ring"      wconfig-delete-pop      t]
  172.        ["Save-to-Ring"       wconfig-ring-save       t]
  173.        ["Yank-from-Ring"     wconfig-yank-pop        t]
  174.        )
  175.      '["Quit" (progn
  176.             ;; Delete Hyperbole menu item from all menubars.
  177.             (mapcar
  178.              (function
  179.               (lambda (buf)
  180.             (set-buffer buf)
  181.             (if (assoc "Hyperbole" current-menubar)
  182.                 (delete-menu-item '("Hyperbole")))))
  183.              (buffer-list))
  184.             ;;
  185.             ;; Remove Hyperbole button comment from future
  186.             ;; outgoing mail.
  187.             (if (boundp 'smail:comment)
  188.             (setq smail:comment "")))
  189.        t]
  190.      )))
  191.  
  192. ;;; ************************************************************************
  193. ;;; Private variables
  194. ;;; ************************************************************************
  195.  
  196. (provide 'hui-menu)
  197.