home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / BalloonHelpCompiler-10.sit / BalloonHelpCompiler-10 / Documentation < prev    next >
Text File  |  1995-10-30  |  8KB  |  159 lines

  1. Balloon Help Compiler
  2.  
  3. Balloon Help v1.0 ゥ 1995 Peter N Lewis
  4. This program is $20 shareware.
  5.  
  6. If you have problems or suggestions, email <support@stairways.com.au>.  Please note that I will probably be quite brutal about suggestions for extending this program - in all likelihood, if you want more than this program can provide, you should be using Rez or Resorcerer.
  7.  
  8. Purpose
  9.  
  10. The Balloon Help compiler compiles text file descriptions of menu and dialog balloon help in to appropriate resources (namely 'hmnu', 'hdlg', and a 'STR#' resource) for use by the Help Manager in displaying balloons.  Since Balloons Help is largely text, it makes sense to have a text file for editing them.  And with Metrowerks plugin compiler technology and this compiler, you can add the text file directly to your project and have it built automatically in the make process.
  11.  
  12. Installation
  13.  
  14. Drop the メBalloon Helpモ file in to the メCompilersモ folder in the メCodeWarrior Pluginsモ folder.  Quit the CodeWarrior IDE if it is running, and then launch it.
  15.  
  16. In each project, choose Preferences from the Edit menu and select Target.  Type メTEXTモ in to the File Type field, type メ.bhモ (or whatever you like) in to the Extension field, and select Balloon Help from the Compiler popup menu.  Click the Add button.  
  17.  
  18. You might like to modify your standard stationery files to include this file mapping information.
  19.  
  20. Using the Compiler
  21.  
  22. In a project when you want to add balloon help resources for menus or dialogs, add a .bh file in the correct format (as specified below).  When you Make the application, CodeWarrior will compile the balloon help file and add the resources.  All you have to do is type in the balloon help.
  23.  
  24. The file format is pretty simple.  For each dialog or menu you simply list out the items (dialog items or menu items) with the balloon help.  For example:
  25.  
  26. DIALOG 200 SaveChanges
  27.  
  28. 1.1 Click this to save your changes.
  29.  
  30. 2.1 Click this cancel and continue editing.
  31.  
  32. 3.1 Click this to discard changes - you may lose some of your work!
  33.  
  34. END-DIALOG
  35.  
  36. MENU 129 File
  37.  
  38. 0.1 Use this menu to work with documents.
  39.  
  40. 1.1 Create a new document.
  41. 1.2 Create a new document.  Not available because you can only work with one document.
  42.  
  43. 2.1 Open an existing document.
  44. 2.2 Open an existing document.  Not available because you can only work with one document.  Close the current document first.
  45.  
  46. 4.1 Close the front window.
  47. 4.2 Close the front window.  Not available because there are no windows open or the front window canユt be closed.
  48.  
  49. 10.1 Quit this application.
  50.  
  51. END-MENU
  52.  
  53. END
  54.  
  55. That would create three resources.  An hdlg resource describing dialog 200, An hmnu resource for menu 129, and a STR# resource (id 26724) containing all the text.
  56.  
  57. Note: The Help Manager wonユt use your dialog help unless you open the DITL in ResEdit and select Balloon Help and tell it to use HMScanhdlg with the same ID as specified in the .bh file.
  58.  
  59. Formal Specification
  60.  
  61. ・    Lines are limited to 254 characters.
  62. ・    White space at the start or end of a line is trimmed
  63. ・    Lines starting with one of #;/*{ are comments and are ignored completely.
  64. ・    Line endings are significant, so lines must not be hard wrapped.  You can join lines by placing an option-L (ツ) character at the end of the line.  Donユt forget to leave a space before the ツ character or on the next line, otherwise the words will join together.
  65. ・    Blank lines are significant (comments are not blank lines).
  66. ・    The file is case-insensitive (although the balloon help text is obviously case sensitive).
  67.  
  68. A single space below means <whitespace>.
  69.  
  70. The STR# command
  71.  
  72. STR# <id> <name>
  73.  
  74. Specifies the STR# id of the generate STR# resource.  At most one per file is allowed. Default is 26724, you are encouraged to use the default unless there is good reason not to.  It must come before any other commands.
  75.  
  76. Dialog Help Text
  77.  
  78. DIALOG <id> <name>
  79. <items>
  80. END-DIALOG
  81.  
  82. Menu Help Text
  83.  
  84. MENU <id> <name>
  85. <items>
  86. END-MENU
  87.  
  88. Soft End-Of-File
  89.  
  90. END
  91.  
  92. Terminates the file, nothing after this point is processed.
  93.  
  94. Specifying Help Text
  95.  
  96. <items> is one or more <item> lines.
  97.  
  98. <item> is either a blank line or <item-spec> <balloon-help-text>
  99.  
  100. <item-spec> is [<index>.]<balloon-kind>
  101.  
  102. <index> is the item index (dialog item or menu item - menu item 0 is the menu title).  It is optional, and if it is missing, the last index is used (incremented once for each blank line since the last use), so you can separate dialog or menu items by a blank line and omit the index specifier.
  103.  
  104. <balloon-kind> is the balloon type as documented in IM6, one of:
  105. ・    メ1モ or メenabledモ or メhighlightedモ
  106. ・    メ2モ or メdisabledモ or メdimmedモ
  107. ・    メ3モ or メcheckedモ
  108. ・    メ4モ or メmarkedモ or メmultipartモ
  109.  
  110. <balloon-help-text> is the text for this index.balloon-kind pair.  You can include the option-L (ツ) character in the string (but not at the end of a line) and it will be converted to a return character.
  111.  
  112. <id> is a resource ID.
  113.  
  114. <name> is the resource name.
  115.  
  116. <whitespace> means any sequence of one or more spaces or tabs.
  117.  
  118. The order of <items> lines is irrelevant except where the index specifier is omitted.
  119.  
  120. Duplicate text appears only once in the STR#.
  121.  
  122. Check out the example project for more information.
  123.  
  124. Limitations
  125.  
  126. Requires CodeWarrior 7 or later.
  127.  
  128. Small Print
  129.  
  130. This program is Shareware, which means if you use it, you must pay me US$20 using the Register program.
  131.  
  132. Site Licensing:
  133. World-wide license: US$2000
  134. Universities or companies site license: US$500
  135. Single-user license: US$20.
  136.  
  137. Use the Register provided to fill out the registration form and send (Email, Snail-Mail or FAX) it to my US distributor, Kagi Shareware.
  138.  
  139. You may distribute this program any way you wish as long as you don't charge for it (except for reasonable download costs).  I donユt guarantee any support, but I always answer my Email.  If I donユt answer Email its because your message didnユt get to me, or my reply bounced, so try again and include a valid Internet address if you can.
  140.  
  141. You MAY NOT DISTRIBUTE this program on any disk costing more than $5 without my explicit permission.  You MAY NOT DISTRIBUTE this program on any CD without my explicit permission.
  142.  
  143. Warranty
  144.  
  145. This program should do what Iユve described in this document.  If it doesnユt, you can simply stop using it.  If you pay me, and within a year find that it doesnユt do what I describe here, then you can notify me and I will refund your money and cancel your license.
  146.  
  147. Fine Print
  148.  
  149. Peter Lewis hereby disclaims all warranties relating to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose.  Peter Lewis will not be liable for any special, incidental, consequential, indirect or similar damages due to loss of data or any other reason, even if Peter Lewis or an agent of his has been advised of the possibility of such damages.  In no event shall Peter Lewis be liable for any damages, regardless of the form of the claim.  The person using the software bears all risk as to the quality and performance of the software.
  150.  
  151. US Government:
  152.         Government End Users:  If you are acquiring the Software and fonts on behalf of any unit or agency of the United States Government, the following provisions apply.  The Government agrees:
  153.         (i) if the Software and fonts are supplied to the Department of Defense (DoD), the Software and fonts are classified as "Commercial Computer Software" and the Government is acquiring only "restricted rights" in the Software, its documentation and fonts as that term is defined in Clause 252.227-7013(c)(1) of the DFARS; and
  154.         (ii) if the Software and fonts are supplied to any unit or agency of the United States Government other than DoD, the Government's rights in the Software, its documentation and fonts will be as defined in Clause 52.227-19(c)(2) of the FAR or, in the case of NASA, in Clause 18-52.227-86(d) of the NASA Supplement to the FAR.
  155.  
  156. Acknowledgements
  157.  
  158. Thanks go to Metrowerks for making such a fine compiler, for saving Pascal (which I use for most of my programs including this one), for having great tech support, and for opening their environment to plugin compiler writers.
  159.