home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / winterp-1.13 / contrib / doc / wp-doc.el < prev   
Encoding:
Text File  |  1991-10-06  |  12.0 KB  |  410 lines

  1. ;;!emacs
  2. ;;
  3. ;; FILE:         wp-doc.el
  4. ;; SUMMARY:      Provide completion and documentation lookup for Winterp.
  5. ;; USAGE:        GNU Emacs Lisp Library
  6. ;;
  7. ;; AUTHOR:       Bob Weiner, Brown University
  8. ;; ORIG-DATE:    19-Dec-90
  9. ;; LAST-MOD:     17-Sep-91 at 22:22:04 by Bob Weiner
  10. ;;
  11. ;; Copyright (C) 1990, 1991 Bob Weiner
  12. ;; WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  13. ;; XLISP version 2.1, Copyright (c) 1989, by David Betz.
  14. ;;
  15. ;; Permission to use, copy, modify, distribute, and sell this software and
  16. ;; its documentation for any purpose is hereby granted without fee,
  17. ;; provided that the above copyright notice appear in all copies and that
  18. ;; both that copyright notice and this permission notice appear in
  19. ;; supporting documentation, and that the name of Hewlett-Packard, Niels
  20. ;; Mayer, Brown University and Bob Weiner not be used in advertising or
  21. ;; publicity pertaining to distribution of the software without specific,
  22. ;; written prior permission.  Hewlett-Packard, Niels Mayer, Brown University
  23. ;; and Bob Weiner makes no representations about the suitability of this
  24. ;; software for any purpose.  It is provided "as is" without express or
  25. ;; implied warranty.
  26. ;;
  27. ;; This file is not part of GNU Emacs.
  28. ;;
  29. ;; DESCRIPTION:  
  30. ;;
  31. ;;   The function (rd-doc) takes a Motif widget class as input and displays the
  32. ;;   corresponding WINTERP manual section.  Parent entries which are matched
  33. ;;   are extracted with all of their children.
  34. ;;
  35. ;;   (wp-doc) is bound to {C-c w} below, change it if you like.
  36. ;;   You might also want to alter the keybinding in (rd-doc-init).
  37. ;;
  38. ;;   You MUST set 'rd-doc-files' within the function (wp-doc-init) below.
  39. ;;   Set it to a list of the path for your own WINTERP documentation file.
  40. ;;
  41. ;; DESCRIP-END.
  42. ;;
  43.  
  44. ;; ************************************************************************
  45. ;; Other required Elisp libraries
  46. ;; ************************************************************************
  47.  
  48. (require 'rd-doc)
  49.  
  50. ;; ************************************************************************
  51. ;; Public variables
  52. ;; ************************************************************************
  53.  
  54. ;;
  55. ;;  Select your own key.
  56. ;;
  57. (defvar wp-doc-key "\C-cw"
  58.   "*Key binding with which to invoke 'wp-doc'.
  59. Nil means no binding.")
  60.  
  61. ;; ************************************************************************
  62. ;; Private functions
  63. ;; ************************************************************************
  64.  
  65. (defun wp-doc-init ()
  66.   "Setup for WINTERP doc searching."
  67.   (if (or (equal (user-login-name) "rsw")
  68.       (equal (user-login-name) "weiner"))
  69.       (progn (load "/u/rsw/.em-X-sun")
  70.          ;; Bind the Help key on my Sun keypad
  71.          (setq wp-doc-key "\e[-1z")
  72.          (and wp-doc-key (global-set-key wp-doc-key 'rd-doc))))
  73.   ;;
  74.   ;;  Set your own path.
  75.   ;;
  76.   (setq rd-doc-files '("/cs/src/winterp/w/doc/winterp.doc")
  77.     rd-doc-buf "*Winterp Help*"
  78.     rd-doc-list wp-doc-list
  79.     rd-identifier-chars "^]()[{}. \t\n"
  80.     rd-identifier "[^]()[{}. \t\n]+")
  81.   )
  82.  
  83. ;; ************************************************************************
  84. ;; Private variables
  85. ;; ************************************************************************
  86.  
  87. (defconst wp-doc-list
  88. '(
  89. ("<POPUP_SHELL_WIDGET_CLASS>")
  90. ("<SHELL_WIDGET_CLASS>")
  91. ("<WIDGET_CLASS>")
  92. ("<WINTERP>")
  93. ("<X11/PassivGrab.h>")
  94. ("<X11/Protocols.h>")
  95. ("<X11/Selection.h>")
  96. ("<Xm/CutPaste.h>")
  97. ("Colorpicker:")
  98. ("Motif")
  99. ("Widget")
  100. ("WidgetClass")
  101. ("XM_ARROW_BUTTON_GADGET_CLASS")
  102. ("XM_ARROW_BUTTON_WIDGET_CLASS")
  103. ("XM_BULLETIN_BOARD_WIDGET_CLASS")
  104. ("XM_CASCADE_BUTTON_GADGET_CLASS")
  105. ("XM_CASCADE_BUTTON_WIDGET_CLASS")
  106. ("XM_COMMAND_WIDGET_CLASS")
  107. ("XM_CONVERT_UNITS:") ;; [Motif 1.1 only]
  108. ("XM_CVT_CT_TO_XM_STRING::") ;; [Motif 1.1 only]
  109. ("XM_CVT_XM_STRING_TO_CT::") ;; [Motif 1.1 only]
  110. ("XM_DRAWING_AREA_WIDGET_CLASS")
  111. ("XM_DRAWN_BUTTON_WIDGET_CLASS")
  112. ("XM_FILE_SELECTION_BOX_WIDGET_CLASS")
  113. ("XM_FORM_WIDGET_CLASS")
  114. ("XM_FRAME_WIDGET_CLASS")
  115. ("XM_GET_COLORS::") ;; [Motif 1.1 only]
  116. ("XM_GET_XIMAGE_FROM_FILE")
  117. ("XM_INSTALL_IMAGE")
  118. ("XM_LABEL_GADGET_CLASS")
  119. ("XM_LABEL_WIDGET_CLASS")
  120. ("XM_LIST_WIDGET_CLASS")
  121. ("XM_MAIN_WINDOW_WIDGET_CLASS")
  122. ("XM_MESSAGE_BOX_WIDGET_CLASS")
  123. ("XM_PANED_WINDOW_WIDGET_CLASS")
  124. ("XM_PUSH_BUTTON_GADGET_CLASS")
  125. ("XM_PUSH_BUTTON_WIDGET_CLASS")
  126. ("XM_ROW_COLUMN_WIDGET_CLASS")
  127. ("XM_SCALE_WIDGET_CLASS")
  128. ("XM_SCROLLED_WINDOW_WIDGET_CLASS")
  129. ("XM_SCROLL_BAR_WIDGET_CLASS")
  130. ("XM_SELECTION_BOX_WIDGET_CLASS")
  131. ("XM_SEPARATOR_GADGET_CLASS")
  132. ("XM_SEPARATOR_WIDGET_CLASS")
  133. ("XM_SET_FONT_UNITS::") ;; [Motif 1.1 only]
  134. ("XM_STRING_BYTE_COMPARE")
  135. ("XM_STRING_COMPARE")
  136. ("XM_STRING_CONCAT")
  137. ("XM_STRING_COPY")
  138. ("XM_STRING_CREATE")
  139. ("XM_STRING_CREATE_L_TO_R")
  140. ("XM_STRING_DIRECTION_CREATE")
  141. ("XM_STRING_EMPTY")
  142. ("XM_STRING_GET_L_TO_R")
  143. ("XM_STRING_HAS_SUBSTRING::") ;; [Motif 1.1 only]
  144. ("XM_STRING_LENGTH")
  145. ("XM_STRING_LINE_COUNT")
  146. ("XM_STRING_SEGMENT_CREATE")
  147. ("XM_STRING_SEPARATOR_CREATE")
  148. ("XM_TEXT_WIDGET_CLASS")
  149. ("XM_TOGGLE_BUTTON_GADGET_CLASS")
  150. ("XM_TOGGLE_BUTTON_WIDGET_CLASS")
  151. ("XM_TRACKING_LOCATE::") ;; [Motif 1.1 only]
  152. ("XM_UNINSTALL_IMAGE")
  153. ("XT_ADD_TIMEOUT")
  154. ("XT_MANAGE_CHILDREN")
  155. ("XT_PARSE_TRANSLATION_TABLE")
  156. ("XT_REMOVE_TIMEOUT")
  157. ("XT_RESOLVE_PATHNAME::") ;; [Motif 1.1 only]
  158. ("XT_UNMANAGE_CHILDREN")
  159. ("XmAddTabGroup():")
  160. ("XmCascadeButtonHighlight():")
  161. ("XmCommandAppendValue():")
  162. ("XmCommandError():")
  163. ("XmCommandGetChild():")
  164. ("XmCommandSetValue():")
  165. ("XmFileSelectionBoxGetChild():")
  166. ("XmFileSelectionDoSearch():")
  167. ("XmFontList")
  168. ("XmGetPostedFromWidget()::") ;; [Motif 1.1 only]
  169. ("XmInstallImage():")
  170. ("XmIsGadget():")
  171. ("XmIsManager():")
  172. ("XmIsMotifWMRunning():")
  173. ("XmIsPrimitive():")
  174. ("XmListAddItem()")
  175. ("XmListAddItemUnselected():")
  176. ("XmListAddItems():") ;; [Motif 1.1 only]
  177. ("XmListDeleteAllItems():") ;; [Motif 1.1 only]
  178. ("XmListDeleteItem():")
  179. ("XmListDeleteItems():") ;; [Motif 1.1 only]
  180. ("XmListDeleteItemsPos():") ;; [Motif 1.1 only]
  181. ("XmListDeletePos():")
  182. ("XmListDeselectAllItems():")
  183. ("XmListDeselectItem():")
  184. ("XmListDeselectPos():")
  185. ("XmListGetMatchPos():") ;; [Motif 1.1 only]
  186. ("XmListGetSelectedPos():") ;; [Motif 1.1 only]
  187. ("XmListItemExists():")
  188. ("XmListItemPos():") ;; [Motif 1.1 only]
  189. ("XmListReplaceItems():") ;; [Motif 1.1 only]
  190. ("XmListReplaceItemsPos():") ;; [Motif 1.1 only]
  191. ("XmListSelectItem():")
  192. ("XmListSelectPos():")
  193. ("XmListSetAddMode():") ;; [Motif 1.1 only]
  194. ("XmListSetBottomItem():")
  195. ("XmListSetBottomPos():")
  196. ("XmListSetHorizPos():")
  197. ("XmListSetItem():")
  198. ("XmListSetPos():")
  199. ("XmMainWindowSep1():")
  200. ("XmMainWindowSep2():")
  201. ("XmMainWindowSep3()::") ;; [Motif 1.1 only]
  202. ("XmMainWindowSetAreas():")
  203. ("XmMenuPosition():")
  204. ("XmMessageBoxGetChild():")
  205. ("XmOptionButtonGadget():")
  206. ("XmOptionLabelGadget():")
  207. ("XmProcessTraversal():") ;; [Motif 1.1 only]
  208. ("XmRAcceleratorTable:")
  209. ("XmRAlignment:")
  210. ("XmRArrowDirection:")
  211. ("XmRAttachment:")
  212. ("XmRBoolean:")
  213. ("XmRButtonType:") ;; [MOTIF_1.1 only]
  214. ("XmRCallback:")
  215. ("XmRChar:")
  216. ("XmRChar:") ;; [MOTIF 1.1 only]
  217. ("XmRDefaultButtonType:")
  218. ("XmRDeleteResponse:")
  219. ("XmRDialogStyle:")
  220. ("XmRDialogType:")
  221. ("XmRDimension:")
  222. ("XmREditMode:")
  223. ("XmRFileTypeMask::") ;; [MOTIF 1.1 only]
  224. ("XmRFontList:")
  225. ("XmRHorizontalDimension::") ;; [MOTIF 1.1 only]
  226. ("XmRHorizontalInt::") ;; [MOTIF 1.1 only]
  227. ("XmRHorizontalPosition::") ;; [Motif 1.1 only]
  228. ("XmRIndicatorType:")
  229. ("XmRInitialState::") ;; [MOTIF 1.1 only]
  230. ("XmRInt:")
  231. ("XmRKeyboardFocusPolicy:")
  232. ("XmRLabelType:")
  233. ("XmRListSizePolicy:")
  234. ("XmRManForegroundPixmap:")
  235. ("XmRManHighlightPixmap:")
  236. ("XmRMultiClick::") ;; [Motif 1.1 only]
  237. ("XmRNavigationType::") ;; [Motif 1.1 only]
  238. ("XmROrientation:")
  239. ("XmRPacking:")
  240. ("XmRPixel:")
  241. ("XmRPixmap:")
  242. ("XmRPrimForegroundPixmap:")
  243. ("XmRPrimHighlightPixmap:")
  244. ("XmRProcessingDirection:")
  245. ("XmRScrollBarDisplayPolicy:")
  246. ("XmRScrollBarPlacement:")
  247. ("XmRScrollingPolicy:")
  248. ("XmRSelectionPolicy:")
  249. ("XmRSeparatorType:")
  250. ("XmRShadowType:")
  251. ("XmRTextPosition::") ;; [MOTIF 1.1 only]
  252. ("XmRVerticalDimension::") ;; [MOTIF 1.1 only]
  253. ("XmRVerticalInt::") ;; [MOTIF 1.1 only]
  254. ("XmRVerticalPosition::") ;; [Motif 1.1 only]
  255. ("XmRVisualPolicy:")
  256. ("XmRWidgetClass:")
  257. ("XmRWindowGravity::") ;; [MOTIF 1.1 only]
  258. ("XmRXmString:")
  259. ("XmRemoveTabGroup():")
  260. ("XmScaleGetValue():")
  261. ("XmScaleSetValue():")
  262. ("XmScrollBarGetValues():")
  263. ("XmScrollBarSetValues():")
  264. ("XmScrolledWindowSetAreas():")
  265. ("XmSelectionBoxGetChild():")
  266. ("XmString")
  267. ("XmStringByteCompare():")
  268. ("XmStringCompare():")
  269. ("XmStringConcat():")
  270. ("XmStringCopy():")
  271. ("XmStringCreate():")
  272. ("XmStringCreateLtoR():")
  273. ("XmStringDirectionCreate():")
  274. ("XmStringEmpty():")
  275. ("XmStringGetLtoR():")
  276. ("XmStringLength():")
  277. ("XmStringLineCount():")
  278. ("XmStringSegmentCreate():")
  279. ("XmStringSeparatorCreate():")
  280. ("XmTextClearSelection():")
  281. ("XmTextCopy():") ;; [Motif 1.1 only]
  282. ("XmTextCut()::") ;; [Motif 1.1 only]
  283. ("XmTextDisableRedisplay():")
  284. ("XmTextDisableRedisplay():") ;; [MOTIF_1.0]
  285. ("XmTextEnableRedisplay():")
  286. ("XmTextEnableRedisplay():") ;; [MOTIF_1.0]
  287. ("XmTextGetAddMode()::") ;; [Motif 1.1 only]
  288. ("XmTextGetBaseline()::") ;; [Motif 1.1 only]
  289. ("XmTextGetCursorPosition()::") ;; [Motif 1.1 only]
  290. ("XmTextGetEditable():")
  291. ("XmTextGetInsertionPosition():")
  292. ("XmTextGetLastPosition():")
  293. ("XmTextGetMaxLength():")
  294. ("XmTextGetSelection():")
  295. ("XmTextGetSelectionPosition():")
  296. ("XmTextGetSource():")
  297. ("XmTextGetString():")
  298. ("XmTextGetTopPosition():")
  299. ("XmTextInsert()::") ;; [Motif 1.1 only]
  300. ("XmTextPaste()::") ;; [Motif 1.1 only]
  301. ("XmTextPosToXY():")
  302. ("XmTextRemove()::") ;; [Motif 1.1 only]
  303. ("XmTextReplace():")
  304. ("XmTextScroll():")
  305. ("XmTextSetAddMode()::") ;; [Motif 1.1 only]
  306. ("XmTextSetCursorPosition()::") ;; [Motif 1.1 only]
  307. ("XmTextSetEditable():")
  308. ("XmTextSetHighlight()::") ;; [Motif 1.1 only]
  309. ("XmTextSetInsertionPosition():")
  310. ("XmTextSetMaxLength():")
  311. ("XmTextSetSelection():")
  312. ("XmTextSetSource():")
  313. ("XmTextSetString():")
  314. ("XmTextSetTopPosition():")
  315. ("XmTextShowPosition():")
  316. ("XmTextXYToPos():")
  317. ("XmToggleButtonGadgetGetState():")
  318. ("XmToggleButtonGadgetSetState():")
  319. ("XmToggleButtonGetState()")
  320. ("XmToggleButtonSetState()")
  321. ("XmUninstallImage():")
  322. ("XmUpdateDisplay():")
  323. ("XtAddCallback():")
  324. ("XtAddCallback():")
  325. ("XtAddCallback():")
  326. ("XtAddCallback():")
  327. ("XtAddCallback():")
  328. ("XtAddCallback():")
  329. ("XtAddCallback():")
  330. ("XtAddCallback():")
  331. ("XtAddCallback():")
  332. ("XtAddCallback():")
  333. ("XtAddCallback():")
  334. ("XtAddCallback():")
  335. ("XtAddEventHandler()")
  336. ("XtAddGrab():")
  337. ("XtAddInput()")
  338. ("XtAddRawEventHandler():")
  339. ("XtAppAddTimeout()")
  340. ("XtAppAddWorkProc()")
  341. ("XtAppCreateShell():")
  342. ("XtAppRemoveWorkProc():")
  343. ("XtAugmentTranslations():")
  344. ("XtBuildEventMask():")
  345. ("XtCallActionProc()::") ;; [Motif 1.1 only]
  346. ("XtCreatePopupShell():")
  347. ("XtCreateWidget():")
  348. ("XtDestroyWidget():")
  349. ("XtGetValues():")
  350. ("XtGetValues()::") ;; [MOTIF_1.1 only]
  351. ("XtGetValues()::") ;; [MOTIF_1.1 only]
  352. ("XtGetValues()::") ;; [Motif 1.1 only -- Motif bug work-around]
  353. ("XtGetValues()::") ;; [Motif 1.1 only -- Motif bug work-around]
  354. ("XtGetValues()::") ;; [Motif 1.1 only]
  355. ("XtInstallAccelerators():")
  356. ("XtInstallAllAccelerators():")
  357. ("XtIsComposite()::") ;; [MOTIF_1.1]
  358. ("XtIsCompositeObject():")
  359. ("XtIsCompositeObject()::") ;; [MOTIF_1.0]
  360. ("XtIsConstraint():")
  361. ("XtIsManaged():")
  362. ("XtIsRealized():")
  363. ("XtIsSensitive():")
  364. ("XtIsShell():")
  365. ("XtManageChild():")
  366. ("XtManageChildren():")
  367. ("XtMapWidget():")
  368. ("XtName()::") ;; [Motif 1.1 only]
  369. ("XtOverrideTranslations():")
  370. ("XtParent():")
  371. ("XtParseTranslationTable():")
  372. ("XtPopDown():")
  373. ("XtPopup():")
  374. ("XtRealizeWidget():")
  375. ("XtRemoveAllCallbacks():")
  376. ("XtRemoveEventHandler()")
  377. ("XtRemoveGrab():")
  378. ("XtRemoveInput():")
  379. ("XtRemoveRawEventHandler()")
  380. ("XtRemoveTimeout()")
  381. ("XtSetMappedWhenManaged():")
  382. ("XtSetSensitive():")
  383. ("XtSetValues():")
  384. ("XtUninstallTranslations():")
  385. ("XtUnmanageChild():")
  386. ("XtUnmanageChildren():")
  387. ("XtUnmapWidget():")
  388. ("XtUnrealizeWidget():")
  389. ("XtWindow():")
  390. ("XtWindow()::") ;; [MOTIF_1.0]
  391. ("XtWindowOfObject()::") ;; [MOTIF_1.1]
  392. ("_XmGetImageFromFile():")
  393. ("_XmTextDisableRedisplay():") ;; [MOTIF_1.1]
  394. ("_XmTextEnableRedisplay()::") ;; [MOTIF_1.1]
  395. ("browser:")
  396. ("palette")
  397. )
  398. "List of single entry lists of Winterp symbol names and related strings.
  399. This is the format used by the winterp name completion function.")
  400.  
  401. ;; ************************************************************************
  402. ;; Function calls
  403. ;; ************************************************************************
  404.  
  405. (wp-doc-init)
  406.  
  407. (provide 'wp-doc)
  408.  
  409.  
  410.