home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hdk11l.zip / RTFLIB.HDF < prev    next >
Text File  |  1994-01-08  |  13KB  |  303 lines

  1. ;******************************************************************************
  2. ; Ver 11.0, Last Update Jan 07, 1993                                          *
  3. ;                                   rtfLIB                                    *
  4. ;                                                                             *
  5. ; This library adds functionality to HLPDK 11.0+, and adds special functions  *
  6. ; to RTF based targets : winHelp, MMViewer, RTF Word Processor target.        *
  7. ;                                                                             *
  8. ; The following added functionality is added :                                *
  9. ;                                                                             *
  10. ; Text Attributes for internal pieces of text. (bold, undeline, italic)       *
  11. ; Special Links : Graphics and Normal Non-Hilighted links.                    *
  12. ; Complete WINHELP Macro API support for WINHELP and MM Viewer targets.       *
  13. ; Multimedia - MCI string interface, Video, CDAudio, and generic FUN!         *
  14. ;                                                                             *
  15. ;******************************************************************************
  16.  
  17. .ifdef rtfbased
  18.  
  19. ;******************************************************************************
  20. ;                               Text Attributes                               *
  21. ;                                                                             *
  22. ; boldText - Display text in bold, e.g. - ~Text~boldText~ - Text will be in   *
  23. ;                                         bold                                *
  24. ; italicText - Display text in italic                                         *
  25. ; underlineText - displayText in underline                                    *
  26. ; boldItalicText - display text in bold italic                                *
  27. ;                                                                             *
  28. ; fontText(fontNum) - Display Text in font# from font pallete                 *
  29. ;  e.g.   ~This is in font 3~fontText(3)~                                     *
  30. ;******************************************************************************
  31.  
  32. .userlink boldText '{\b %t}'
  33. .userlink italicText '{\i %t}'
  34. .userlink underlineText '{\ul %t}'
  35. .userlink boldItalicText '{\b\i %t}'
  36.  
  37. .userlink fontText '{\f%1 %t}'
  38.  
  39. .ifndef document
  40.  
  41. ;******************************************************************************
  42. ;                                    Links                                    *
  43. ;                                                                             *
  44. ; The following set of userlink templates support special link capabilities : *
  45. ;                                                                             *
  46. ; NormalTextLink(linkTarget) - Display the link text in normal color, and NOT *
  47. ;                              with the underline green format                *
  48. ; NormalTextPopup(linkTarget) - Same as above - but for popups.               *
  49. ;                                                                             *
  50. ; GraphicLink(graphicObject LinkTarget) - Display a graphic, that conects to  *
  51. ;                                         a linkTarget, the graphic object    *
  52. ;                                         should have been decalred in a      *
  53. ;                                         .GRAPHIC statement.                 *
  54. ; graphicPopup(graphicObject linkTarget) - Same as above, coonnect to a popup *
  55. ;******************************************************************************
  56.  
  57. .userlink NormalTextLink '{\uldb %t}{\v %%%1)'
  58. .userlink NormalTextPopup '{\ul %t}{\v %%%1}'
  59.  
  60. .userlink graphicLink '{\uldb \{bmc %g1\}}{\v %2}'
  61. .userlink graphicPopup '{\ul \{bmc %g1\}}{\v %2}'
  62.  
  63. .else
  64.  
  65. .userlink NormalTextLink '%t'
  66. .userlink NormalTextPopup '%t'
  67.  
  68. .userlink graphicLink '%t'
  69. .userlink graphicPopup '%t'
  70.  
  71. .endif
  72.  
  73. ;******************************************************************************
  74. ;                                   Macros                                    *
  75. ;                                                                             *
  76. ; The complete windows macro facility is supported here, with a set of        *
  77. ; !XXX macros defined as user links for general use in links, and             *
  78. ; $XXX macros as substitution macros only. (Not for topictext links)          *
  79. ;******************************************************************************
  80.  
  81. .ifndef document
  82.  
  83. .userlink !about '{\uldb %t}{\v !About()}'
  84. .userlink $about 'About()'
  85.  
  86. .userlink $addAccelarator 'AddAccelerator(%1,%2,"%3")'
  87. .userlink !addAccelarator '{\uldb %t}{\v !AddAccelerator(%1,%2,"%3")}'
  88.  
  89. .userlink $annotate 'Annotate()'
  90. .userlink !annotate '{\uldb %t}{\v !Annotate()}'
  91.  
  92. .userlink $appendItem 'AppendItem("%1","%2","%3","%4")'
  93. .userlink !appendItem '{\uldb %t}{\v !AppendItem("%1","%2","%3","%4")}'
  94.  
  95. .userlink $back 'Back()'
  96. .userlink !back '{\uldb %t}{\v !Back()}'
  97.  
  98. .userlink $bookmarkDefine 'BookmarkDefine()'
  99. .userlink !bookmarkDefine '{\uldb %t}{\v !BookmarkDefine()}'
  100.  
  101. .userlink $bookmarkMore 'BookmarkMore()'
  102. .userlink !bookmarkMore '{\uldb %t}{\v !BookmarkMore()}'
  103.  
  104. .userlink $browseButtons 'BrowseButtons()'
  105. .userlink !browseButtons '{\uldb %t}{\v !BrowseButtons()}'
  106.  
  107. .userlink $changeButtonBinding 'ChangeButtonBinding("%1","%2")'
  108. .userlink !changeButtonBinding '{\uldb %t}{\v !ChangeButtonBinding("%1","%2")}'
  109.  
  110. .userlink $changeItemBinding 'ChangeItemBinding("1","2")'
  111. .userlink !changeItemBinding '{\uldb %t}{\v !ChangeItemBinding("1","2")}'
  112.  
  113. .userlink $checkItem 'CheckItem("%1")'
  114. .userlink !checkItem '{\uldb %t}{\v !CheckItem("%1")}'
  115.  
  116. .userlink $closeWindow 'CloseWindow("%1")'
  117. .userlink !closeWindow '{\uldb %t}{\v !CloseWindow("%1")}'
  118.  
  119. .userlink $contents 'Contents()'
  120. .userlink !contents '{\uldb %t}{\v !Contents()}'
  121.  
  122. .userlink $copyDialog 'CopyDialog()'
  123. .userlink !copyDialog '{\uldb %t}{\v !CopyDialog()}'
  124.  
  125. .userlink $copyTopic 'CopyTopic()'
  126. .userlink !copyTopic '{\uldb %t}{\v !CopyTopic()}'
  127.  
  128. .userlink $createButton 'CreateButton("%1","%2","%3")'
  129. .userlink !createButton '{\uldb %t}{\v !CreateButton("%1","%2","%3")}'
  130.  
  131. .userlink $deleteItem 'DeleteItem("%1")'
  132. .userlink !deleteItem '{\uldb %t}{\v !DeleteItem("%1")}'
  133.  
  134. .userlink $deleteMark 'DeleteMark("%1")'
  135. .userlink !deleteMark '{\uldb %t}{\v !DeleteMark("%1")}'
  136.  
  137. .userlink $destroyButton 'DestroyButton("%1")'
  138. .userlink !destroyButton '{\uldb %t}{\v !DestroyButton("%1")}'
  139.  
  140. .userlink $disableButton 'DisableButton("%1")'
  141. .userlink !disableButton '{\uldb %t}{\v !DisableButton("%1")}'
  142.  
  143. .userlink $disableItem 'DisableItem("%1")'
  144. .userlink !disableItem '{\uldb %t}{\v !DisableItem("%1")}'
  145.  
  146. .userlink $enableItem 'EnableItem("%1")'
  147. .userlink !enableItem '{\uldb %t}{\v !EnableItem("%1")}'
  148.  
  149. .userlink $enableButton 'EnableButton("%1")'
  150. .userlink !enableButton '{\uldb %t}{\v !EnableButton("%1")}'
  151.  
  152. .userlink $execProgram 'ExecProgram("%1", %2)'
  153. .userlink $execProgram '!ExecProgram("%1", %{\uldb %t}{\v 2)}'
  154.  
  155. .userlink $exit 'Exit()'
  156. .userlink !exit '{\uldb %t}{\v !Exit()}'
  157.  
  158. .userlink $fileOpen 'FileOpen()'
  159. .userlink !fileOpen '{\uldb %t}{\v !FileOpen()}'
  160.  
  161. .userlink $focusWindow 'FocusWindow("%1")'
  162. .userlink !focusWindow '{\uldb %t}{\v !FocusWindow("%1")}'
  163.  
  164. .userlink $gotoMark 'GoToMark("%1")'
  165. .userlink !gotoMark '{\uldb %t}{\v !GoToMark("%1")}'
  166.  
  167. .userlin $helpOn 'HelpOn()'
  168. .userlin !helpOn '{\uldb %t}{\v !HelpOn()}'
  169.  
  170. .userlink $helpOnTop 'HelpOnTop()'
  171. .userlink !helpOnTop '{\uldb %t}{\v !HelpOnTop()}'
  172.  
  173. .userlink $history 'History()'
  174. .userlink !history '{\uldb %t}{\v !History()}'
  175.  
  176. .userlink $ifThen 'IfThen(IsMark("%1"),"%2")'
  177. .userlink !ifThen '{\uldb %t}{\v !IfThen(IsMark("%1"),"%2")}'
  178.  
  179. .userlink $ifThenElse 'IfThenElse(IsMark("%1"),"%2","%3")'
  180. .userlink !ifThenElse '{\uldb %t}{\v !IfThenElse(IsMark("%1"),"%2","%3")}'
  181.  
  182. .userlink $insertItem 'InsertItem("%1","%2","%3","%4",%5)'
  183. .userlink !insertItem '{\uldb %t}{\v !InsertItem("%1","%2","%3","%4",%5)}'
  184.  
  185. .userlink $insertMenu 'InsertMenu("%1","%2",%3)'
  186. .userlink !insertMenu '{\uldb %t}{\v !InsertMenu("%1","%2",%3)}'
  187.  
  188. .userlink $isMark 'IsMark("%1")'
  189. .userlink !isMark '{\uldb %t}{\v !IsMark("%1")}'
  190.  
  191. .userlink $jumpContents 'JumpContents("%1")'
  192. .userlink !jumpContents '{\uldb %t}{\v !JumpContents("%1")}'
  193.  
  194. .userlink $jumpContext 'JumpContext("%1",%2)'
  195. .userlink !jumpContext '{\uldb %t}{\v !JumpContext("%1",%2)}'
  196.  
  197. .userlink $jumpHelpOn 'JumpHelpOn()'
  198. .userlink !jumpHelpOn '{\uldb %t}{\v !JumpHelpOn()}'
  199.  
  200. .userlink $jumpId 'JumpId("%1","%2")'
  201. .userlink !jumpId '{\uldb %t}{\v !JumpId("%1","%2")}'
  202.  
  203. .userlink $jumpKeyword 'JumpKeyWord("%1","%2")'
  204. .userlink !jumpKeyword '{\uldb %t}{\v !JumpKeyWord("%1","%2")}'
  205.  
  206. .userlink $next 'Next()'
  207. .userlink !next '{\uldb %t}{\v !Next()}'
  208.  
  209. .userlink $not 'Not(!IsMark("%1"))'
  210. .userlink !not '{\uldb %t}{\v !Not(!IsMark("%1"))}'
  211.  
  212. .userlink $popupContext 'PopupContext("%1",%2)'
  213. .userlink !popupContext '{\uldb %t}{\v !PopupContext("%1",%2)}'
  214.  
  215. .userlink $popupId 'PopupId("%1","%2")'
  216. .userlink !popupId '{\uldb %t}{\v !PopupId("%1","%2")}'
  217.  
  218. .userlink $positionWindow 'PositionWindow(%1,%2,%3,%4,%5,"%6")'
  219. .userlink !positionWindow '{\uldb %t}{\v !PositionWindow(%1,%2,%3,%4,%5,"%6")}'
  220.  
  221. .userlink $prev 'Prev()'
  222. .userlink !prev '{\uldb %t}{\v !Prev()}'
  223.  
  224. .userlink $print 'Print()'
  225. .userlink !print '{\uldb %t}{\v !Print()}'
  226.  
  227. .userlink $printerSetup 'PrinterSetup()'
  228. .userlink !printerSetup '{\uldb %t}{\v !PrinterSetup()}'
  229.  
  230. .userlink $registerRoutine 'RegisterRoutine("%1","%2","%3")'
  231. .userlink !registerRoutine '{\uldb %t}{\v !RegisterRoutine("%1","%2","%3")}'
  232.  
  233. .userlink $removeAccelerator 'RemoveAccelerator(%1,%2)'
  234. .userlink !removeAccelerator '{\uldb %t}{\v !RemoveAccelerator(%1,%2)}'
  235.  
  236. .userlink $saveMark 'SaveMark("%1")'
  237. .userlink !saveMark '{\uldb %t}{\v !SaveMark("%1")}'
  238.  
  239. .userlink $search 'Search()'
  240. .userlink !search '{\uldb %t}{\v !Search()}'
  241.  
  242. .userlink $setContents 'SetContents("%1",%2)'
  243. .userlink !setContents '{\uldb %t}{\v !SetContents("%1",%2)}'
  244.  
  245. .userlink $setHelpOnFile 'SetHelpOnFile("%1")'
  246. .userlink !setHelpOnFile '{\uldb %t}{\v !SetHelpOnFile("%1")}'
  247.  
  248. .userlink uncheckItem 'UncheckItem("%1")'
  249. .userlink !ncheckItem '{\uldb %t}{\v !UncheckItem("%1")}'
  250.  
  251. .endif
  252.  
  253. ;******************************************************************************
  254. ;                                 MultiMedia                                  *
  255. ;                                                                             *
  256. ; The following set of userlinks, and external routine reference, provide     *
  257. ; access to Video, CDAudio, MCI string interface, and other FUN stuff.        *
  258. ;                                                                             *
  259. ;                                                                             *
  260. ;******************************************************************************
  261.  
  262. .ifndef document
  263.  
  264. ;******************************************************************************
  265. ;                                mciSendString                                *
  266. ;                                                                             *
  267. ; this is the interface to the multimedia send string interface.              *
  268. ;                                                                             *
  269. ; Video : (AVI files, must have VfW drivers installed to use)                 *
  270. ;                                                                             *
  271. ; videoLink used in links, parameter 1 is the path to the AVI file.           *
  272. ;           Notice that the AVI file has to be in the "current directory".    *
  273. ; videoOpen, videoPlay and videoClose are .ACTION strings of topics, in       *
  274. ;            HLPDK V11.0 or later (not V10.0), and must appear in that order. *
  275. ;                                                                             *
  276. ; CDAudio : (RED Book CD Audio)                                               *
  277. ;                                                                             *
  278. ; CDAudioLink , parameter 1 is the start track to play from, parameter 2 -    *
  279. ;               the track to play to ..                                       *
  280. ;                                                                             *
  281. ; Generic MCI String command interface :                                      *
  282. ;                                                                             *
  283. ; mciStringLink - Parameter 1 is the MCI String to send.                      *
  284. ; mciStringAct  - Used for .ACTION topic attributes in HLPDK V11.0 or later.  *
  285. ;******************************************************************************
  286. .routine mciSendString MMSYSTEM SUuu
  287.  
  288. .userlink videoLink '{\uldb %t}{\v !mciSendString("play %1",0,0,0)}'
  289. .userlink videoOpen 'mciSendString("open AVIVideo!%1 alias vid",0,0,0)'
  290. .userlink videoPlay 'mciSendString("play vid wait",0,0,0)'
  291. .userlink videoClose 'mciSendString("close vid",0,0,0)'
  292.  
  293. .userlink CDAudioLink '{\uldb %t}{\v !mciSendString("open CDAudio",0,0,0)}{\v !mciSendString("play CDAudio from %1 to %2 wait",0,0,0)}{\v !mciSendString("close CDAudio",0,0,0)}'
  294.  
  295. .userlink mciStringLink '{\uldb %t}{\v !mciSendString("%1",0,0,0)}'
  296. .userlink mciStringAct  'mciSendString("%1",0,0,0)}'
  297.  
  298. .endif
  299.  
  300. .endif
  301.  
  302.  
  303.