home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / help / cppwvbfp.inf (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1996-02-16  |  239.1 KB  |  7,073 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About this Book ΓòÉΓòÉΓòÉ
  3.  
  4.      About Visual Builder 
  5.  
  6.      Who should use this book 
  7.  
  8.      Notices 
  9.  
  10.      Trademarks 
  11.  
  12.      How to use the Contents 
  13.  
  14.      How to obtain additional information 
  15.  
  16.      How to use menu bar choices 
  17.  
  18.         -  Placing bookmarks 
  19.  
  20.         -  Searching for information 
  21.  
  22.         -  Printing information 
  23.  
  24.         -  Copying information to a file 
  25.  
  26.      How to cut and paste examples 
  27.  
  28.      How to read syntax diagrams 
  29.  
  30.      Highlighting conventions 
  31.  
  32.      Other information you might find helpful 
  33.  
  34.         -  Visual Builder books 
  35.  
  36.         -  User interface programming and design books 
  37.  
  38.         -  Object-oriented programming and design books 
  39.  
  40.      Communicating your comments to IBM 
  41.  
  42.  
  43. ΓòÉΓòÉΓòÉ 1.1. About Visual Builder ΓòÉΓòÉΓòÉ
  44.  
  45. Welcome to Visual Builder-a quick and easy way to create an application from 
  46. reuseable parts! 
  47.  
  48. Just about any construction project that you can imagine involves assembling 
  49. standard or customized basic parts into more complex parts. This process is 
  50. repeated until the final product is complete. If you are building a birdhouse, 
  51. these basic parts might be lumber, screws, wire, and paint. Some parts, such as 
  52. screws and paint, can be used in their standard form. Other parts, such as 
  53. lumber and wire, come in a standard form but need to be customized, or cut, 
  54. before you use them. 
  55.  
  56. If reusable software parts are available, building a software application can 
  57. be conceptually similar to building a birdhouse. You can use the software parts 
  58. as-is, as you would with the screws, or tailor the software parts to your exact 
  59. needs, as you would with the lumber. 
  60.  
  61. In both scenarios, you need to decide whether to build or buy the basic parts 
  62. for your construction project. If you decide to build some basic software 
  63. parts, this book guides you through the process (you will need to read about 
  64. creating the parts of a birdhouse somewhere else). If you decide to buy the 
  65. software parts, this book can help you to choose well-constructed software 
  66. parts. 
  67.  
  68. Reusable parts can be thought of as the building blocks of the applications you 
  69. are constructing with Visual Builder. As with any construction project, you 
  70. need to either buy or build the parts you need. This book describes how to 
  71. design and construct basic building-block parts using the C++ programming 
  72. language. 
  73.  
  74. If you are familiar with VisualAge for Smalltalk, you already know about 
  75. constructing applications from parts. The details of how to implement C++ parts 
  76. is a little different than implementing IBM Smalltalk parts, but the overall 
  77. concepts and architecture are the same. 
  78.  
  79.  
  80. ΓòÉΓòÉΓòÉ 1.2. Who Should Use This Book ΓòÉΓòÉΓòÉ
  81.  
  82. This book is designed for experienced C++ programmers who need to build parts 
  83. for use with Visual Builder. It can also be useful to Visual Builder users who 
  84. need a deeper understanding of how Visual Builder works or who want an 
  85. introduction to C++ parts. 
  86.  
  87. Before you begin to use this information, it would be helpful to understand how 
  88. to navigate through it. You can use the Table of Contents and Index facility to 
  89. locate topics and the Search facility to search the text of this document. You 
  90. can use hypertext links to acquire related information on the current topic. 
  91. Hypertext links appear in a different color. For example, here is a link to 
  92. another panel: Communicating Your Comments to IBM By double-clicking on the 
  93. text of the link or by pressing Enter on a highlighted link, you will open a 
  94. panel of related information. When you open a panel, the first link has the 
  95. focus; to shift the focus to other links, use the Tab key. 
  96.  
  97. You should also understand the following: 
  98.  
  99.      How to use the Contents 
  100.      How to obtain additional information 
  101.      How to use menu bar choices 
  102.      How to cut and paste examples 
  103.  
  104.  
  105. ΓòÉΓòÉΓòÉ 1.3. Notices ΓòÉΓòÉΓòÉ
  106.  
  107. (C) Copyright International Business Machines Corporation, 1992, 1996. All 
  108. rights reserved. 
  109.  
  110. Note to U.S. Government Users - Documentation related to restricted rights - 
  111. Use, duplication, or disclosure is subject to restrictions set forth in GSA ADP 
  112. Schedule Contract with IBM Corp. 
  113.  
  114. First Edition, February 1996. 
  115.  
  116. This edition applies to Version 3.5 of VisualAge for C++ (33H4979, 33H4980) and 
  117. to all subsequent releases and modifications until otherwise indicated in new 
  118. editions.  Make sure you are using the correct edition for the level of the 
  119. product. 
  120.  
  121. This publication could include technical inaccuracies or typographical errors. 
  122. Changes are periodically made to the information herein; any such changes will 
  123. be reported in subsequent revisions. 
  124.  
  125. Requests for publications and for technical information about IBM products 
  126. should be made to your IBM Authorized Dealer or your IBM Marketing 
  127. Representative. 
  128.  
  129. When you send information to IBM, you grant IBM a nonexclusive right to use or 
  130. distribute the information in any ways it believes appropriate without 
  131. incurring any obligation to you. 
  132.  
  133. Any reference to an IBM licensed program in this publication is not intended to 
  134. state or imply that only IBM's licensed program may be used. Any functionally 
  135. equivalent product, program, or service that does not infringe any of IBM's 
  136. intellectual property rights can be used instead of the IBM product, program, 
  137. or service. Evaluation and verification of operation in conjunction with other 
  138. products, except those expressly designated by IBM, is the user's 
  139. responsibility. 
  140.  
  141. IBM may have patents or pending patent applications covering subject matter in 
  142. this document. The furnishing of this document does not give you any license to 
  143. these patents. You can send license inquiries, in writing, to the IBM Director 
  144. of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood, NY 10594, USA. 
  145.  
  146. Licensees of this program who wish to have information about it for the purpose 
  147. of enabling:  (i) the exchange of information between independent created 
  148. programs and other programs (including this one) and (ii) the mutual use of the 
  149. information which has been exchanged, should contact IBM Canada Ltd., 
  150. Department 071, 1150 Eglinton Avenue East, North York, Ontario M3C 1H7, Canada. 
  151. Such information may be available, subject to appropriate terms and conditions, 
  152. including in some cases payment of a fee. 
  153.  
  154. This publication contains examples of data and reports used in daily business 
  155. operations. To illustrate them as completely as possible, the examples include 
  156. the names of individuals, companies, brands, and products. All of these names 
  157. are fictitious and any similarity to the names and addresses used by an actual 
  158. business enterprise is entirely coincidental. 
  159.  
  160.  
  161. ΓòÉΓòÉΓòÉ 1.4. Trademarks ΓòÉΓòÉΓòÉ
  162.  
  163. The following terms are trademarks of the IBM Corporation in the United States 
  164. or other countries: 
  165.  
  166.       AIX 
  167.       BookManager 
  168.       Common User Access 
  169.       CUA 
  170.       IBM 
  171.       IBMLink 
  172.       Library Reader 
  173.       OS/2 
  174.       OS/2 Warp 
  175.       PROFS 
  176.       QuickBrowse 
  177.       SAA 
  178.       System Object Model 
  179.       VisualAge 
  180.       WorkFrame 
  181.       Workplace Shell 
  182.  
  183.  Windows is a trademark of Microsoft Corporation. 
  184.  
  185.  Other company, product, and service names, which may be denoted by a double 
  186.  asterisk (**), may be trademarks of others. 
  187.  
  188.  IBM's VisualAge products and services are not associated with or sponsored by 
  189.  Visual Edge Software, Ltd. 
  190.  
  191.  
  192. ΓòÉΓòÉΓòÉ 1.5. How to Use the Contents ΓòÉΓòÉΓòÉ
  193.  
  194. When the Contents window first appears, some topics have a plus (+) sign beside 
  195. them. The plus sign indicates that additional topics are available. 
  196.  
  197. To expand the Contents if you are using a mouse, click on the plus sign. If you 
  198. are using the keyboard, use the Up or Down arrow key to highlight the topic, 
  199. and press the plus (+) key. For example, How to Use the Contents has a plus 
  200. sign beside it.  To see additional topics for that heading, click on the plus 
  201. sign or highlight that topic and press the plus (+) key. 
  202.  
  203. To view a topic, double-click on the topic (or press the Up or Down arrow key 
  204. to highlight the topic, and then press the Enter key). 
  205.  
  206.  
  207. ΓòÉΓòÉΓòÉ 1.6. How to Obtain Additional Information ΓòÉΓòÉΓòÉ
  208.  
  209. After you select a topic, the information for that topic appears in a window. 
  210. Highlighted words or phrases indicate that additional information is available. 
  211. Certain words and phrases are highlighted in a different color from the 
  212. surrounding text. These are called hypertext terms. 
  213.  
  214. If you are using a mouse, double-click on the highlighted word.  If you are 
  215. using a keyboard, press the Tab key to move to the highlighted word, and then 
  216. press the Enter key.  Additional information then appears in a window. 
  217.  
  218.  
  219. ΓòÉΓòÉΓòÉ 1.7. How to Use Menu Bar Choices ΓòÉΓòÉΓòÉ
  220.  
  221. Several choices are available for managing the information presented in this 
  222. document. There are three choices on the menu bar: the Services menu, the 
  223. Options menu, and the Help menu. 
  224.  
  225. Use the Services menu to operate the active window currently displayed on the 
  226. screen. Available actions include the following: 
  227.  
  228.  Placing bookmarks 
  229.    You can set a placeholder so you can retrieve information of interest to 
  230.    you. 
  231.  
  232.  Searching for information 
  233.    You can find occurrences of a word or phrase in the current topic, selected 
  234.    topics, or all topics. 
  235.  
  236.  Printing information 
  237.    You can print one or more topics. You can also print a set of topics by 
  238.    first marking the topics in the Contents list. 
  239.  
  240.  Copying information to a file 
  241.    You can copy a topic that you are viewing to the System Clipboard or to a 
  242.    file that you can edit. This method is particularly useful for copying 
  243.    syntax definitions and program samples into the application that you are 
  244.    developing. 
  245.  
  246.  Select actions from the Options menu to change the way your Contents list is 
  247.  displayed. To expand the Contents and show all levels for all topics, choose 
  248.  Expand all from the Options pull-down. You can also press the Ctrl, Shift, and 
  249.  * keys together. 
  250.  
  251.  You can select various types of help information from the Help menu. 
  252.  
  253.  For information about any of the menu choices, highlight the choice in the 
  254.  menu and press F1. 
  255.  
  256.  
  257. ΓòÉΓòÉΓòÉ 1.7.1. Placing Bookmarks ΓòÉΓòÉΓòÉ
  258.  
  259. When you place a bookmark on a topic, it is added to a list of bookmarks you 
  260. have previously set.  You can view the list, and you can remove one or all 
  261. bookmarks from the list.  If you have not set any bookmarks, the list is empty. 
  262.  
  263. To set a bookmark, do the following: 
  264.  
  265.    1. Select a topic from the Contents. 
  266.    2. When that topic appears, select the Bookmark option from the Services 
  267.       menu. 
  268.    3. If you want to change the name used for the bookmark, type the new name 
  269.       in the field. 
  270.    4. Click on the Place radio button (or press the Up or Down arrow key to 
  271.       select it). 
  272.    5. Click on OK (or select it and press Enter). The bookmark is then added to 
  273.       the bookmark list. 
  274.  
  275.  
  276. ΓòÉΓòÉΓòÉ 1.7.2. Searching for Information ΓòÉΓòÉΓòÉ
  277.  
  278. You can specify a word or phrase to be searched.  You can also limit the search 
  279. to a set of topics by first marking the topics in the Contents list. 
  280.  
  281. To search for a word or phrase in all topics, do the following: 
  282.  
  283.    1. Select the Search option from the Services menu. 
  284.    2. Type the word or words to be searched for. 
  285.    3. Click on All sections (or press the Up or Down arrow keys to select it). 
  286.    4. Click on Search (or select it and press Enter) to begin the search. 
  287.    5. The list of topics where the word or phrase appears is displayed. 
  288.  
  289.  
  290. ΓòÉΓòÉΓòÉ 1.7.3. Printing Information ΓòÉΓòÉΓòÉ
  291.  
  292. You can print one or more topics, the index, or the table of contents.  Make 
  293. sure that your printer is connected to the serial port, configured correctly, 
  294. and ready for input. To print: 
  295.  
  296.    1. Select Print from the Services pull-down. 
  297.    2. Select what you want to print. Note that the This section and Marked 
  298.       sections choices are only available if you are viewing a topic or if you 
  299.       have marked topics, respectively.  To mark topics in the table of 
  300.       contents, press the Ctrl key and click on the topics, or use the arrow 
  301.       keys. 
  302.    3. Select Print to print what you've chosen on your printer. 
  303.  
  304.  
  305. ΓòÉΓòÉΓòÉ 1.7.4. Copying Information to a File ΓòÉΓòÉΓòÉ
  306.  
  307. You can copy a topic that you are viewing in two ways: 
  308.  
  309.      Copy copies the topic that you are viewing into the System Clipboard. 
  310.  
  311.      Copy to file copies the topic that you are viewing into a temporary file 
  312.       named text.tmp.  You can later edit that file by using any editor. 
  313.       text.tmp is placed in the directory where your viewable document resides. 
  314.       This copy function does not apply if you are viewing the document from 
  315.       the CD-ROM. 
  316.  
  317.  To copy a topic, do the following: 
  318.  
  319.    1. Expand the Contents list and select a topic. 
  320.    2. When the topic appears, select Copy to file from the Services menu. 
  321.    3. The system puts the text pertaining to that topic into the temporary file 
  322.       text.tmp. 
  323.  
  324.  
  325. ΓòÉΓòÉΓòÉ 1.8. How to Cut and Paste Examples ΓòÉΓòÉΓòÉ
  326.  
  327. You can copy examples (or information) from this reference/guide/book to 
  328. compile, link, and run them, or to paste them into your own code. This copy 
  329. function does not apply if you are viewing the document from the CD-ROM. 
  330.  
  331. To copy an example or information: 
  332.  
  333.    1. Make the topic you want to copy the active window. 
  334.  
  335.    2. From the Services menu, select Copy to file. The text in that topic is 
  336.       placed in the temporary file text.tmp, in the same directory as this 
  337.       reference. 
  338.  
  339.    3. You can then modify or use text.tmp as you want. 
  340.  
  341.  Note:  Because the system copies the entire contents of the topic to the file, 
  342.  you may need to edit it to remove additional text. 
  343.  
  344.  
  345. ΓòÉΓòÉΓòÉ 1.9. Highlighting Conventions ΓòÉΓòÉΓòÉ
  346.  
  347. This book uses the following highlighting conventions: 
  348.  
  349.       Bold : Key interface items in code listings; areas in code examples that 
  350.       are described in accompanying text. Example: Select Tools from the menu 
  351.       bar. 
  352.  
  353.       Monospace : C++ coding examples; text that the user enters; messages 
  354.       within text. Examples follow: 
  355.  
  356.            The following code from the IAddress class illustrates ... 
  357.  
  358.            The street member function returns the current street. 
  359.  
  360.       Italics : Emphasis of words; the first time a glossary term is used; 
  361.       titles of books. Examples follow: 
  362.  
  363.            ... stored in persistent objects ... 
  364.  
  365.            Refer to Object-Oriented User Interface Design - IBM Common User 
  366.            Access Guidelines. 
  367.  
  368.  
  369. ΓòÉΓòÉΓòÉ 1.10. How to Read Syntax Diagrams ΓòÉΓòÉΓòÉ
  370.  
  371. This book uses syntax diagrams to show the syntax of some of the commands 
  372. described. 
  373.  
  374.      Read the syntax diagrams from left to right, from top to bottom, 
  375.       following the path of the line. 
  376.  
  377.       The >>ΓöÇΓöÇΓöÇ symbol indicates the beginning of a command. 
  378.  
  379.       The ΓöÇΓöÇΓöÇ> symbol indicates that the command is continued on the next line. 
  380.  
  381.       The >ΓöÇΓöÇΓöÇ symbol indicates that a command is continued from the previous 
  382.       line. 
  383.  
  384.       The ΓöÇΓöÇΓöÇ>< symbol indicates the end of a command. 
  385.  
  386.       Diagrams of syntactical units other than complete commands start with the 
  387.       >ΓöÇΓöÇΓöÇ symbol and end with the ΓöÇΓöÇΓöÇ> symbol. 
  388.  
  389.       Note:  In the following diagrams, COMMAND represents a command. 
  390.  
  391.      Required items appear on the horizontal line (the main path). 
  392.  
  393.             >>ΓöÇΓöÇCOMMAND ΓöÇΓöÇ required_item ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  394.  
  395.      Optional items appear below the main path. 
  396.  
  397.             >>ΓöÇΓöÇCOMMAND ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  398.                    ΓööΓöÇ optional_item ΓöÇΓöÿ
  399.  
  400.      If you can choose from two or more items, they appear vertically in a 
  401.       stack. 
  402.  
  403.       If you must choose one of the items, one item of the stack appears on the 
  404.       main path. 
  405.  
  406.             >>ΓöÇΓöÇCOMMAND ΓöÇΓö¼ΓöÇΓöÇrequired_choice1ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  407.                    ΓööΓöÇ required_choice2 ΓöÇΓöÿ
  408.  
  409.       If choosing one of the items is optional, the entire stack appears below 
  410.       the main path. 
  411.  
  412.             >>ΓöÇΓöÇCOMMAND ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  413.                    Γö£ΓöÇ optional_choice1 ΓöÇΓöñ
  414.                    ΓööΓöÇ optional_choice2 ΓöÇΓöÿ
  415.  
  416.       The item that is the default appears above the main path. 
  417.  
  418.                    ΓöîΓöÇΓöÇ default_item ΓöÇΓöÇΓöÇΓöÇΓöÉ
  419.             >>ΓöÇΓöÇCOMMAND ΓöÇΓö┤ΓöÇΓöÇ alternate_item ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  420.  
  421.      An arrow returning to the left above the main line indicates an item that 
  422.       can be repeated. 
  423.  
  424.                    ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  425.                    V           Γöé
  426.             >>ΓöÇΓöÇCOMMAND ΓöÇΓöÇΓöÇΓöÇ repeatable_item ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  427.  
  428.       A repeat arrow above a stack indicates that you can make more than one 
  429.       choice from the stacked items, or you can repeat a single choice. 
  430.  
  431.      Keywords appear in nonitalic letters and should be entered exactly as 
  432.       shown (for example, pragma). 
  433.  
  434.       Variables appear in italicized lowercase letters (for example, 
  435.       identifier). They represent user-supplied names or values. 
  436.  
  437.      If punctuation marks, parentheses, arithmetic operators, or other such 
  438.       symbols are shown, you must enter them as part of the syntax. 
  439.  
  440.  Note:  The white space is not always required between items, but it is 
  441.  recommended that you include at least one blank between items unless otherwise 
  442.  specified. 
  443.  
  444.  
  445. ΓòÉΓòÉΓòÉ 1.11. Other Information You Might Find Useful ΓòÉΓòÉΓòÉ
  446.  
  447. This product provides a number of online guides and references that we hope you 
  448. will find helpful as you develop applications. This information includes User's 
  449. Guides, References, and How Do I help that gives you specific instructions for 
  450. performing common tasks. You can get to this online information from the 
  451. Information folder inside the main product folder.  You can also get to it from 
  452. the Help menu in any of the components of the product. 
  453.  
  454. You can consult the following books for additional information about Visual 
  455. Builder, user interface software design, and object-oriented software design: 
  456.  
  457.       Visual Builder books 
  458.       User interface programming and design books 
  459.       Object-oriented programming and design books 
  460.  
  461.  
  462. ΓòÉΓòÉΓòÉ 1.11.1. Visual Builder Books ΓòÉΓòÉΓòÉ
  463.  
  464.      VisualAge for C++: Visual Builder User's Guide (S33H-5034-00) 
  465.  
  466.      VisualAge for C++: Visual Builder Parts Reference (S33H-5035-00) 
  467.  
  468.  
  469. ΓòÉΓòÉΓòÉ 1.11.2. User Interface Programming and Design Books ΓòÉΓòÉΓòÉ
  470.  
  471. In addition to the specific Visual Builder books listed previously, the 
  472. following books help you give a professional appearance to your part's user 
  473. interfaces: 
  474.  
  475.      Object-Oriented User Interface Design - IBM Common User Access 
  476.       Guidelines, Carmel, IN: Que Corporation, 1993. ISBN: 1-56529-170-0. 
  477.  
  478.      Volume 6A: Motif Programming Manual, 2nd Edition, Sebastopol, CA: 
  479.       O'Reilly & Associates, Inc., 1993. 
  480.  
  481.      Volume 6B: Motif Reference Manual, Sebastopol, CA: O'Reilly & Associates, 
  482.       Inc., 1993. ISBN: 1-56592-038-4. 
  483.  
  484.  
  485. ΓòÉΓòÉΓòÉ 1.11.3. Object-Oriented Programming and Design Books ΓòÉΓòÉΓòÉ
  486.  
  487. In addition to the specific Visual Builder books listed previously, you might 
  488. want to refer to a book about application design in the object-oriented and the 
  489. cooperative-processing environments. Some of the available books are as 
  490. follows: 
  491.  
  492.      Booch, Grady, Object-Oriented Design with Applications, Redwood City, CA: 
  493.       Benjamin/Cummings Publishing Company, 1991. ISBN: 0-8053-0091-0. 
  494.  
  495.      Coplien, James O., Advanced C++ Programming Styles and Idioms, Addison 
  496.       Wesley Publishing Company, 1992. ISBN: 0-201-54855-0. 
  497.  
  498.      Cox, Brad J., Object-Oriented Programming: An Evolutionary Approach, 
  499.       Reading, MA: Addison Wesley Publishing Company, 1987. ISBN: 0201103931. 
  500.  
  501.      Stroustrup, Bjarne, The Design and Evolution of C++, Murray Hill, NJ: 
  502.       Addison Wesley Publishing Company, 1994. ISBN: 0-201-54330-3. 
  503.  
  504.      Tibbetts, John et al., Building Cooperative Processing Applications Using 
  505.       SAA, New York, NY: John Wiley & Sons, Inc., 1992. ISBN: 0-471-55485-5. 
  506.  
  507.      Wirfs-Brock, Rebecca et al., Designing Object-Oriented Software, 
  508.       Englewood Cliffs, NJ: Prentice Hall, 1990. ISBN: 0-13-629825-7. 
  509.  
  510.  
  511. ΓòÉΓòÉΓòÉ 1.12. Communicating Your Comments to IBM ΓòÉΓòÉΓòÉ
  512.  
  513. If there is something you like, or dislike, about this book, please let us 
  514. know.  You can use one of the methods listed below to send your comments to 
  515. IBM.  Please be sure to include the complete title of the publication that you 
  516. are commenting on. 
  517.  
  518. The comments you send should only pertain to the information in this document 
  519. and its presentation.  To request additional publications or to ask questions 
  520. or make comments about the functions of IBM products or systems, you should 
  521. talk to your IBM representative or you authorized IBM remarketer. 
  522.  
  523. When you send comments to IBM, you grant IBM a nonexclusive right to use or 
  524. distribute your comments in any way it believes appropriate without incurring 
  525. any obligation to you. 
  526.  
  527. You can send your comments to IBM in the following ways: 
  528.  
  529.      By mail to the following address: 
  530.  
  531.             IBM Canada Ltd. Laboratory
  532.             Information Development
  533.             2G/345/1150/TOR
  534.             1150 EGLINTON AVENUE EAST
  535.             NORTH YORK, ONTARIO
  536.             CANADA M3C 1H7
  537.  
  538.      By FAX to the following number: 
  539.  
  540.         -  United States and Canada: (416) 448-6161 
  541.         -  Other countries (+1) 416-448-6161 
  542.  
  543.      By electronic mail to one of the following IDs.  Be sure to include your 
  544.       entire network address if you wish to get a reply. 
  545.  
  546.         -  Internet: torrcf@vnet.ibm.com 
  547.         -  IBMLink: toribm(torrcf) 
  548.         -  IBM/PROFS: torolab4(torrcf) 
  549.         -  IBMMAIL: ibmmail(caibmwt9 
  550.  
  551.  
  552. ΓòÉΓòÉΓòÉ 2. What Is C++ Construction from Parts? ΓòÉΓòÉΓòÉ
  553.  
  554.      Overview 
  555.  
  556.      The origins of C++ Construction from Parts 
  557.  
  558.      The benefits of using parts 
  559.  
  560.      What is a part? 
  561.  
  562.      How parts and classes are related 
  563.  
  564.      How you can connect parts 
  565.  
  566.      Sources of parts 
  567.  
  568.  Personal notes: 
  569.  
  570.  
  571. ΓòÉΓòÉΓòÉ 2.1. Overview ΓòÉΓòÉΓòÉ
  572.  
  573. C++ construction from parts is a technology for application development in 
  574. which applications are built from existing, reusable software components called 
  575. parts. Parts provide a wide range of capability, from very simple function 
  576. through complete, highly sophisticated applications. The following figure shows 
  577. a few examples. 
  578.  
  579. An entry field, a window, and a data array are examples of primitive parts. You 
  580. combine primitive parts to form more complex composite parts, such as a person 
  581. view. You can then extend this approach by combining primitive parts with 
  582. composite parts to create entire applications, such as a customer query 
  583. application. 
  584.  
  585. In general, parts are either visual or nonvisual. In the previous example, the 
  586. entry field, window, and person view are visual parts. The data array is a 
  587. nonvisual part. For more information about types of parts, see Kinds of Parts 
  588. Supported in Visual Builder. 
  589.  
  590.  
  591. ΓòÉΓòÉΓòÉ 2.2. The Origins of C++ Construction from Parts ΓòÉΓòÉΓòÉ
  592.  
  593. The C++ construction from parts technology is just becoming popular in the 
  594. software industry, but it is based on well-established techniques from other 
  595. industries, such as manufacturing. The figure below compares the manufacturing 
  596. process of constructing a computer system and the software process of 
  597. constructing an application. 
  598.  
  599. Just as electronic chips can be combined to form a functional board and 
  600. functional boards can be combined to form a computer, software parts can be 
  601. combined to form a composite part and composite parts can be combined to form 
  602. an application. 
  603.  
  604. To build a new computer today, you probably would not consider designing and 
  605. constructing every single electronic and mechanical component from raw 
  606. materials. Likewise, rather than always designing and developing new code for 
  607. your applications, you can now use available standard parts. Now the software 
  608. application development industry can realize the same benefits of reduced cycle 
  609. time and increased quality that have become so prevalent in the manufacturing 
  610. industry. 
  611.  
  612.  
  613. ΓòÉΓòÉΓòÉ 2.3. The Benefits of Using Parts ΓòÉΓòÉΓòÉ
  614.  
  615. The benefits that you and your company can realize from using the C++ 
  616. construction from parts technology to build applications include the following: 
  617.  
  618.      Reduced application development cost through division of labor. 
  619.  
  620.       Application developers are able to focus their expertise on rapid 
  621.       development of superior solutions for their users by tailoring reusable 
  622.       parts and assembling them into applications. Meanwhile, part designers 
  623.       can concentrate on developing new and innovative parts to meet the needs 
  624.       of the application developers. 
  625.  
  626.      Enhanced application quality and reliability. 
  627.  
  628.       Reusing existing parts reduces the chance of introducing errors when 
  629.       building applications. As parts are reused and refined, they become the 
  630.       solid building blocks for your applications. 
  631.  
  632.      Reduced cycle time to respond to users' needs. 
  633.  
  634.       Building an application prototype from a library of pre-existing parts 
  635.       allows you to rapidly verify your users' requirements. You can then 
  636.       smoothly and quickly extend this prototype into a production application. 
  637.  
  638.  Your success in using this technology depends on the availability of 
  639.  easy-to-use construction tools, standard interface protocols to enable the 
  640.  tools and parts to interoperate, and an ever-growing library of standard, 
  641.  increasingly powerful parts to be reused. 
  642.  
  643.  
  644. ΓòÉΓòÉΓòÉ 2.4. What Is a C++ Part? ΓòÉΓòÉΓòÉ
  645.  
  646. A C++ part is a software object implemented as a C++ class with some special 
  647. characteristics: 
  648.  
  649.      It supports a simple, standard interface protocol. 
  650.  
  651.       This protocol supports the interconnection of parts to form 
  652.       higher-function parts or entire applications. You can think of this 
  653.       protocol as being like the "innies" and "outies" on puzzle pieces that 
  654.       enable them to be interlocked into larger portions of the puzzle. 
  655.  
  656.       The part interface is composed of three distinct features: attributes, 
  657.       actions, and events. These features correspond to a natural way of 
  658.       viewing parts (and objects in general) in terms of what properties 
  659.       (attributes) they have, what behaviors (actions) they can perform, and 
  660.       what unsolicited information (events) they can notify other parts about. 
  661.       The following figure shows an example of a part interface. 
  662.  
  663.      It can extend the functions of application building tools. 
  664.  
  665.       The part itself can extend the construction environment by providing tool 
  666.       functions specifically customized to the part. Examples of these tool 
  667.       functions are icons, automated view builders, and attribute value 
  668.       initialization. You can think of the picture on the top of real jigsaw 
  669.       puzzle pieces as a tool extension-it enhances the ability of the tool 
  670.       (you) to complete the job (putting this particular puzzle together). 
  671.  
  672.  
  673. ΓòÉΓòÉΓòÉ 2.5. How Parts and Classes Are Related ΓòÉΓòÉΓòÉ
  674.  
  675. If you are familiar with object-oriented concepts, you have probably noticed 
  676. that a part is very much like an object in object-oriented programming. In 
  677. fact, parts and classes are closely related because C++ classes form the 
  678. underlying software implementation of parts. 
  679.  
  680. It might seem to you that we are not always talking about the same thing when 
  681. we talk about a part. This is because the word part can mean different things 
  682. at different times. 
  683.  
  684. Part is most often used as shorthand for part class. A part class is nothing 
  685. more than an object class with some special characteristics (such as a class 
  686. method that defines the part interface of the part). A part class is used as a 
  687. form for creating part instances. You can develop a new part, or enable an 
  688. existing class to become a part, by supplying support for these characteristics 
  689. in addition to the normal operations of the object class. 
  690.  
  691. Part is also used as shorthand for part instance. A part instance is a 
  692. particular object created from a part class. In C++, you might code an 
  693. expression such as 
  694.  
  695.  BananaClass * aBananaInstance = new BananaClass(); 
  696.  
  697. to create a particular instance of a part class. In a visual programming 
  698. environment, you might create a particular part instance by picking a Banana 
  699. part class from a palette of part classes and dropping it on a free-form 
  700. surface. 
  701.  
  702. You can tell which kind of part we are talking about from the context in which 
  703. the word appears. When we talk about parts on a palette or parts that you 
  704. create by writing code, we are referring to part classes. When we talk about 
  705. parts on a free-form surface or parts that are connected together to form an 
  706. application, we are referring to part instances. 
  707.  
  708. The Architecture of C++ Construction from Parts provides the blueprint for 
  709. adding the characteristics that turn an object class into a part class. It sets 
  710. the stage for you to build your own part classes. 
  711.  
  712.  
  713. ΓòÉΓòÉΓòÉ 2.6. How You Can Connect Parts ΓòÉΓòÉΓòÉ
  714.  
  715. Visual Builder's Composition Editor enables you to connect the following kinds 
  716. of parts: 
  717.  
  718.      A visual part to a visual part 
  719.      A nonvisual part to a nonvisual part 
  720.      A visual part to a nonvisual part 
  721.  
  722.  You can also make the following kinds of connections: 
  723.  
  724.      Event-to-action connections start an action when a certain event occurs. 
  725.       A variation of this, the attribute-event-to-action connection, starts an 
  726.       action when a certain attribute event (for example, attribute changing 
  727.       value) occurs. 
  728.  
  729.       The action can have parameters; these parameters are attributes of the 
  730.       connection. You can connect a single event to many actions. You can also 
  731.       specify the order in which the actions are processed. Connecting the 
  732.       clicked event from a push button to the clear action on an entry field is 
  733.       an example of an event-to-action connection. Connecting the street 
  734.       attribute event from an address to the enable action on a Save push 
  735.       button is an example of an attribute-event-to-action connection. 
  736.  
  737.      Attribute-to-attribute connections link two data values so that they 
  738.       always stay the same. 
  739.  
  740.       You can connect a single attribute to many attributes. Connecting the 
  741.       street attribute of an address part to the text (contents) attribute of 
  742.       an entry field part is an example of an attribute-to-attribute 
  743.       connection. 
  744.  
  745.  
  746. ΓòÉΓòÉΓòÉ 2.7. Sources of Parts ΓòÉΓòÉΓòÉ
  747.  
  748. There are many possible sources for parts that you can combine to build new 
  749. parts or complete applications. 
  750.  
  751. Visual Builder is shipped with a collection of prefabricated parts. These parts 
  752. are the basic visual and nonvisual building blocks of an application. Examples 
  753. are entry fields, push buttons, and data arrays. 
  754.  
  755. Software providers will be creating additional parts. These parts might provide 
  756. additional system support, such as facsimile transmission or e-mail access, 
  757. common business functions, such as charting or report writing, or 
  758. industry-specific functions, such as hospital patient charting or wholesale 
  759. distribution. 
  760.  
  761. Finally, if none of the available parts fulfills your needs, you (or someone in 
  762. your organization) can create new parts either by modifying existing parts to 
  763. add functions, by modifying existing C++ classes to enable them as parts, or by 
  764. building parts just as you would any other C++ class. 
  765.  
  766.  
  767. ΓòÉΓòÉΓòÉ 3. Object Technology Overview ΓòÉΓòÉΓòÉ
  768.  
  769.      The origins of object technology 
  770.  
  771.      The application segmentation paradigm 
  772.  
  773.      Separation of model objects from view objects 
  774.  
  775.      Segmentation within the model 
  776.  
  777.  Personal notes: 
  778.  
  779.  
  780. ΓòÉΓòÉΓòÉ 3.1. The Origins of Object Technology ΓòÉΓòÉΓòÉ
  781.  
  782. As the cost of processing power has decreased, enterprises have taken the 
  783. opportunity to make people more effective. One way of increasing people's 
  784. effectiveness is to make the computer system into an extension of their 
  785. everyday business environment. 
  786.  
  787. In the batch and transaction environments, you were presented with lists of 
  788. functions that you could use. These functions did not necessarily correspond to 
  789. the problem you were trying to solve. Rather, they were the application 
  790. designer's idea of the solutions to the problem you were supposed to have. 
  791.  
  792. With computer power moving to the desktop, a new approach to building 
  793. applications has emerged. This approach provides you with the impression that 
  794. the computer is able to deal with the things that are common to your business, 
  795. such as calendars, notepads, invoices, bank accounts, or a wastebasket. Your 
  796. desktop computer becomes an extension of your real world. 
  797.  
  798. Designing applications to operate in this new environment can be challenging. 
  799. Many books are available to guide you in this endeavor. We only touch lightly 
  800. on the design issues here and suggest that you consult a book devoted to the 
  801. subject if you need in-depth knowledge (see Other Information You Might Find 
  802. Useful). 
  803.  
  804.  
  805. ΓòÉΓòÉΓòÉ 3.2. The Application Segmentation Paradigm ΓòÉΓòÉΓòÉ
  806.  
  807. The following figure shows the structure of an application developed using the 
  808. guidelines presented in this book. This structure follows a common application 
  809. segmentation paradigm in the cooperative processing environment, where an 
  810. application is divided into three segments: user interface, business logic, and 
  811. data access. 
  812.  
  813. The user interface segment defines how the user and the system interact. It 
  814. presents information to the user and accepts input from the user on behalf of 
  815. the business logic. Because it does not implement any of the business logic 
  816. behavior, it can be updated, or completely replaced, without affecting the 
  817. business logic. We refer to this user interface function as a view. 
  818.  
  819. The business logic segment implements the real-world objects of the 
  820. application. It defines the behaviors of these objects and their 
  821. interrelationships without consideration for how they are presented to users or 
  822. how users interact with them. We refer to the business logic segment as a 
  823. model. The implementation of the model can be totally contained in a single 
  824. computer, or it can be distributed among several computers using available 
  825. inter-computer communication mechanisms to interconnect the distributed 
  826. components of the model. 
  827.  
  828. The third segment of an application is data access. From the application 
  829. builder's perspective, this segment can be thought of as simply an extension of 
  830. the model. Because of this, we do not discuss it in this book. You can refer to 
  831. one of the books on cooperative processing environments (see Object-Oriented 
  832. Programming and Design Books) for a detailed discussion. 
  833.  
  834. Segmenting an application in this way provides you several benefits, even 
  835. outside the C++ construction from parts environment. 
  836.  
  837.      It enhances parallel development. 
  838.  
  839.       Prototyping of the views can be done by user interface specialists 
  840.       working with end users. This activity can take place in parallel and is 
  841.       somewhat independent of the development of the underlying model. 
  842.  
  843.      It supports connecting multiple views to the same model. 
  844.  
  845.       Users can access several concurrent views of the business model objects. 
  846.  
  847.      It facilitates cooperative processing. 
  848.  
  849.       The business logic can be effectively distributed between the workstation 
  850.       and one or more servers. 
  851.  
  852.  
  853. ΓòÉΓòÉΓòÉ 3.3. Separation of Model Objects from View Objects ΓòÉΓòÉΓòÉ
  854.  
  855. To segment your application into manageable chunks, first separate your view 
  856. objects from your model objects. By segmenting them, you can provide several 
  857. views of the same model object or objects. The following figure shows two views 
  858. (a detailed view and a tabular view) of a single model. 
  859.  
  860. To use this method of designing applications effectively, keep two important 
  861. points in mind: 
  862.  
  863.      Views can directly update models, but models cannot directly update 
  864.       views. 
  865.  
  866.      Views contain only presentation and user-manipulation logic. Business 
  867.       logic exists only in the model objects. 
  868.  
  869.  The dependency manager (in C++, the notification framework) is used to 
  870.  communicate between views and models in place of sending direct messages. 
  871.  Systems that support the model-view or model-view-controller (MVC) application 
  872.  structure also support a dependency manager function. The specific 
  873.  implementation details may differ from system to system, but the overall 
  874.  concept remains constant. 
  875.  
  876.  The dependency manager maintains lists of objects that depend on the 
  877.  occurrence of specific events. It provides a set of interfaces so that objects 
  878.  can register their dependency on an event or remove their dependency from it. 
  879.  
  880.  An object can signal the occurrence of each of its events to the dependency 
  881.  manager. The dependency manager searches its lists and forwards the 
  882.  notification to the objects that are dependent on the event. These objects can 
  883.  then take action based on the occurrence of the event. 
  884.  
  885.  To see how this works, consider a simple example. You might want to refer back 
  886.  to the previous figure as we go through the example. 
  887.  
  888.  In this example we define one event (nameChanged) that is associated with a 
  889.  change in the name of a person. Assume the upper-left object in the model is a 
  890.  person object. Because it maintains the data about a person, it has a 
  891.  dependency on the nameChanged event. Both view objects must also be notified 
  892.  when the nameChanged event occurs so they can update the content of the name 
  893.  field on the screen. Each of these objects registers a dependency on the 
  894.  nameChanged event with the dependency manager. 
  895.  
  896.  Now, suppose you type over the contents of the name field in the detailView 
  897.  object and then tab out of the field. The view object signals a notification 
  898.  that the nameChanged event has occurred. The dependency manager receives this 
  899.  notification message and looks for its list of nameChanged event dependents. 
  900.  It finds the list and forwards the notification to the objects that have 
  901.  registered their dependency on the event. 
  902.  
  903.  The person object receives the notification and updates its internal data. The 
  904.  tabularView object receives the notification and refreshes the display with 
  905.  the updated name. 
  906.  
  907.  Because the detailView object is also dependent on the nameChanged event, you 
  908.  might wonder why the notification was not forwarded back to it. Also, because 
  909.  the tabularView object signals a notification when the name changes, you might 
  910.  wonder why the program does not go into an endless loop sending this 
  911.  notification around. The answer to both these issues is that the dependency 
  912.  manager recognizes recursive notifications and discards them. 
  913.  
  914.  
  915. ΓòÉΓòÉΓòÉ 3.4. Segmentation within the Model ΓòÉΓòÉΓòÉ
  916.  
  917. We have described one major approach to segmenting your application-dividing it 
  918. into a model and one or more views of that model. You can further segment the 
  919. model into several categories of objects. The following figure shows these 
  920. divisions using the analogy of an iceberg, because most models contain many 
  921. more hidden (nonvisual) objects than visible real-world objects. 
  922.  
  923. The categories shown in the figure are as follows: 
  924.  
  925.  View objects (V). These objects create the user interface display. They 
  926.            implement the interface between users of the application and the 
  927.            application business model. 
  928.  
  929.  Real-world objects (R). These objects implement the physical objects of your 
  930.            business enterprise, such as a car, an invoice, a notepad, or a 
  931.            calendar. Their behavior closely models the behavior of these 
  932.            physical objects. They have a formally specified interface, which 
  933.            allows them to be widely used by application construction tools. 
  934.  
  935.  Implementation objects (I). These objects provide the internal implementation 
  936.            of the real-world objects. They generally correspond to more 
  937.            traditional computer-related entities, such as arrays, numbers, or 
  938.            abstract objects used to collect common behavior. These objects 
  939.            often do not have formally specified interfaces because they are 
  940.            usually designed to be used by programmers rather than by 
  941.            application builders. 
  942.  
  943.  Service objects (S). These objects provide access to external services, such 
  944.            as communication support, database access, or operating system 
  945.            functions. They insulate the real-world and implementation objects 
  946.            from the details of these external services. These objects are also 
  947.            generally designed for programmers, so they might not have formally 
  948.            specified interfaces. 
  949.  
  950.  As an example of this application segmentation, consider an application that 
  951.  shows you the contents of a customer file: 
  952.  
  953.      The windows, entry fields, push buttons, and all other parts of the 
  954.       application's visual interface are view objects. 
  955.  
  956.      The customer object is the real-world object, providing the data about a 
  957.       selected customer to the view objects. 
  958.  
  959.      An array implementation object might be used internally by the customer 
  960.       object to hold the data. 
  961.  
  962.      Service objects support querying a data store and returning the customer 
  963.       information, which insulates all the other objects from dependence upon 
  964.       the kind of data store used to hold the customer records or its location. 
  965.  
  966.  
  967. ΓòÉΓòÉΓòÉ 4. The Architecture of C++ Construction from Parts ΓòÉΓòÉΓòÉ
  968.  
  969.      Overview 
  970.  
  971.      The origins of C++ construction from parts architecture 
  972.  
  973.      Architecture characteristics 
  974.  
  975.  Part interface architecture: 
  976.  
  977.      Access to part properties 
  978.  
  979.      Access to part behavior 
  980.  
  981.      Notification of changes to parts 
  982.  
  983.  Kinds of parts supported in Visual Builder 
  984.  
  985.  Personal notes: 
  986.  
  987.  
  988. ΓòÉΓòÉΓòÉ 4.1. Overview ΓòÉΓòÉΓòÉ
  989.  
  990. The C++ construction from parts architecture has been developed to meet the 
  991. specific need of application developers to have an easier, more productive way 
  992. to create high-quality applications in today's complex application development 
  993. environment. Our ability to conceive this architecture was enabled by the 
  994. evolution of application structure and by the emergence of application-building 
  995. power tools. 
  996.  
  997. This chapter describes the following: 
  998.  
  999.      The origins of the C++ construction from parts architecture 
  1000.      Architecture characteristics 
  1001.      The part interface architecture 
  1002.      Kinds of parts supported in Visual Builder 
  1003.  
  1004.  
  1005. ΓòÉΓòÉΓòÉ 4.2. The Origins of the C++ Construction from Parts Architecture ΓòÉΓòÉΓòÉ
  1006.  
  1007. In the past, applications were designed and implemented with a monolithic 
  1008. structure. In these applications, embedded logic usually governed the flow of 
  1009. control. Such applications controlled the user, rather than allowing the user 
  1010. to control the application. In addition, the monolithic structure led to 
  1011. application components that were highly customized for the application in which 
  1012. they were developed. 
  1013.  
  1014. The following figure shows how these applications evolved from the first 
  1015. generation, monolithic batch applications, to the second generation, online 
  1016. transaction applications. While this evolution did enable users to gain direct 
  1017. access to the applications through fixed-function terminals, it still left the 
  1018. applications in control of the users' interactions with the system. 
  1019.  
  1020. As workstations became popular, another step in application structure evolution 
  1021. began. This evolutionary step came in response to the distributed nature of 
  1022. systems, the needs of the users to control system flow, and the desire of 
  1023. enterprises to reuse previously developed application components. While these 
  1024. three factors seem to be independent of each other, they drove toward a single 
  1025. solution. The application structure that developed in response to these factors 
  1026. represents the third generation in the evolutionary flow. 
  1027.  
  1028. The third-generation application structure embodies the concept of event-driven 
  1029. application design and implementation. Event-driven applications allow the user 
  1030. to control the flow of operations. This structure also supports dividing 
  1031. applications into cooperating elements that can run on different systems. A 
  1032. natural outgrowth of this application structure is small, modularized 
  1033. components with increasingly standard interface protocols. 
  1034.  
  1035. The C++ construction from parts architecture formalizes certain aspects of this 
  1036. application structure. 
  1037.  
  1038.  
  1039. ΓòÉΓòÉΓòÉ 4.3. Architecture Characteristics ΓòÉΓòÉΓòÉ
  1040.  
  1041. The C++ construction from parts architecture facilitates the development of 
  1042. parts to be used in this new environment. To be successful, this architecture 
  1043. must be both useful and easy to implement. It specifies the following: 
  1044.  
  1045.      A structural paradigm for applications that is independent of 
  1046.       implementation. 
  1047.  
  1048.       This maximizes the flexibility afforded to implementers. The only 
  1049.       implementation constraints in the specification are those needed to 
  1050.       provide reliable semantics for the interfaces. 
  1051.  
  1052.      A standard interface protocol. 
  1053.  
  1054.       A small, simple protocol suite achieves greater acceptance by part 
  1055.       builders and users than a large complex suite. This protocol supports 
  1056.       communication among application parts and between application parts and 
  1057.       the tools used to build the applications. 
  1058.  
  1059.       This standardized interface is called the part interface. Applications 
  1060.       can be built from parts by connecting the part interface features. 
  1061.  
  1062.  The architecture specification supports both new and pre-existing object 
  1063.  classes. You can apply the interface protocol to existing classes without 
  1064.  making extensive code modifications. 
  1065.  
  1066.  In a C++ programming environment where applications are created using an 
  1067.  editor or C++ browser, implementing the part interface of a part is 
  1068.  sufficient. As more sophisticated tools, such as visual application builders, 
  1069.  become available, parts can play a larger role in assisting the application 
  1070.  developer to build applications. 
  1071.  
  1072.  
  1073. ΓòÉΓòÉΓòÉ 4.4. Part Interface Architecture ΓòÉΓòÉΓòÉ
  1074.  
  1075. As stated earlier, a part interface is composed of three clearly defined 
  1076. programming interface features: attributes, actions, and events. The part 
  1077. interface architecture specifies the general format of the programming 
  1078. interfaces, not the particular implementation behind the interface. For 
  1079. example, the protocol describes how to build an attribute interface, 
  1080. independent of the contents, address, name, or other properties that are 
  1081. specific to this part. 
  1082.  
  1083.  
  1084. ΓòÉΓòÉΓòÉ 4.4.1. Access to Part Properties ΓòÉΓòÉΓòÉ
  1085.  
  1086. Attributes provide access to the properties of a part. A property can be any of 
  1087. the following: 
  1088.  
  1089.      An actual data object stored as a data member, such as the street in an 
  1090.       address object 
  1091.  
  1092.      An actual data object that is accessed via another object or the system, 
  1093.       such as the contents of an entry field (the contents are stored within 
  1094.       the system entry field control or widget) 
  1095.  
  1096.      A computed data object that is a transformed version of an actual data 
  1097.       object, such as the temperature in Fahrenheit when the actual data object 
  1098.       is the temperature in Celsius 
  1099.  
  1100.      A computed data object that is not stored, such as the sum of all numbers 
  1101.       in an array or the profit that is computed by subtracting dealer cost 
  1102.       from the retail price. 
  1103.  
  1104.  You can use the attribute interface to return the value of a property, to set 
  1105.  the value of a property, and to notify other parts when the value of a 
  1106.  property changes. You are not required to supply a complete attribute 
  1107.  interface for a property. For example, a property might be read-only, in which 
  1108.  case the part's attribute interface would not support the ability to set the 
  1109.  property's value. 
  1110.  
  1111.  The attribute interface is represented as follows: 
  1112.  
  1113.     aType aQueryMember();
  1114.    aSetMember(aType aValue);
  1115.    static INotificationId const anEventId;
  1116.  
  1117.  aQueryMember is the public member function to get the current value of the 
  1118.  property; aSetMember is the public member function to set the value of the 
  1119.  property to aValue; aType is the type of aValue; anEventId is the notification 
  1120.  ID for the property change event. 
  1121.  
  1122.  The member function that sets the value of the property can use the following 
  1123.  expression to notify dependent parts that the value of its property has 
  1124.  changed: 
  1125.  
  1126.   notifyObservers(INotificationEvent(anEventId, *this, true, (void*)aValue)); 
  1127.  
  1128.  notifyObservers is the member function that signals the event; anEventId is 
  1129.  the notification ID for the property change event; *this is the notifier 
  1130.  object; true indicates that the value of the attribute has changed; aValue is 
  1131.  the event data. (For more information about events, see Notification of 
  1132.  Changes to Parts.) 
  1133.  
  1134.  The following simpler call can be made if no event parameters are to be 
  1135.  passed: 
  1136.  
  1137.   notifyObservers(INotificationEvent(anEventId, *this)); 
  1138.  
  1139.  The member function that sets a property's value usually signals the value 
  1140.  change, but any member function that is aware of the change can signal the 
  1141.  event. 
  1142.  
  1143.  While a property is often represented as a data member of a part, it need not 
  1144.  be; the property could be a computed value. What is important is that whenever 
  1145.  the value of the property changes, the change takes place using the set member 
  1146.  function for the property. Changes made in any other way might not cause the 
  1147.  event to be signalled. 
  1148.  
  1149.  A part implements the attribute interface protocol by implementing the member 
  1150.  functions declared in the header files. For example, the following two member 
  1151.  functions support the attribute interface protocol for the temperature 
  1152.  property of the IThermometer part: 
  1153.  
  1154.     unsigned long IThermometer::temperature () const
  1155.    {
  1156.     return iTemperature;
  1157.    }
  1158.  
  1159.    IThermometer& IThermometer::setTemperature (unsigned long newTemp)
  1160.    {
  1161.     if (iTemperature != newTemp)
  1162.     {
  1163.      iTemperature = newTemp;
  1164.      notifyObservers(INotificationEvent(temperatureId, *this,
  1165.              true, (void*)newTemp));
  1166.     }
  1167.     return *this;
  1168.    }
  1169.  
  1170.  Because temperature has two common representations, Celsius and Fahrenheit, a 
  1171.  more general solution would be to have an attribute for each representation. 
  1172.  If the temperature was stored internally in Celsius, then you could rename the 
  1173.  two member functions to setTempInCelsius and tempInCelsius You could then 
  1174.  implement two additional member functions, such as the following, that return 
  1175.  and set the temperature in Fahrenheit: 
  1176.  
  1177.     unsigned long IThermometer::tempInFahrenheit () const
  1178.    {
  1179.     return ((iTemperature * (9/5)) + 32);
  1180.    }
  1181.  
  1182.    IThermometer & IThermometer::setTempInFahrenheit (unsigned long newTemp)
  1183.    {
  1184.     return setTempInCelsius ((newTemp - 32) * (5/9));
  1185.    }
  1186.  
  1187.  Notice that we did not introduce any additional data members when we added 
  1188.  these two new member functions. There is still only one property 
  1189.  (iTemperature) being maintained. However, now it is being maintained through 
  1190.  two different attribute interfaces. This illustrates the design guideline for 
  1191.  using a set member function (for example, setTempInFahrenheit) to change the 
  1192.  value of a property. It also shows that a property is not always a data 
  1193.  member. 
  1194.  
  1195.  
  1196. ΓòÉΓòÉΓòÉ 4.4.2. Access to Part Behavior ΓòÉΓòÉΓòÉ
  1197.  
  1198. An action provides access to the behavior of a part. Actions represent the 
  1199. tasks you can assign a part to do, such as open a window or add an object to a 
  1200. collection of objects. 
  1201.  
  1202. The action interface is represented as follows: 
  1203.  
  1204.  aType aMemberFunction(); 
  1205.  
  1206. aMemberFunction is the public member function for the action to be performed. 
  1207.  
  1208. A part implements the action interface by supplying a member function that 
  1209. responds to the behavior declared in the header file. For example, the 
  1210. following member function supports the action interface to set the default 
  1211. value of the city attribute in the IAddress class: 
  1212.  
  1213.   IAddress & IAddress :: setCityToDefault ()
  1214.  {
  1215.   return setCity("Hometown");
  1216.  }
  1217.  
  1218. This example shows that actions can cause values of attributes to change. In 
  1219. fact, most Boolean attributes can be set to false using the disable member 
  1220. function. For example, the disableMouseClickFocus member function in the 
  1221. IButton class causes the mouseClickFocus attribute to be set to false. 
  1222.  
  1223.  
  1224. ΓòÉΓòÉΓòÉ 4.4.3. Notification of Changes to Parts ΓòÉΓòÉΓòÉ
  1225.  
  1226. By signalling events, a part can notify other parts that a state or value in 
  1227. its interface has changed. Events can be signalled when the state of a view 
  1228. part changes, such as when a push button is clicked or when a window is opened, 
  1229. as well as when the state of a model part changes, such as when the balance in 
  1230. a bank account becomes negative. Events can also be signalled when the value of 
  1231. a part's property changes, such as when money is deposited into or withdrawn 
  1232. from a bank account. 
  1233.  
  1234. Notifications appear as messages broadcast to all parts that are observers of 
  1235. the event. Observers of an event are those parts that depend on the event's 
  1236. occurrence. The event interface is represented as follows: 
  1237.  
  1238.  static INotificationId const anEventId; 
  1239.  
  1240. anEventId is the notification ID for the event. 
  1241.  
  1242. Several different options are available to signal events. The first option is 
  1243. an example of using the event interface for attribute notification with event 
  1244. parameters: 
  1245.  
  1246.  notifyObservers(INotificationEvent(anEventId, *this, true, (void*)aValue)); 
  1247.  
  1248.      notifyObservers is the member function that causes the event 
  1249.       notification. 
  1250.      anEventId is the notification ID for the property change event. 
  1251.      *this is the notifier object. 
  1252.      true indicates that the value of the attribute has changed. 
  1253.      aValue is the new value of the property. 
  1254.  
  1255.  The following simpler call can be made if no event parameters are to be 
  1256.  passed: 
  1257.  
  1258.   notifyObservers(INotificationEvent(anEventId, *this)); 
  1259.  
  1260.  Parts can also signal events when no attributes have changed, as follows: 
  1261.  
  1262.   notifyObservers(INotificationEvent(anEventId, *this, false, (void*)aValue)); 
  1263.  
  1264.      notifyObservers is the member function that signals the event. 
  1265.      anEventId is the notification ID for the property change event. 
  1266.      *this is the notifier object. 
  1267.      false indicates that the value of the attribute has not changed. 
  1268.      aValue is the value of the property. 
  1269.  
  1270.  The following simpler call can be made if no event parameters are to be 
  1271.  passed: 
  1272.  
  1273.   notifyObservers(INotificationEvent(anEventId, *this, false)); 
  1274.  
  1275.  To implement notification within a part, code the notifyObservers expression 
  1276.  within one or more of its member functions. For example, the following 
  1277.  setTempInCelsius member function notifies other parts when the temperature has 
  1278.  changed and when the temperature is above the boiling point of water: 
  1279.  
  1280.     IThermometer& IThermometer::setTempInCelsius (unsigned long newTemp)
  1281.    {
  1282.     if (iTemperature != newTemp)
  1283.     {
  1284.      iTemperature = newTemp;
  1285.      notifyObservers(INotificationEvent(temperatureId, *this,
  1286.              true, (void*)newTemp));
  1287.      if (iTemperature > 100)
  1288.      {
  1289.       notifyObservers(INotificationEvent(boilingId, *this));
  1290.      }
  1291.     }
  1292.     return *this;
  1293.    }
  1294.  
  1295.  
  1296. ΓòÉΓòÉΓòÉ 4.5. Kinds of Parts Supported in Visual Builder ΓòÉΓòÉΓòÉ
  1297.  
  1298. You can use many kinds of parts to construct applications. These different 
  1299. kinds of parts, categorized according to their characteristics, are shown in 
  1300. the following figure: 
  1301.  
  1302. As stated earlier, all parts are either primitive parts, which are the basic 
  1303. building blocks from which other parts are constructed, or composite parts, 
  1304. which are parts constructed from other parts. You must construct new primitive 
  1305. parts using a programming language because there are no similar parts to use in 
  1306. building them. 
  1307.  
  1308. In turn, primitive parts can be either visual or nonvisual. 
  1309.  
  1310.      Visual parts are elements of the application that the user can see at run 
  1311.       time, such as view parts. They are components of a presentation surface, 
  1312.       such as a window, an entry field, or a push button. The development-time 
  1313.       representations of visual parts on the Composition Editor's free-form 
  1314.       surface closely match their runtime visual forms. Users can edit these 
  1315.       parts in the Composition Editor in their visual runtime forms (visual 
  1316.       editing). 
  1317.  
  1318.      Nonvisual parts are elements of the application that are not seen by the 
  1319.       user at run time, such as model parts. On the Composition Editor's 
  1320.       free-form surface, users can manipulate these parts only as icons (iconic 
  1321.       editing). Examples of nonvisual parts are business logic parts, data 
  1322.       array parts, communication access protocol parts, and database query 
  1323.       parts. 
  1324.  
  1325.       Parts that the user can see at run time but that support iconic editing 
  1326.       only are treated as nonvisual parts at development time. A prompter 
  1327.       message box part and a file selection dialog part are examples of this 
  1328.       kind of nonvisual part. 
  1329.  
  1330.  
  1331. ΓòÉΓòÉΓòÉ 5. Designing a C++ Part ΓòÉΓòÉΓòÉ
  1332.  
  1333.      Overview 
  1334.  
  1335.      Design guidelines 
  1336.  
  1337.      Conventions to consider 
  1338.  
  1339.         -  Naming parts 
  1340.  
  1341.         -  Naming actions, attributes, and events 
  1342.  
  1343.  Personal notes: 
  1344.  
  1345.  
  1346. ΓòÉΓòÉΓòÉ 5.1. Overview ΓòÉΓòÉΓòÉ
  1347.  
  1348. This chapter highlights some factors to consider when designing a C++ part. 
  1349. Before creating a new primitive part, answer the following questions: 
  1350.  
  1351.      Is the part visual or nonvisual? (See Kinds of Parts Supported in Visual 
  1352.       Builder.) 
  1353.  
  1354.      Can it be created as a composite part? 
  1355.  
  1356.      Do you have a good model of the part and its responsibilities? 
  1357.  
  1358.      Is it a real-world implementation or a service part? (See Segmentation 
  1359.       within the Model.) 
  1360.  
  1361.  
  1362. ΓòÉΓòÉΓòÉ 5.2. Design Guidelines ΓòÉΓòÉΓòÉ
  1363.  
  1364. Designing a good part is very similar to designing a good class. In fact, a 
  1365. good part can be used as a traditional class in applications that are not 
  1366. otherwise being built using C++ construction from parts. Consider the following 
  1367. when designing your part: 
  1368.  
  1369.      Keep it simple. 
  1370.  
  1371.      Keep the number of actions, events, and attributes to a reasonable size. 
  1372.       In practice, 10-20 part features per part is a good target. 
  1373.  
  1374.      Minimize the dependencies on other parts and classes. Do not make 
  1375.       nonvisual parts dependent upon visual parts. 
  1376.  
  1377.      Specify several actions with a small number of parameters rather than a 
  1378.       single action with many parameters. When possible, provide default 
  1379.       parameter values. 
  1380.  
  1381.      Minimize the number of connections that need to be made when using the 
  1382.       Composition Editor. 
  1383.  
  1384.  To design a new part, do the following: 
  1385.  
  1386.    1. Determine the attributes (properties) of the part. 
  1387.    2. Determine the events (notifications) that the part will signal. 
  1388.    3. Determine the actions (behaviors) for the part. 
  1389.    4. After determining the part interface, investigate the available parts to 
  1390.       see if one already exists or to determine which class to use as a base. 
  1391.       Determine if any classes can be converted to parts. 
  1392.  
  1393.  
  1394. ΓòÉΓòÉΓòÉ 5.3. Conventions to Consider ΓòÉΓòÉΓòÉ
  1395.  
  1396. This section gives you some high-level conventions to follow when creating 
  1397. parts. For more information about conventions, see IBM Open Class Library 
  1398. Conventions. 
  1399.  
  1400.  
  1401. ΓòÉΓòÉΓòÉ 5.3.1. Naming Parts ΓòÉΓòÉΓòÉ
  1402.  
  1403. Because the names of C++ classes come from a flat name-space, developers of 
  1404. parts must ensure that their class names are unlikely to duplicate the class 
  1405. names used by other developers. Using a prefix on your class names is a good 
  1406. way to reduce the chances of duplicating a class name. All IBM Open Class names 
  1407. in the global name space begin with the letter "I" for IBM. 
  1408.  
  1409.  
  1410. ΓòÉΓòÉΓòÉ 5.3.2. Naming Actions, Attributes, and Events ΓòÉΓòÉΓòÉ
  1411.  
  1412. A part feature is an element of a part's interface. It is used as a collective 
  1413. term for a part action, attribute, or event. 
  1414.  
  1415. If you follow these simple conventions in choosing your feature names, it is 
  1416. easier for users of your parts to recognize the function of a feature: 
  1417.  
  1418.      Name actions with phrases that indicate activities to be performed, 
  1419.       together with an optional receiver of that activity. Examples of feature 
  1420.       names for actions are startTimer, openWindow, hide, and setFocus. 
  1421.  
  1422.      Name attributes with phrases that indicate the physical property they 
  1423.       represent. Examples of feature names for attributes are height, 
  1424.       buttonLabel, and contents. 
  1425.  
  1426.      Name events with phrases that indicate activities that either have 
  1427.       happened or are about to happen. Examples of feature names for events are 
  1428.       clicked, aboutToCloseWindow, and timeExpired. 
  1429.  
  1430.  Note:  Do not use feature names that start with avl or vb. These are reserved 
  1431.         for use by Visual Builder. 
  1432.  
  1433.  The main place that users see your action, attribute, and event names is on 
  1434.  the Connections pop-up menu of the Composition Editor. Because features are 
  1435.  shown on this pop-up menu in alphabetical order, the phrasing you use for a 
  1436.  feature name is the only way to distinguish between actions, attributes, and 
  1437.  events. 
  1438.  
  1439.  It is important to choose unique names for your new actions, attributes, or 
  1440.  events. This prevents you from unintentionally overriding an inherited part 
  1441.  feature. If you intend to replace an existing part feature that your part 
  1442.  inherits, then your new name must be the same as the name of the part feature 
  1443.  you are replacing. The scope within which your feature name must be unique is 
  1444.  your part class and all its base classes in the class hierarchy. 
  1445.  
  1446.  
  1447. ΓòÉΓòÉΓòÉ 6. Implementing a C++ Part ΓòÉΓòÉΓòÉ
  1448.  
  1449.      Overview 
  1450.  
  1451.      Positioning a part within the class hierarchy 
  1452.  
  1453.      Implementing events 
  1454.  
  1455.      Implementing attributes 
  1456.  
  1457.         -  Get member functions 
  1458.  
  1459.         -  Set member functions 
  1460.  
  1461.         -  Attribute notification IDs 
  1462.  
  1463.      Implementing actions 
  1464.  
  1465.      Implementing constructors 
  1466.  
  1467.      Implementing destructors 
  1468.  
  1469.      Implementing assignment operators 
  1470.  
  1471.      Creating Composers and primitive visual parts 
  1472.  
  1473.      Implementation checklists 
  1474.  
  1475.  Personal notes: 
  1476.  
  1477.  
  1478. ΓòÉΓòÉΓòÉ 6.1. Overview ΓòÉΓòÉΓòÉ
  1479.  
  1480. This chapter explains how to implement a C++ part. It explains how to create 
  1481. the header and code files for a C++ class that supports the parts architecture. 
  1482. No matter which kind of part you are building, you need to read the concepts 
  1483. and techniques introduced early in the chapter to understand later material. 
  1484. The key items covered in this chapter follow: 
  1485.  
  1486.      Positioning the part within the class hierarchy 
  1487.      Implementing events (notification) 
  1488.      Implementing attributes (properties) 
  1489.      Implementing actions (behaviors) 
  1490.  
  1491.  
  1492. ΓòÉΓòÉΓòÉ 6.2. Positioning a Part within the Class Hierarchy ΓòÉΓòÉΓòÉ
  1493.  
  1494. The first step associated with implementing a part is positioning the part 
  1495. class in the C++ class hierarchy. 
  1496.  
  1497. Place your nonvisual part, as shown in the following table, under the 
  1498. IStandardNotifier class hierarchy. Inserted in this location, your part 
  1499. inherits certain default behavior from IStandardNotifier and the INotifier 
  1500. protocol. 
  1501.  
  1502. Class Hierarchy for Nonvisual Parts 
  1503.  
  1504. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1505. ΓöéClass                        ΓöéResponsibility           Γöé
  1506. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1507. ΓöéIBase                        ΓöéBase class               Γöé
  1508. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1509. Γöé  IVBase                     ΓöéVirtual base class       Γöé
  1510. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1511. Γöé    INotifier                ΓöéNotification protocol    Γöé
  1512. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1513. Γöé      IStandardNotifier      ΓöéImplementation of        Γöé
  1514. Γöé                             Γöénotification protocol    Γöé
  1515. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1516. Γöé        New nonvisual part   Γöé                         Γöé
  1517. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1518.  
  1519. An example from the IAddress header file follows: 
  1520.  
  1521.  class IAddress : public IStandardNotifier 
  1522.  
  1523. In some cases, you might want your nonvisual part to be abstract. Be aware that 
  1524. your users cannot drop abstract nonvisual parts onto the Composition Editor's 
  1525. free-form surface. If you do not provide concrete parts derived from this 
  1526. abstract part, your users must derive their own concrete parts. For more 
  1527. information about the syntax to define a part as abstract, see VBComposerInfo 
  1528. Statement for a Part. 
  1529.  
  1530. Once you have found your part's position in the class hierarchy, you are ready 
  1531. to begin the actual building. 
  1532.  
  1533. Creating a C++ class for a part is not much different from creating any other 
  1534. C++ class. There are just a few additional guidelines to keep in mind for those 
  1535. member functions that support your part's part interface. 
  1536.  
  1537.  
  1538. ΓòÉΓòÉΓòÉ 6.3. Implementing Events ΓòÉΓòÉΓòÉ
  1539.  
  1540. Events might be occurring inside your part that you want to signal to other 
  1541. parts. The mechanism for signalling this information to other parts is event 
  1542. notification. 
  1543.  
  1544. In a simple event notification, dependent parts are notified only that the 
  1545. event occurred. An example of this type of event notification is a push button 
  1546. visual part notifying all observer parts that it has been selected. The public 
  1547. section of the IButton class header file contains the following definition for 
  1548. the buttonClickId notification ID: 
  1549.  
  1550.   static INotificationId const
  1551.   buttonClickId;
  1552.  
  1553. In addition, the IButton code file contains the following: 
  1554.  
  1555.  const INotificationId IButton::buttonClickId="IButton::buttonClick"; 
  1556.  
  1557. The notification string ID contains the class name followed by the event name. 
  1558. IButton can notify others of this event by using notifyObservers with the 
  1559. buttonClickId notification event ID: 
  1560.  
  1561.  notifyObservers(INotificationEvent(buttonClickId, *this, false)); 
  1562.  
  1563. This function call signals that something happened (the button was clicked) but 
  1564. provides no additional information. The false parameter on the 
  1565. INotificationEvent constructor indicates that no attributes have changed. 
  1566.  
  1567. A part can provide additional information about the event by passing parameters 
  1568. with the notification. An example of this use of an event notification is a 
  1569. push button part that represents a key on a calculator notifying all observer 
  1570. parts that it has been selected. In addition to notifying other parts that it 
  1571. has been selected, the push button part can also pass the value of its label, 
  1572. as follows: 
  1573.  
  1574.   notifyObservers(INotificationEvent(buttonClickId, *this,
  1575.          false, (void *)5));
  1576.  
  1577. This notifies other parts that push button 5 was selected. 
  1578.  
  1579. Event notification is also used to inform other parts that attributes have 
  1580. changed. An example of this type of event notification is the street changing 
  1581. in the IAddress part. The part can do this with the following code: 
  1582.  
  1583.   IString eventData(iStreet);
  1584.  notifyObservers(INotificationEvent(streetId, *this,
  1585.          true, (void*)&eventData));
  1586.  
  1587.  
  1588. ΓòÉΓòÉΓòÉ 6.4. Implementing Attributes ΓòÉΓòÉΓòÉ
  1589.  
  1590. Each property that your part exposes through its attribute interface has one or 
  1591. two corresponding member functions to support the attribute interface protocol 
  1592. for accessing the property. The public member function that retrieves the value 
  1593. of a property is called the get member function. The public member function 
  1594. that sets the value of a property is called the set member function. In 
  1595. addition, you need to define a public static notification event ID for 
  1596. notification of changes to the attribute. An example of the definition of the 
  1597. street attribute from the public section of the header file for the IAddress 
  1598. class follows: 
  1599.  
  1600.   virtual IString
  1601.   street () const;
  1602.  virtual IAddress
  1603.   &setStreet (const IString& aStreet);
  1604.  static INotificationId const
  1605.   streetId;
  1606.  
  1607. Get and set member functions usually come in pairs. The exception is when a 
  1608. property is read-only (such as a property that represents the serial number of 
  1609. the computer you are currently using). In this case, the property has only a 
  1610. get member function. 
  1611.  
  1612. Always use the get and set member functions to access the value of a property 
  1613. so that the associated behaviors are performed. In particular, if you update 
  1614. the value of a property without triggering event notification, the application 
  1615. might fail to operate correctly. Define property data members as private to 
  1616. ensure that other classes do not access the properties directly. 
  1617.  
  1618.  
  1619. ΓòÉΓòÉΓòÉ 6.4.1. Defining Get Member Functions ΓòÉΓòÉΓòÉ
  1620.  
  1621. Get member functions return the value of a part's property. They are always 
  1622. accessed using a public member function without parameters. 
  1623.  
  1624. The simplest get member function returns the data member that holds the value 
  1625. of a property. The street member function of the IAddress class is an example 
  1626. of a simple get member function, as follows: 
  1627.  
  1628.   IString IAddress::street () const
  1629.  {
  1630.   return iStreet;
  1631.  }
  1632.  
  1633. Because this get member function does not change any values within the object, 
  1634. it is defined as const. 
  1635.  
  1636.  
  1637. ΓòÉΓòÉΓòÉ 6.4.2. Defining Set Member Functions ΓòÉΓòÉΓòÉ
  1638.  
  1639. Set member functions modify the value of a part's property and notify dependent 
  1640. objects that the value has changed. Set member functions are always accessed 
  1641. using a member function with one parameter-the value to be set into the 
  1642. property. Normally, this parameter is defined as const because most set member 
  1643. functions do not change the parameter. 
  1644.  
  1645. A simple set member function sets the IStreet data member and signals a 
  1646. notification using notifyObservers. The following set member function, taken 
  1647. from the IAddress example part, does just that: 
  1648.  
  1649.   IAddress& IAddress::setStreet (const IString& aStreet)
  1650.  {
  1651.   if (iStreet != aStreet)
  1652.   {
  1653.    iStreet = aStreet;
  1654.    IString eventData(iStreet);
  1655.    notifyObservers(INotificationEvent(streetId, *this,
  1656.            true, (void*)&eventData));
  1657.   } /* endif */
  1658.   return *this;
  1659.  }
  1660.  
  1661. An even simpler set member function can be implemented that does not signal a 
  1662. notification when its property is changed. You might use such a set member 
  1663. function when you know that a group of properties is always changed together. 
  1664. In this case, only one set member function out of the group would actually 
  1665. signal the event. This couples the event signalling with the entire sequence of 
  1666. set member function calls. 
  1667.  
  1668. Set member functions can also perform other operations, such as computing 
  1669. values for many properties based on the value supplied or signalling an 
  1670. additional notification when the value of a property crosses a threshold value. 
  1671.  
  1672. Signal events only when the value of the property has changed. In addition, 
  1673. providing the new value of the attribute in the notification event can improve 
  1674. the overall system performance. 
  1675.  
  1676.  
  1677. ΓòÉΓòÉΓòÉ 6.4.3. Attribute Notification IDs ΓòÉΓòÉΓòÉ
  1678.  
  1679. You define notification IDs using public static data members. An example from 
  1680. the public section of the IAddress class header file follows: 
  1681.  
  1682.   static INotificationId const
  1683.   streetId,
  1684.   cityId,
  1685.   stateId,
  1686.   zipId;
  1687.  
  1688. This defines streetId, cityId, stateId and zipId as notification IDs. In 
  1689. addition, the IAddress code file contains the following: 
  1690.  
  1691.   const INotificationId IAddress::streetId="IAddress::street";
  1692.  const INotificationId IAddress::cityId="IAddress::city";
  1693.  const INotificationId IAddress::stateId="IAddress::state";
  1694.  const INotificationId IAddress::zipId="IAddress::zip";
  1695.  
  1696. The notification string ID contains the class name followed by the attribute 
  1697. name. 
  1698.  
  1699.  
  1700. ΓòÉΓòÉΓòÉ 6.5. Implementing Actions ΓòÉΓòÉΓòÉ
  1701.  
  1702. Each behavior that your part exposes in its action interface has a 
  1703. corresponding public member function to support the action protocol for that 
  1704. behavior. An example of the setCityToDefault public member function from the 
  1705. IAddress class header file follows: 
  1706.  
  1707.   virtual IAddress
  1708.   &setCityToDefault ();
  1709.  
  1710. Just like other C++ member functions, actions can have parameters and a return 
  1711. value. You can specify the return value and parameters as part of the action 
  1712. interface (see Describing Part Interfaces in Part Information Files. 
  1713.  
  1714. The only thing unique to Visual Builder about these member functions is that 
  1715. they should not directly access data members for properties; instead, use the 
  1716. attribute's get and set member functions to access the data members. You need 
  1717. to do this because the get and set member functions often have additional 
  1718. behavior beyond simply accessing the value of the data member. 
  1719.  
  1720. For example, the setCityToDefault member function of the IAddress class uses 
  1721. the following setCity to set the city to Hometown instead of setting it 
  1722. directly: 
  1723.  
  1724.   IAddress& IAddress::setCityToDefault ()
  1725.  {
  1726.   return setCity("Hometown");
  1727.  }
  1728.  
  1729. Consider providing an action to reset each attribute to a default value when 
  1730. implementing a part. For Boolean attributes, provide a public member function 
  1731. (for example, a disable action) that causes the attribute to be set to false 
  1732. and a public set member function (for example, an enable action) with a default 
  1733. parameter equal to true. You can use the set member function (for example, 
  1734. enableMouseClickFocus) with a default value as the set member function for the 
  1735. Boolean attribute and an action member function. An example from the IButton 
  1736. class for the mouseClickFocus Boolean attribute follows: 
  1737.  
  1738.   IButton
  1739.   &enableMouseClickFocus  (Boolean turnOn = true),
  1740.   &disableMouseClickFocus ();
  1741.  
  1742.  
  1743. ΓòÉΓòÉΓòÉ 6.6. Implementing Constructors ΓòÉΓòÉΓòÉ
  1744.  
  1745. Nonvisual parts should have a default constructor. An example of the IAddress 
  1746. class default constructor follows: 
  1747.  
  1748.  IAddress(); 
  1749.  
  1750. The implementation of the standard constructor for the IAddress class follows: 
  1751.  
  1752.   IAddress::IAddress() : IStandardNotifier (),
  1753.   iStreet("101 Main Street"),
  1754.   iCity("Hometown"),
  1755.   iState("NC"),
  1756.   iZip("27511")
  1757.  {
  1758.  }
  1759.  
  1760. For most nonvisual parts, supply a copy constructor. An example follows: 
  1761.  
  1762.  IAddress (const IAddress& partCopy); 
  1763.  
  1764. The implementation of the copy constructor for IAddress follows: 
  1765.  
  1766.   IAddress::IAddress (const IAddress& partCopy)
  1767.   : IStandardNotifier (partCopy),
  1768.   iStreet(partCopy.street()),
  1769.   iCity(partCopy.city()),
  1770.   iState(partCopy.state()),
  1771.   iZip(partCopy.zip())
  1772.  {
  1773.  }
  1774.  
  1775.  
  1776. ΓòÉΓòÉΓòÉ 6.7. Implementing Destructors ΓòÉΓòÉΓòÉ
  1777.  
  1778. For all visual and nonvisual parts, specify a virtual destructor. An example 
  1779. follows: 
  1780.  
  1781.  virtual   ~IAddress (); 
  1782.  
  1783. The implementation of the IAddress destructor follows: 
  1784.  
  1785.   IAddress::~IAddress()
  1786.  {
  1787.  }
  1788.  
  1789.  
  1790. ΓòÉΓòÉΓòÉ 6.8. Implementing Assignment Operators ΓòÉΓòÉΓòÉ
  1791.  
  1792. To ensure that attribute changes are signalled, specify an assignment operator 
  1793. for nonvisual parts with attributes, as follows: 
  1794.  
  1795.  IAddress& operator= (const IAddress& aIAddress); 
  1796.  
  1797. The implementation of the IAddress class assignment operator follows: 
  1798.  
  1799.   IAddress& IAddress::operator= (const IAddress& aIAddress)
  1800.  {
  1801.   if (this == &aIAddress) {
  1802.    return *this;
  1803.   } /* endif */
  1804.   IStandardNotifier::operator=(aIAddress);
  1805.   setStreet(aIAddress.street());
  1806.   setCity(aIAddress.city());
  1807.   setState(aIAddress.state());
  1808.   setZip(aIAddress.zip());
  1809.   return *this;
  1810.  }
  1811.  
  1812. Note the following in the previous example: 
  1813.  
  1814.      The assignment operator checks to ensure that the new value is not the 
  1815.       current object. 
  1816.  
  1817.      The part's base class is called to ensure that the base class' data is 
  1818.       assigned correctly. 
  1819.  
  1820.      To ensure notification of attribute changes, the attribute set member 
  1821.       functions are used to change the value of the attributes. 
  1822.  
  1823.  
  1824. ΓòÉΓòÉΓòÉ 6.9. Creating Composers and Primitive Visual Parts ΓòÉΓòÉΓòÉ
  1825.  
  1826. If the Composers or primitive visual parts shipped with Visual Builder do not 
  1827. meet your requirements, you can create your own and drop them on the free-form 
  1828. surface. When dropped, user primitive parts appear as gray boxes on the 
  1829. free-form surface so you can adjust their placement and attribute values, but 
  1830. they do not otherwise behave like Visual Builder parts. Visual Builder uses an 
  1831. ICanvas* part to represent user Composers parts on the free-form surface. The 
  1832. settings window for a user part looks like that for the part's base class, 
  1833. except that an extra page appears in the notebook for attributes added in the 
  1834. newly derived part. 
  1835.  
  1836. In the compiled application, your user primitive parts replace the gray boxes. 
  1837.  
  1838. To create your own primitive visual or Composers part, follow these steps: 
  1839.  
  1840.      Write code that derives the part from an IWindow-based class. IWindow 
  1841.       does not have to be the new part's immediate base class. 
  1842.  
  1843.       Because user Composers parts are represented by ICanvas* parts on the 
  1844.       free-form surface, user code to add primitive parts to the new Composers 
  1845.       part must be of the same form as that for ICanvas*. No function exists 
  1846.       within the Composition Editor to call customized code in the new 
  1847.       Composers part. 
  1848.  
  1849.      Create a part information file for the part. You must include a 
  1850.       VBComposerInfo statement. 
  1851.  
  1852.       If the part's constructor does not take a style flag, you must add 
  1853.       VBConstructor and VBAttribute statements to prevent problems with the 
  1854.       part at run time. 
  1855.  
  1856.      Import the part. 
  1857.  
  1858.  For more information about importing parts, see the Visual Builder User's 
  1859.  Guide. 
  1860.  
  1861.  
  1862. ΓòÉΓòÉΓòÉ 6.10. Implementation Checklists ΓòÉΓòÉΓòÉ
  1863.  
  1864. The following checklists contain the items required to implement a new part or 
  1865. to convert an existing class to a part. Because parts are implemented as 
  1866. classes, you can convert existing classes to parts and still use them as 
  1867. classes. 
  1868.  
  1869. In the header file, make the following changes to support parts: 
  1870.  
  1871.    1. For nonvisual parts, publicly inherit from IStandardNotifier or a derived 
  1872.       class. For visual parts, publicly inherit from IWindow or a derived 
  1873.       class. 
  1874.  
  1875.    2. Define the constructors and a virtual destructor. 
  1876.  
  1877.    3. If appropriate, define the assignment operator for nonvisual parts. 
  1878.  
  1879.    4. Define a public notification ID for each event. 
  1880.  
  1881.    5. Define a public notification ID for each attribute. 
  1882.  
  1883.    6. Define a public get member function with no parameters so users can 
  1884.       obtain the value of each attribute. 
  1885.  
  1886.    7. If the attribute can be changed, define a public set member function with 
  1887.       a single parameter containing the new value. If this attribute is 
  1888.       Boolean, set the default to true. 
  1889.  
  1890.    8. Define any public action member functions. Consider reset or default 
  1891.       actions for attributes, including disable and enable actions for Boolean 
  1892.       attributes. 
  1893.  
  1894.  In the code or inline file, make the following changes in the code logic to 
  1895.  support parts: 
  1896.  
  1897.    1. Code each event notification ID using a string containing the class name 
  1898.       and event name. 
  1899.  
  1900.    2. Code each attribute notification ID using a string containing the class 
  1901.       name and attribute name. 
  1902.  
  1903.    3. Code the constructors and a virtual destructor. 
  1904.  
  1905.    4. If defined, code the assignment operator. 
  1906.  
  1907.    5. Code the public get member functions for each attribute. 
  1908.  
  1909.    6. Code the public set member functions for each attribute. Notify observers 
  1910.       when the value changes. 
  1911.  
  1912.    7. Call get and set member functions to return and change attribute values 
  1913.       in actions. In addition, notify observers of events specified by the 
  1914.       part. 
  1915.  
  1916.  
  1917. ΓòÉΓòÉΓòÉ 7. Describing Part Interfaces in Part Information Files ΓòÉΓòÉΓòÉ
  1918.  
  1919.      Overview 
  1920.  
  1921.      Part information syntax 
  1922.  
  1923.         -  VBBeginPartInfo statement 
  1924.         -  VBParent statement 
  1925.         -  VBIncludes statement 
  1926.         -  VBPartDataFile statement 
  1927.         -  VBLibFile statement 
  1928.         -  VBComposerInfo statement for a part 
  1929.         -  VBConstraints statement 
  1930.         -  VBConstructor statement 
  1931.         -  VBEvent statement 
  1932.         -  VBAttribute statement 
  1933.         -  VBAction statement 
  1934.         -  VBPreferredFeatures statement 
  1935.         -  VB statement 
  1936.         -  VBEndPartInfo statement 
  1937.         -  Sample part information for IAddress 
  1938.  
  1939.      Class information syntax 
  1940.  
  1941.         -  VBBeginPartInfo statement 
  1942.         -  VBParent statement 
  1943.         -  VBIncludes statement 
  1944.         -  VBPartDataFile statement 
  1945.         -  VBComposerInfo statement 
  1946.         -  VBConstraints statement 
  1947.         -  VBConstructor statement 
  1948.         -  VBAction statement 
  1949.         -  VBAttribute statement 
  1950.         -  VBPreferredFeatures statement 
  1951.         -  VB statement 
  1952.         -  VBEndPartInfo statement 
  1953.         -  Sample class information for IRange 
  1954.  
  1955.      Function group information syntax 
  1956.  
  1957.         -  VBBeginPartInfo statement 
  1958.         -  VBIncludes statement 
  1959.         -  VBPartDataFile statement 
  1960.         -  VBComposerInfo statement 
  1961.         -  VBConstraints statement 
  1962.         -  VBAction statement 
  1963.         -  VB statement 
  1964.         -  VBPreferredFeatures statement 
  1965.         -  VBEndPartInfo statement 
  1966.         -  Sample function group information 
  1967.  
  1968.      Enumeration information syntax 
  1969.  
  1970.         -  VBBeginEnumInfo statement 
  1971.         -  VBIncludes statement 
  1972.         -  VBPartDataFile statement 
  1973.         -  VBEnumerators statement 
  1974.         -  VB statement 
  1975.         -  VBEndEnumInfo statement 
  1976.         -  Sample alignment enumeration for IEntryField 
  1977.  
  1978.      Type definition information syntax 
  1979.  
  1980.         -  VBBeginTypedefInfo statement 
  1981.         -  VBIncludes statement 
  1982.         -  VBPartDataFile statement 
  1983.         -  VB statement 
  1984.         -  VBEndTypedefInfo statement 
  1985.         -  Sample type definition information 
  1986.  
  1987.      Other syntax examples 
  1988.  
  1989.  Personal notes: 
  1990.  
  1991.  
  1992. ΓòÉΓòÉΓòÉ 7.1. Overview ΓòÉΓòÉΓòÉ
  1993.  
  1994. You describe the interface information that Visual Builder needs by using the 
  1995. Part Interface Editor or by creating files containing the interface information 
  1996. and importing these files into Visual Builder. This chapter describes the 
  1997. format of the interface information and is divided into the following sections: 
  1998.  
  1999.      Part information syntax 
  2000.      Class information syntax 
  2001.      Function group information syntax 
  2002.      Enumeration information syntax 
  2003.      Type definition information syntax 
  2004.  
  2005.  You can include the statements describing the interface in a C++ header file 
  2006.  or in a separate file (sometimes called a part information file, or .vbe 
  2007.  file). All interface information code lines begin with //VB in column 1. 
  2008.  Between statements, lines that do not start with //VB are ignored. You can 
  2009.  arrange statements on a single line or continue them on multiple lines by 
  2010.  using the VB statement. 
  2011.  
  2012.  Rules for entering part information 
  2013.  
  2014.  The following rules apply to all interface information: 
  2015.  
  2016.    1. All part, class, function group, enumeration, and type definition names 
  2017.       must be unique. 
  2018.  
  2019.    2. A single file can contain information about multiple parts, classes, 
  2020.       function groups, enumerations, and type definitions. 
  2021.  
  2022.    3. You cannot begin one type of information until you have ended another. 
  2023.       For example, you cannot put a VBBeginEnumInfo statement between 
  2024.       VBBeginPartInfo and VBEndPartInfo statements. If you do, you will not be 
  2025.       able to import the part information. 
  2026.  
  2027.    4. The interface information about a specific part, class, function group, 
  2028.       enumeration, and type definition must be contained in a single file. 
  2029.  
  2030.    5. In some cases, you must account for missing keywords by including a comma 
  2031.       (,) in the statement with no value. For example, you can use the 
  2032.       VBComposerInfo statement to specify different types of support 
  2033.       information, only one of which is required. The following statements are 
  2034.       acceptable: 
  2035.  
  2036.             //VBComposerInfo: visual
  2037.  
  2038.             //VBComposerInfo: visual,803,cppov33r,userprimitive
  2039.  
  2040.             //VBComposerInfo: visual,,,userprimitive
  2041.  
  2042.       The following statement is not acceptable: 
  2043.  
  2044.       //VBComposerInfo: visual,userprimitive 
  2045.  
  2046.  VB statements for IBM use only 
  2047.  
  2048.  You might find the following VB statements used in part information files 
  2049.  shipped by IBM as samples. Do not use these statements in your own part 
  2050.  information files; you could seriously compromise your part data. 
  2051.  
  2052.      VBComposerClass 
  2053.      VBComposerTextSetting 
  2054.      VBFlagAttribute 
  2055.      VBFlagInfo 
  2056.      VBGeneratorClass 
  2057.      VBSettingsPages 
  2058.  
  2059.  
  2060. ΓòÉΓòÉΓòÉ 7.2. Part Information Syntax ΓòÉΓòÉΓòÉ
  2061.  
  2062. This section describes the interface information for nonvisual parts that 
  2063. Visual Builder uses. Syntax descriptions appear in the recommended order of 
  2064. occurrence in a file. The following rules apply to the interface information 
  2065. for parts: 
  2066.  
  2067.    1. All feature names (attributes, events, actions) within a part hierarchy 
  2068.       must be unique. If duplicate feature names exist, the information for the 
  2069.       derived part is used and the information for the base part is ignored for 
  2070.       that specific feature. 
  2071.  
  2072.    2. All part names must be unique and must be valid C++ class names. 
  2073.  
  2074.    3. The name on the VBBeginPartInfo statement and VBEndPartInfo statement 
  2075.       must match. 
  2076.  
  2077.    4. Attribute, event and action information statements can appear more than 
  2078.       once for a specific part, but all other information statements must 
  2079.       appear only once. 
  2080.  
  2081.  For information about how to read these syntax diagrams, see How to Read 
  2082.  Syntax Diagrams. 
  2083.  
  2084.  
  2085. ΓòÉΓòÉΓòÉ 7.2.1. VBBeginPartInfo Statement for a Part ΓòÉΓòÉΓòÉ
  2086.  
  2087. The first statement describing the interface is the VBBeginPartInfo statement. 
  2088. This statement specifies the part name and the part description. 
  2089.  
  2090. >>ΓöÇΓöÇ//VBBeginPartInfo: ΓöÇΓöÇ part_name ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2091.                    ΓööΓöÇΓöÇ,"description" ΓöÇΓöÿ
  2092.  
  2093.  part_name 
  2094.    Valid and unique C++ class name that implements the part interface. 
  2095.  
  2096.  description 
  2097.    Optional part description. 
  2098.  
  2099.  
  2100. ΓòÉΓòÉΓòÉ 7.2.2. VBParent Statement for a Part ΓòÉΓòÉΓòÉ
  2101.  
  2102. The VBParent statement describes the part's base part. The attributes, actions, 
  2103. and events defined by the base part are inherited. The part class hierarchy 
  2104. must include the IStandardNotifier class for nonvisual parts. 
  2105.  
  2106. >ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2107.    ΓööΓöÇΓöÇ //VBParent: ΓöÇΓöÇΓöÇΓöÇΓöÇ parent_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2108.  
  2109.  parent_name 
  2110.    Valid and unique C++ class name. 
  2111.  
  2112.  
  2113. ΓòÉΓòÉΓòÉ 7.2.3. VBIncludes Statement for a Part ΓòÉΓòÉΓòÉ
  2114.  
  2115. The VBIncludes statement describes the include file that contains the 
  2116. declaration of the C++ class that implements the part interface. 
  2117.  
  2118. >ΓöÇΓöÇΓöÇ //VBIncludes: ΓöÇΓöÇΓöÇΓöÇ<include_file>ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2119.                     ΓööΓöÇΓöÇ include_define ΓöÇΓöÇΓöÿ
  2120.  
  2121.  include_file 
  2122.    Header file required by the compiler to use this part. If you want to 
  2123.    specify a link dependency in your application make file, use double 
  2124.    quotation marks (" ") to delimit the file name instead of the angle brackets 
  2125.    (< >). 
  2126.  
  2127.  include_define 
  2128.    Optional statement that associates a variable with the include statement, 
  2129.    enabling generated code to test for duplicate include statements. 
  2130.  
  2131.  
  2132. ΓòÉΓòÉΓòÉ 7.2.4. VBPartDataFile Statement for a Part ΓòÉΓòÉΓòÉ
  2133.  
  2134. The optional VBPartDataFile statement specifies the file in which to save the 
  2135. part information. If you do not use this statement, the imported file name is 
  2136. used with a .vbb extension. 
  2137.  
  2138. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2139.   ΓööΓöÇΓöÇ //VBPartDataFile: ΓöÇΓöÇΓöÇ file_name ΓöÇΓöÇΓöÿ
  2140.  
  2141.  file_name 
  2142.    File name in which to save the part interface information. 
  2143.  
  2144.  
  2145. ΓòÉΓòÉΓòÉ 7.2.5. VBLibFile Statement for a Part ΓòÉΓòÉΓòÉ
  2146.  
  2147. The optional VBLibFile statement specifies the library file that will contain 
  2148. the part when it is compiled. Visual Builder uses this data as follows: 
  2149.  
  2150.      It inserts a #pragma statement in the part's generated header code. 
  2151.  
  2152.      It adds the file name to the dependency list in the make file generated 
  2153.       for applications using the part. 
  2154.  
  2155.   >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2156.     ΓööΓöÇΓöÇ //VBLibFile: ΓöÇΓöÇΓöÇ file_name ΓöÇΓöÇΓöÿ
  2157.  
  2158.  file_name 
  2159.    Name of the file that will contain the compiled nonvisual part. 
  2160.  
  2161.  
  2162. ΓòÉΓòÉΓòÉ 7.2.6. VBComposerInfo Statement for a Part ΓòÉΓòÉΓòÉ
  2163.  
  2164. The part VBComposerInfo statement specifies the information needed to support 
  2165. visual and nonvisual parts. This information can include the following options: 
  2166.  
  2167.      Icon resource ID and icon resource DLL name. 
  2168.  
  2169.       You must include either both of these options or neither of them. In 
  2170.       addition, if you specify any other options on this statement, you must 
  2171.       include the commas that would be used to delimit them. If you do not 
  2172.       specify any options, omit the commas. 
  2173.  
  2174.      Additional information about how the part can be used. 
  2175.  
  2176.       An abstract part is like an abstract class. It contains functions and 
  2177.       data that other parts inherit. You cannot place an abstract part on the 
  2178.       free-form surface. 
  2179.  
  2180.       A user primitive part is a primitive part that does not accept child 
  2181.       parts. 
  2182.  
  2183.       A user composer part can accept child windows. 
  2184.  
  2185.  Both user primitive and user composer parts are parts that you create, not 
  2186.  parts that Visual Builder provides. For more information on implementing these 
  2187.  types of parts, refer to the Visual Builder User's Guide. 
  2188.  
  2189.   >ΓöÇΓöÇ//VBComposerInfo: ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ visual ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2190.                  ΓööΓöÇΓöÇ nonvisual ΓöÇΓöÇΓöÿ
  2191.  
  2192.   >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ>
  2193.     ΓööΓöÇΓöÇ,ΓöÇΓöÇΓöÇ icon_resource_id ΓöÇΓöÇΓöÇ,ΓöÇΓöÇΓöÇ resource_dll ΓöÇΓöÿ  ΓööΓöÇ,ΓöÇΓö¼ΓöÇΓöÇ abstract ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2194.                                Γö£ΓöÇ userprimitive ΓöÇΓöñ
  2195.                                ΓööΓöÇ usercomposer ΓöÇΓöÇΓöÿ
  2196.  
  2197.  icon_resource_id 
  2198.    Optional resource number of the icon to be used to represent the part. If 
  2199.    you specify this, you must also specify the resource DLL name. 
  2200.  
  2201.  resource_dll 
  2202.    Resource DLL name containing the icon to be used. Do not include the .dll 
  2203.    extension. 
  2204.  
  2205.  abstract 
  2206.    Optional keyword to indicate that the part is abstract. This keyword is 
  2207.    mutually exclusive of the userprimitive and usercomposer keywords. 
  2208.  
  2209.  userprimitive 
  2210.    Optional keyword to indicate that the part is a primitive part that you 
  2211.    created. This keyword is mutually exclusive of the abstract and usercomposer 
  2212.    keywords. 
  2213.  
  2214.  usercomposer 
  2215.    Optional keyword to indicate that the part is a composer part that you 
  2216.    created. This keyword is mutually exclusive of the abstract and 
  2217.    userprimitive keywords. 
  2218.  
  2219.  If you are implementing a user primitive or user composer part that does not 
  2220.  take a style flag as input to its constructor, you must use VBAttribute and 
  2221.  VBConstructor statements to prevent problems with your part at run time. For 
  2222.  more information, see VBConstructor Statement for a Part. 
  2223.  
  2224.  
  2225. ΓòÉΓòÉΓòÉ 7.2.7. VBConstraints Statement for a Part ΓòÉΓòÉΓòÉ
  2226.  
  2227. The optional VBConstraints statement enables you to limit the use of your part. 
  2228.  
  2229. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2230.   Γöé           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
  2231.   Γöé           V          Γöé Γöé
  2232.   ΓööΓöÇΓöÇ //VBConstraints: ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÿ
  2233.               Γö£ΓöÇ noBaseClass ΓöÇΓöÇΓöñ
  2234.               Γö£ΓöÇ noEdit ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2235.               Γö£ΓöÇ noShow ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2236.               Γö£ΓöÇ noAdd ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2237.               ΓööΓöÇ noDefCtr ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2238.  
  2239.  noBaseClass 
  2240.    Optional keyword to prevent the part from being used as a base class by 
  2241.    another part or class. 
  2242.  
  2243.  noEdit 
  2244.    Optional keyword to prevent users from opening the part in a Visual Builder 
  2245.    editor. 
  2246.  
  2247.  noShow 
  2248.    Optional keyword to prevent the part from being listed on the Visual Builder 
  2249.    window. 
  2250.  
  2251.  noAdd 
  2252.    Optional keyword to prevent the part from being added to the Composition 
  2253.    Editor's free-form surface. 
  2254.  
  2255.  noDefCtr 
  2256.    Optional keyword indicating that the part requires at least one input 
  2257.    parameter to be constructed. If this keyword is specified, supply 
  2258.    constructor information in a VBConstructor statement. 
  2259.  
  2260.    Using this keyword enforces the following restrictions: 
  2261.  
  2262.        An attribute of this type cannot be torn off on the free-form surface. 
  2263.  
  2264.        Users cannot create a variable of this type. To use this part as a 
  2265.         variable, users must specify a pointer to this part as the variable 
  2266.         type. 
  2267.  
  2268.        This type cannot be returned as an action result. Instead, users must 
  2269.         specify a pointer to this part as the return type of the action. 
  2270.  
  2271.  
  2272. ΓòÉΓòÉΓòÉ 7.2.8. VBConstructor Statement for a Part ΓòÉΓòÉΓòÉ
  2273.  
  2274. The optional VBConstructor statement specifies the form of the part's 
  2275. constructor. If you do not use this statement, Visual Builder expects a 
  2276. contructor as follows: 
  2277.  
  2278.      If the part is nonvisual, a standard C++ default constructor. 
  2279.  
  2280.      If the part is visual, a constructor of the same form as a public 
  2281.       constructor for IWindow. IBM Open Class provides several constructors 
  2282.       that differ in the default values provided for the input arguments. 
  2283.  
  2284.   >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2285.     ΓööΓöÇΓöÇ //VBConstructor: ΓöÇΓöÇΓöÇ constructor ΓöÇΓöÇΓöÿ
  2286.  
  2287.  constructor 
  2288.    C++ public constructor definition. 
  2289.  
  2290.  When generating the part's base class initializer list, Visual Builder uses 
  2291.  the following process to supply input arguments for the base class: 
  2292.  
  2293.    1. Visual Builder tries to match up the names of input arguments in the 
  2294.       modified constructor with those of input arguments in the base class' 
  2295.       constructor. 
  2296.  
  2297.    2. To supply arguments that remain unmatched, Visual Builder looks for the 
  2298.       following special attributes in the primary part that correspond to input 
  2299.       arguments in the base class' constructor. (In an IFrameWindow-based 
  2300.       composite part, the IFrameWindow* part is the primary part.) 
  2301.  
  2302.           id, the part's window ID 
  2303.           parent, the part's parent window 
  2304.           owner, the part's owner 
  2305.           rect, the rectangle that represents the part's size and position 
  2306.  
  2307.    3. To supply arguments that are still unmatched, Visual Builder looks for 
  2308.       default argument values in the header prototype for the base class' 
  2309.       constructor. 
  2310.  
  2311.    4. If any arguments are not matched up at this point, Visual Builder 
  2312.       displays an error message. 
  2313.  
  2314.  If you want your class to have multiple constructors, put them in the .hpv and 
  2315.  .cpv files that contain your feature code and include them when the code is 
  2316.  generated. For more information about .cpv and .hpv files, see the Visual 
  2317.  Builder User's Guide. 
  2318.  
  2319.  Visual Builder expects the constructor for visual parts to include a style 
  2320.  flag. If your part's constructor does not take a style flag as an input 
  2321.  parameter, you must include VBConstructor and VBAttribute statements for the 
  2322.  part. The following VBAttribute statement prevents the Styles setting page 
  2323.  from being enabled for the part. Use this statement to prevent problems at run 
  2324.  time. 
  2325.  
  2326.   //VBAttribute: style,
  2327.   //VB:      "override to remove style from the part"
  2328.   //VB:      integer,,,, NOCONNECT NOSETTING
  2329.  
  2330.  
  2331. ΓòÉΓòÉΓòÉ 7.2.9. VBEvent Statement for a Part ΓòÉΓòÉΓòÉ
  2332.  
  2333. The optional VBEvent statement specifies the event information. This 
  2334. information includes the event name, event description, event notification ID, 
  2335. parameter name, and parameter type. Use this statement to describe events 
  2336. implemented by the part that are useful in making connections. Do not use the 
  2337. VBEvent statement to describe events that occur as a result of attribute 
  2338. changes; specify this information on the VBAttribute statement. 
  2339.  
  2340. >ΓöÇΓöÇ//VBEvent: ΓöÇΓöÇ event_name ΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇnotificationIDΓöÇΓöÇΓöÇ>
  2341.                  ΓööΓöÇ "description" ΓöÇΓöÿ
  2342.  
  2343. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2344.   ΓööΓöÇΓöÇ,parameter_name ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÿ
  2345.             ΓööΓöÇΓöÇ,parameter_type ΓöÇΓöÇΓöÿ
  2346.  
  2347.  event_name 
  2348.    Event name to be used by the Visual Builder user interface. 
  2349.  
  2350.  description 
  2351.    Optional event description. 
  2352.  
  2353.  notificationID 
  2354.    C++ public notification ID. 
  2355.  
  2356.  parameter_name 
  2357.    Optional event parameter name. 
  2358.  
  2359.  parameter_type 
  2360.    Optional event parameter type. 
  2361.  
  2362.  
  2363. ΓòÉΓòÉΓòÉ 7.2.10. VBAttribute Statement for a Part ΓòÉΓòÉΓòÉ
  2364.  
  2365. The optional VBAttribute statement specifies the attribute information. This 
  2366. information includes the attribute name, attribute description, attribute type 
  2367. (class name), get member function declaration, set member function declaration, 
  2368. and attribute notification ID. Use this statement to describe attributes 
  2369. implemented by the part that are useful in making connections. 
  2370.  
  2371. >ΓöÇΓöÇ//VBAttribute: ΓöÇΓöÇ attribute_name ΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇ typeΓöÇΓöÇ,ΓöÇ>
  2372.                      ΓööΓöÇ "description" ΓöÇΓöÿ
  2373.  
  2374. >ΓöÇΓöÇquery_memberΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2375.          ΓööΓöÇΓöÇ,set_memberΓöÇΓöÇΓöÿ  ΓööΓöÇΓöÇ,notificationID ΓöÇΓöÇΓöÿ
  2376.  
  2377. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2378.   ΓööΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇ NOSETTING ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÿ
  2379.      Γö£ΓöÇΓöÇ NOSETTING NOCONNECT ΓöÇΓöÇΓöñ
  2380.      ΓööΓöÇΓöÇ NOCONNECT ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2381.  
  2382.  attribute_name 
  2383.    Attribute name to be used by the Visual Builder user interface. 
  2384.  
  2385.  description 
  2386.    Optional attribute description. 
  2387.  
  2388.  type 
  2389.    Attribute type. 
  2390.  
  2391.  query_member 
  2392.    C++ public get member function that returns the attribute value. Specify 
  2393.    this as a forward declaration. 
  2394.  
  2395.  set_member 
  2396.    Optional C++ public set member function that changes the attribute value. 
  2397.    Specify this as a forward declaration. 
  2398.  
  2399.  notificationID 
  2400.    Optional C++ public attribute notification ID. 
  2401.  
  2402.  NOSETTING 
  2403.    Optional keyword to prevent the attribute's appearance on a generic settings 
  2404.    page. 
  2405.  
  2406.  NOSETTING NOCONNECT 
  2407.    Optional keyword combination to hide a feature defined by a base part. 
  2408.  
  2409.  NOCONNECT 
  2410.    Optional keyword to disable connections to this feature. 
  2411.  
  2412.  
  2413. ΓòÉΓòÉΓòÉ 7.2.11. VBAction Statement for a Part ΓòÉΓòÉΓòÉ
  2414.  
  2415. The optional VBAction statement specifies the action information. This 
  2416. information includes the action name, action description, return type, and the 
  2417. C++ action member that implements the action. Use this statement to describe 
  2418. actions implemented by the part that are useful in making connections. To 
  2419. describe member functions that support attributes, use the VBAttribute 
  2420. statement. 
  2421.  
  2422. >ΓöÇΓöÇ//VBAction: ΓöÇΓöÇ action_name ΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2423.                   ΓööΓöÇ "description" ΓöÇΓöÿ
  2424.  
  2425. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇ action_member ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2426.   ΓööΓöÇΓöÇ return_type ΓöÇΓöÇΓöÿ            ΓööΓöÇΓöÇ,NOCONNECT ΓöÇΓöÇΓöÿ
  2427.  
  2428.  action_name 
  2429.    Action name to be used by the Visual Builder user interface. Connections to 
  2430.    this action are allowed unless the NOCONNECT option has been specified. 
  2431.  
  2432.  description 
  2433.    Optional action description. 
  2434.  
  2435.  return_type 
  2436.    Optional return type that specifies the type of the return value from the 
  2437.    action and allows the user to make connections to this value. 
  2438.  
  2439.  action_member 
  2440.    C++ public member function that implements the action. The parameter names 
  2441.    are used in the Visual Builder user interface to make connnections to 
  2442.    parameters. 
  2443.  
  2444.  NOCONNECT 
  2445.    Optional keyword to disable connections to this feature. 
  2446.  
  2447.  
  2448. ΓòÉΓòÉΓòÉ 7.2.12. VBPreferredFeatures Statement for a Part ΓòÉΓòÉΓòÉ
  2449.  
  2450. The optional VBPreferredFeatures statement specifies the preferred part 
  2451. features. If you do not use this statement, the base part's preferred list is 
  2452. used. If you do use this statement, the base part's preferred list is not 
  2453. inherited, and you must specify the complete list of preferred features for 
  2454. this part. 
  2455.  
  2456. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2457.   Γöé              ΓöîΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  Γöé
  2458.   Γöé              V             Γöé  Γöé
  2459.   ΓööΓöÇΓöÇ//VBPreferredFeatures: ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ action_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  2460.                  Γö£ΓöÇΓöÇ attribute_name ΓöÇΓöÇΓöñ
  2461.                  ΓööΓöÇΓöÇ event_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2462.  
  2463.  action_name 
  2464.    Preferred action name. 
  2465.  
  2466.  attribute_name 
  2467.    Preferred attribute name. 
  2468.  
  2469.  event_name 
  2470.    Preferred event name. 
  2471.  
  2472.  
  2473. ΓòÉΓòÉΓòÉ 7.2.13. VB Statement for a Part ΓòÉΓòÉΓòÉ
  2474.  
  2475. The optional VB statement allows interface information to be continued on the 
  2476. next statement line. This can be useful when a single statement exceeds a 
  2477. reasonable length. For example, you can use this statement to keep each line 
  2478. under 80 characters. 
  2479.  
  2480. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2481.   ΓööΓöÇΓöÇ //VB: ΓöÇΓöÇΓöÿ
  2482.  
  2483.  
  2484. ΓòÉΓòÉΓòÉ 7.2.14. VBEndPartInfo Statement for a Part ΓòÉΓòÉΓòÉ
  2485.  
  2486. The VBEndPartInfo statement specifies the end of the part interface 
  2487. information. 
  2488.  
  2489. >ΓöÇΓöÇ//VBEndPartInfo: ΓöÇΓöÇ part_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  2490.  
  2491.  part_name 
  2492.    Valid and unique C++ class name. 
  2493.  
  2494.  
  2495. ΓòÉΓòÉΓòÉ 7.2.15. Sample Part Information for IAddress ΓòÉΓòÉΓòÉ
  2496.  
  2497. The following is an example of interface information for the IAddress nonvisual 
  2498. part: 
  2499.  
  2500.   //VBBeginPartInfo: IAddress, "IBM sample address"
  2501.  //VBParent: IStandardNotifier
  2502.  //VBIncludes: <iadd.hpp> _IADD_
  2503.  //VBPartDataFile: 'VBSample.vbb'
  2504.  //VBComposerInfo: nonvisual, 10058, dde4vr30
  2505.  //
  2506.  //VBAttribute: city,
  2507.  //VB:      "Query the city (IString) attribute.",
  2508.  //VB:      IString,
  2509.  //VB:      virtual IString city() const,
  2510.  //VB:      virtual IAddress& setCity(const IString& city),
  2511.  //VB:      cityId
  2512.  //VBAttribute: state,
  2513.  //VB:      "Query the state (IString) attribute.",
  2514.  //VB:      IString,
  2515.  //VB:      virtual IString state() const,
  2516.  //VB:      virtual IAddress& setState(const IString& state),
  2517.  //VB:      stateId
  2518.  //VBAttribute: street,
  2519.  //VB:      "Query the street (IString) attribute.",
  2520.  //VB:      IString,
  2521.  //VB:      virtual IString street() const,
  2522.  //VB:      virtual IAddress& setStreet(const IString& street),
  2523.  //VB:      streetId
  2524.  //VBAttribute: zip,
  2525.  //VB:      "Query the zip (IString) attribute.",
  2526.  //VB:      IString,
  2527.  //VB:      virtual IString zip() const,
  2528.  //VB:      virtual IAddress& setZip(const IString& zip),
  2529.  //VB:      zipId
  2530.  //VBAction: operator !=
  2531.  //VB:    ,, Boolean,
  2532.  //VB:    Boolean operator !=(const IAddress* aValue) const
  2533.  //VBAction: operator ==
  2534.  //VB:    ,, Boolean,
  2535.  //VB:    Boolean operator ==(const IAddress* aValue) const
  2536.  //VBAction: setCityToDefault
  2537.  //VB:    ,"Perform the setCityToDefault action.",,
  2538.  //VB:    virtual IAddress& setCityToDefault()
  2539.  //VBAction: setStateToDefault
  2540.  //VB:    ,"Perform the setStateToDefault action.",,
  2541.  //VB:    virtual IAddress& setStateToDefault()
  2542.  //VBAction: setStreetToDefault
  2543.  //VB:    ,"Perform the setStreetToDefault action.",,
  2544.  //VB:    virtual IAddress& setStreetToDefault()
  2545.  //VBAction: setToDefault
  2546.  //VB:    ,"Perform the setToDefault action.",,
  2547.  //VB:    virtual IAddress& setToDefault()
  2548.  //VBAction: setZipToDefault
  2549.  //VB:    ,"Perform the setZipToDefault action.",,
  2550.  //VB:    virtual IAddress& setZipToDefault()
  2551.  //VBPreferredFeatures: this, city, state, street, zip
  2552.  //VBEndPartInfo: IAddress
  2553.  
  2554.  
  2555. ΓòÉΓòÉΓòÉ 7.3. Class Information Syntax ΓòÉΓòÉΓòÉ
  2556.  
  2557. This section describes the interface information for classes that Visual 
  2558. Builder uses. Syntax descriptions appear in the recommended order of occurrence 
  2559. in a part information file. Many of the statements are similar to the part 
  2560. interface statements documented in the previous section. The following rules 
  2561. apply to the interface information for classes: 
  2562.  
  2563.    1. All feature names (attributes, actions) within a class hierarchy must be 
  2564.       unique. If duplicate feature names exist, the information for the derived 
  2565.       class is used and the information for the base class is ignored for that 
  2566.       specific feature. 
  2567.  
  2568.    2. All class names must be unique and be valid C++ class names. 
  2569.  
  2570.    3. The names on the VBBeginPartInfo statement and VBEndPartInfo statement 
  2571.       must match. 
  2572.  
  2573.    4. Attribute and action information statements can appear more than once for 
  2574.       a specific part, but all other information statements must appear only 
  2575.       once. 
  2576.  
  2577.  For information about how to read these syntax diagrams, see How to Read 
  2578.  Syntax Diagrams. 
  2579.  
  2580.  
  2581. ΓòÉΓòÉΓòÉ 7.3.1. VBBeginPartInfo Statement for a Class ΓòÉΓòÉΓòÉ
  2582.  
  2583. The first statement describing the interface is the VBBeginPartInfo statement. 
  2584. This statement specifies the class name and the class description. 
  2585.  
  2586. >>ΓöÇΓöÇ//VBBeginPartInfo: ΓöÇΓöÇ class_name ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2587.                     ΓööΓöÇΓöÇ,"description" ΓöÇΓöÿ
  2588.  
  2589.  class_name 
  2590.    Valid and unique C++ class name that implements the interface. 
  2591.  
  2592.  description 
  2593.    Optional class description. 
  2594.  
  2595.  
  2596. ΓòÉΓòÉΓòÉ 7.3.2. VBParent Statement for a Class ΓòÉΓòÉΓòÉ
  2597.  
  2598. The optional VBParent statement describes the class' base class. The actions 
  2599. defined by the base class are inherited. 
  2600.  
  2601. >ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2602.    ΓööΓöÇΓöÇ //VBParent: ΓöÇΓöÇΓöÇΓöÇΓöÇ parent_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2603.  
  2604.  parent_name 
  2605.    Valid and unique C++ class name. 
  2606.  
  2607.  
  2608. ΓòÉΓòÉΓòÉ 7.3.3. VBIncludes Statement for a Class ΓòÉΓòÉΓòÉ
  2609.  
  2610. The VBIncludes statement describes the include file that contains the 
  2611. declaration of the C++ class that implements the interface. 
  2612.  
  2613. >ΓöÇΓöÇΓöÇ //VBIncludes: ΓöÇΓöÇΓöÇΓöÇ<include_file>ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2614.                     ΓööΓöÇΓöÇ include_define ΓöÇΓöÇΓöÿ
  2615.  
  2616.  include_file 
  2617.    Header file required by the compiler to use this class. If you want to 
  2618.    specify a link dependency in your application make file, use double 
  2619.    quotation marks (" ") to delimit the file name instead of the angle brackets 
  2620.    (< >). 
  2621.  
  2622.  include_define 
  2623.    Optional statement that associates a variable with the include statement, 
  2624.    enabling generated code to test for duplicate include statements. 
  2625.  
  2626.  
  2627. ΓòÉΓòÉΓòÉ 7.3.4. VBPartDataFile Statement for a Class ΓòÉΓòÉΓòÉ
  2628.  
  2629. The optional VBPartDataFile statement specifies the file in which to save the 
  2630. class interface information. If you do not use this statement, the imported 
  2631. file name is used with a .vbb extension. 
  2632.  
  2633. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2634.   ΓööΓöÇΓöÇ //VBPartDataFile: ΓöÇΓöÇΓöÇ file_name ΓöÇΓöÇΓöÿ
  2635.  
  2636.  file_name 
  2637.    File name in which to save the class interface information. 
  2638.  
  2639.  
  2640. ΓòÉΓòÉΓòÉ 7.3.5. VBComposerInfo Statement for a Class ΓòÉΓòÉΓòÉ
  2641.  
  2642. The class VBComposerInfo statement specifies the composer information needed to 
  2643. support classes. This information includes the icon resource ID and icon 
  2644. resource DLL name. 
  2645.  
  2646. >ΓöÇΓöÇ//VBComposerInfo: ΓöÇΓöÇ class ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2647.  
  2648. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ>
  2649.   ΓööΓöÇΓöÇ,ΓöÇΓöÇΓöÇ icon_resource_id ΓöÇΓöÇΓöÇ,ΓöÇΓöÇΓöÇ resource_dll ΓöÇΓöÿ  ΓööΓöÇΓöÇ ,abstract ΓöÇΓöÇΓöÿ
  2650.  
  2651.  icon_resource_id 
  2652.    Resource number of the icon to be used to represent the class. If you 
  2653.    specify this, you must also specify the resource DLL name. 
  2654.  
  2655.  resource_dll 
  2656.    Resource DLL name containing the icon to be used. Do not include the .dll 
  2657.    extension. 
  2658.  
  2659.  abstract 
  2660.    Optional keyword to indicate that the class is abstract. Abstract classes 
  2661.    cannot be dropped on the free-form surface. 
  2662.  
  2663.  
  2664. ΓòÉΓòÉΓòÉ 7.3.6. VBConstraints Statement for a Class ΓòÉΓòÉΓòÉ
  2665.  
  2666. The optional VBConstraints statement enables you to limit the use of your 
  2667. class. 
  2668.  
  2669. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2670.   Γöé           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
  2671.   Γöé           V          Γöé Γöé
  2672.   ΓööΓöÇΓöÇ //VBConstraints: ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÿ
  2673.               Γö£ΓöÇ noBaseClass ΓöÇΓöÇΓöñ
  2674.               Γö£ΓöÇ noEdit ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2675.               Γö£ΓöÇ noShow ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2676.               Γö£ΓöÇ noAdd ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2677.               ΓööΓöÇ noDefCtr ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2678.  
  2679.  noBaseClass 
  2680.    Optional keyword to prevent the class from being used as a base class by 
  2681.    another part or class. 
  2682.  
  2683.  noEdit 
  2684.    Optional keyword to prevent users from opening the class in a Visual Builder 
  2685.    editor. 
  2686.  
  2687.  noShow 
  2688.    Optional keyword to prevent the class from being listed on the Visual 
  2689.    Builder window. 
  2690.  
  2691.  noAdd 
  2692.    Optional keyword to prevent the class from being added to the Composition 
  2693.    Editor's free-form surface. 
  2694.  
  2695.  noDefCtr 
  2696.    Optional keyword to indicate that the class requires at least one input 
  2697.    parameter to be constructed. If this keyword is specified, supply 
  2698.    constructor information in a VBConstructor statement. 
  2699.  
  2700.    Using this keyword enforces the following restrictions: 
  2701.  
  2702.        An attribute of this type cannot be torn off on the free-form surface. 
  2703.  
  2704.        Users cannot create a variable of this type. To use this class as a 
  2705.         variable, users must specify a pointer to this class as the variable 
  2706.         type. 
  2707.  
  2708.        This type cannot be returned as an action result. Instead, users must 
  2709.         specify a pointer to this class as the return type of the action. 
  2710.  
  2711.  
  2712. ΓòÉΓòÉΓòÉ 7.3.7. VBConstructor Statement for a Class ΓòÉΓòÉΓòÉ
  2713.  
  2714. The optional VBConstructor statement specifies the class constructor 
  2715. information. 
  2716.  
  2717. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2718.   ΓööΓöÇΓöÇ //VBConstructor: ΓöÇΓöÇΓöÇ constructor ΓöÇΓöÇΓöÿ
  2719.  
  2720.  constructor 
  2721.    C++ public constructor definition. The parameter names are used in the 
  2722.    Visual Builder settings pages to specify the parameters. Each parameter name 
  2723.    must match an attribute name. 
  2724.  
  2725.  
  2726. ΓòÉΓòÉΓòÉ 7.3.8. VBAction Statement for a Class ΓòÉΓòÉΓòÉ
  2727.  
  2728. The optional VBAction statement specifies the action information. This 
  2729. information includes the action name, action description, return type, and the 
  2730. action member that implements the action. 
  2731.  
  2732. >ΓöÇΓöÇ//VBAction: ΓöÇΓöÇ action_name ΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2733.                   ΓööΓöÇ "description" ΓöÇΓöÿ
  2734.  
  2735. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇ action_member ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2736.   ΓööΓöÇΓöÇ return_type ΓöÇΓöÇΓöÿ            ΓööΓöÇΓöÇ,NOCONNECT ΓöÇΓöÇΓöÿ
  2737.  
  2738.  action_name 
  2739.    Action name to be used by the Visual Builder user interface. Connections to 
  2740.    this action are allowed unless the NOCONNECT option has been specified. 
  2741.  
  2742.  description 
  2743.    Optional action description. 
  2744.  
  2745.  return_type 
  2746.    Optional return type. 
  2747.  
  2748.  action_member 
  2749.    C++ public member function that implements the action. The parameter names 
  2750.    are used in the Visual Builder user interface to make connnections to 
  2751.    parameters. 
  2752.  
  2753.  NOCONNECT 
  2754.    Optional keyword to disable connections to this feature. 
  2755.  
  2756.  
  2757. ΓòÉΓòÉΓòÉ 7.3.9. VBAttribute Statement for a Class ΓòÉΓòÉΓòÉ
  2758.  
  2759. The optional VBAttribute statement specifies the attribute information. This 
  2760. information includes the attribute name, attribute description, attribute type 
  2761. (class name), get member function declaration, set member function declaration, 
  2762. and attribute notification ID. 
  2763.  
  2764. >ΓöÇΓöÇ//VBAttribute: ΓöÇΓöÇ attribute_name ΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇ typeΓöÇΓöÇ,ΓöÇ>
  2765.                      ΓööΓöÇ "description" ΓöÇΓöÿ
  2766.  
  2767. >ΓöÇΓöÇquery_memberΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ>
  2768.          ΓööΓöÇΓöÇ,set_memberΓöÇΓöÇΓöÿ ΓööΓöÇ,,ΓöÇΓöÇΓö¼ΓöÇΓöÇ NOSETTING ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÿ
  2769.                      Γö£ΓöÇΓöÇ NOSETTING NOCONNECT ΓöÇΓöÇΓöñ
  2770.                      ΓööΓöÇΓöÇ NOCONNECT ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2771.  
  2772.  attribute_name 
  2773.    Attribute name to be used by the Visual Builder user interface. 
  2774.  
  2775.  description 
  2776.    Optional attribute description. 
  2777.  
  2778.  type 
  2779.    Attribute type. 
  2780.  
  2781.  query_member 
  2782.    C++ public get member function that returns the attribute value. Specify 
  2783.    this in the form of a forward declaration. 
  2784.  
  2785.  set_member 
  2786.    Optional C++ public set member function that changes the attribute value. 
  2787.    Specify this in the form of a forward declaration. 
  2788.  
  2789.  NOSETTING 
  2790.    Optional keyword to prevent the attribute's appearance on a generic settings 
  2791.    page. 
  2792.  
  2793.  NOSETTING NOCONNECT 
  2794.    Optional keyword combination to hide a feature defined by a base class. 
  2795.  
  2796.  NOCONNECT 
  2797.    Optional keyword to disable connections to this feature. 
  2798.  
  2799.  
  2800. ΓòÉΓòÉΓòÉ 7.3.10. VBPreferredFeatures Statement for a Class ΓòÉΓòÉΓòÉ
  2801.  
  2802. The optional VBPreferredFeatures statement specifies the preferred part 
  2803. features. If you do not use this statement, the base class' preferred list is 
  2804. used. If you do use this statement, the base class' preferred list is not 
  2805. inherited, and you must specify the complete list of preferred features for 
  2806. this class. 
  2807.  
  2808. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2809.   Γöé              ΓöîΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  Γöé
  2810.   Γöé              V             Γöé  Γöé
  2811.   ΓööΓöÇΓöÇ//VBPreferredFeatures: ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ action_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  2812.                  ΓööΓöÇΓöÇ attribute_name ΓöÇΓöÇΓöÿ
  2813.  
  2814.  action_name 
  2815.    Preferred action name. 
  2816.  
  2817.  attribute_name 
  2818.    Preferred attribute name. 
  2819.  
  2820.  
  2821. ΓòÉΓòÉΓòÉ 7.3.11. VB Statement for a Class ΓòÉΓòÉΓòÉ
  2822.  
  2823. The optional VB statement allows the information to be continued on the next 
  2824. statement line. This can be useful when a single statement exceeds a reasonable 
  2825. length. For example, you can use this statement to keep each line under 80 
  2826. characters. 
  2827.  
  2828. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2829.   ΓööΓöÇΓöÇ //VB: ΓöÇΓöÇΓöÿ
  2830.  
  2831.  
  2832. ΓòÉΓòÉΓòÉ 7.3.12. VBEndPartInfo Statement for a Class ΓòÉΓòÉΓòÉ
  2833.  
  2834. The VBEndPartInfo statement specifies the end of the class interface 
  2835. information. 
  2836.  
  2837. >ΓöÇΓöÇ//VBEndPartInfo: ΓöÇΓöÇ class_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  2838.  
  2839.  class_name 
  2840.    Valid and unique C++ class name. 
  2841.  
  2842.  
  2843. ΓòÉΓòÉΓòÉ 7.3.13. Sample Class Information for IRange ΓòÉΓòÉΓòÉ
  2844.  
  2845. The following is an example of interface information for the IRange class: 
  2846.  
  2847.   //VBBeginPartInfo: IRange, "IBM range of coordinate values"
  2848.  //VBParent: IPair
  2849.  //VBIncludes: <ipoint.hpp> _IPOINT_
  2850.  //VBPartDataFile: 'VBBase.vbb'
  2851.  //VBComposerInfo: class, 204, dde4vr30
  2852.  //
  2853.  //VBAttribute: lowerBound,
  2854.  //VB:      "Returns the lower bound of the range.",
  2855.  //VB:      Coord,
  2856.  //VB:      Coord lowerBound() const,
  2857.  //VB:      IRange& setLowerBound(Coord lowerBound)
  2858.  //VBAttribute: upperBound,
  2859.  //VB:      "Returns the upper bound of the range.",
  2860.  //VB:      Coord,
  2861.  //VB:      Coord upperBound() const,
  2862.  //VB:      IRange& setUpperBound(Coord upperBound)
  2863.  //VBAction: includes,
  2864.  //VB:    "Returns true if the range contains the specified coordinate value.",
  2865.  //VB:    Boolean,
  2866.  //VB:    Boolean includes(Coord aValue) const
  2867.  //VBPreferredFeatures: this, lowerBound, upperBound
  2868.  //VBEndPartInfo: IRange
  2869.  
  2870.  
  2871. ΓòÉΓòÉΓòÉ 7.4. Function Group Information Syntax ΓòÉΓòÉΓòÉ
  2872.  
  2873. This section describes the interface information for a group of related C 
  2874. functions that you want to use within Visual Builder. Syntax descriptions 
  2875. appear in the recommended order of occurrence in a file. The following rules 
  2876. apply to the interface information for function groups: 
  2877.  
  2878.    1. All action names within a function group must be unique. 
  2879.  
  2880.    2. All function group names must be unique. 
  2881.  
  2882.    3. The name on the VBBeginPartInfo statement and VBEndPartInfo statement 
  2883.       must match. 
  2884.  
  2885.    4. Action information statements can appear more than once for a specific 
  2886.       part, but all other information statements must appear only once. 
  2887.  
  2888.  For information about how to read these syntax diagrams, see How to Read 
  2889.  Syntax Diagrams. 
  2890.  
  2891.  
  2892. ΓòÉΓòÉΓòÉ 7.4.1. VBBeginPartInfo Statement for Function Groups ΓòÉΓòÉΓòÉ
  2893.  
  2894. The first statement describing a group of functions is the VBBeginPartInfo 
  2895. statement. This statement specifies the function group name and the function 
  2896. group description. 
  2897.  
  2898. >>ΓöÇΓöÇ//VBBeginPartInfo: ΓöÇΓöÇ function_group_name ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2899.                         ΓööΓöÇΓöÇ,"description" ΓöÇΓöÿ
  2900.  
  2901.  function_group_name 
  2902.    A unique name that identifies a set of related functions as a group. 
  2903.  
  2904.  description 
  2905.    Optional description. 
  2906.  
  2907.  
  2908. ΓòÉΓòÉΓòÉ 7.4.2. VBIncludes Statement for Function Groups ΓòÉΓòÉΓòÉ
  2909.  
  2910. The VBIncludes statement describes the include file that contains the 
  2911. definition of the function group implemented in the interface. 
  2912.  
  2913. >ΓöÇΓöÇΓöÇ //VBIncludes: ΓöÇΓöÇΓöÇΓöÇ<include_file>ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2914.                     ΓööΓöÇΓöÇ include_define ΓöÇΓöÇΓöÿ
  2915.  
  2916.  include_file 
  2917.    Header file required by the compiler to use this function group. If you want 
  2918.    to specify a link dependency in your application make file, use double 
  2919.    quotation marks (" ") to delimit the file name instead of the angle brackets 
  2920.    (< >). 
  2921.  
  2922.  include_define 
  2923.    Optional statement that associates a variable with the include statement, 
  2924.    enabling generated code to test for duplicate include statements. 
  2925.  
  2926.  
  2927. ΓòÉΓòÉΓòÉ 7.4.3. VBPartDataFile Statement for Function Groups ΓòÉΓòÉΓòÉ
  2928.  
  2929. The optional VBPartDataFile statement specifies the file in which to save the 
  2930. function information. If you do not use this statement, the imported file name 
  2931. is used with a .vbb extension. 
  2932.  
  2933. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2934.   ΓööΓöÇΓöÇ //VBPartDataFile: ΓöÇΓöÇΓöÇ file_name ΓöÇΓöÇΓöÿ
  2935.  
  2936.  file_name 
  2937.    File name in which to save the function group interface information. 
  2938.  
  2939.  
  2940. ΓòÉΓòÉΓòÉ 7.4.4. VBComposerInfo Statement for Function Groups ΓòÉΓòÉΓòÉ
  2941.  
  2942. The VBComposerInfo statement specifies the composer information needed to 
  2943. support a group of functions. This information includes the icon resource ID 
  2944. and icon resource DLL name. 
  2945.  
  2946. >ΓöÇΓöÇ//VBComposerInfo: ΓöÇΓöÇ functions ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2947.  
  2948. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2949.   ΓööΓöÇΓöÇ,ΓöÇΓöÇΓöÇ icon_resource_id ΓöÇΓöÇΓöÇ,ΓöÇΓöÇΓöÇ resource_dll ΓöÇΓöÿ
  2950.  
  2951.  icon_resource_id 
  2952.    Resource number of the icon to be used to represent the function group. If 
  2953.    you specify this, you must also specify the resource DLL name. 
  2954.  
  2955.  resource_dll 
  2956.    Resource DLL name containing the icon to be used. Do not include the .dll 
  2957.    extension. 
  2958.  
  2959.  
  2960. ΓòÉΓòÉΓòÉ 7.4.5. VBConstraints Statement for Function Groups ΓòÉΓòÉΓòÉ
  2961.  
  2962. The optional VBConstraints statement enables you to limit the use of your 
  2963. function group. 
  2964.  
  2965. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2966.   Γöé           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
  2967.   Γöé           V       Γöé Γöé
  2968.   ΓööΓöÇΓöÇ //VBConstraints: ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÿ
  2969.               Γö£ΓöÇ noShow ΓöÇΓöÇΓöñ
  2970.               ΓööΓöÇ noAdd ΓöÇΓöÇΓöÇΓöÿ
  2971.  
  2972.  noShow 
  2973.    Optional keyword to prevent the function group from being listed on the 
  2974.    Visual Builder window. 
  2975.  
  2976.  noAdd 
  2977.    Optional keyword to prevent the function group from being added to the 
  2978.    Composition Editor's free-form surface. 
  2979.  
  2980.  
  2981. ΓòÉΓòÉΓòÉ 7.4.6. VBAction Statement for Function Groups ΓòÉΓòÉΓòÉ
  2982.  
  2983. The optional VBAction statement specifies the action information. This 
  2984. information includes the action name, action description, return type, and the 
  2985. C++ function definition. 
  2986.  
  2987. >ΓöÇΓöÇ//VBAction: ΓöÇΓöÇ action_name ΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2988.                   ΓööΓöÇ "description" ΓöÇΓöÿ
  2989.  
  2990. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇ function_definition ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  2991.   ΓööΓöÇΓöÇ return_type ΓöÇΓöÇΓöÿ
  2992.  
  2993.  action_name 
  2994.    Action name to be used by the Visual Builder user interface. 
  2995.  
  2996.  description 
  2997.    Optional action description. 
  2998.  
  2999.  return_type 
  3000.    Optional return type. 
  3001.  
  3002.  function_definition 
  3003.    C public function that implements the action. The parameter names are used 
  3004.    in the Visual Builder user interface to make connnections to parameters. 
  3005.  
  3006.  
  3007. ΓòÉΓòÉΓòÉ 7.4.7. VB Statement for Function Groups ΓòÉΓòÉΓòÉ
  3008.  
  3009. The optional VB statement allows the information to be continued on the next 
  3010. statement line. This can be useful when a single statement exceeds a reasonable 
  3011. length. For example, you can use this statement to keep each line under 80 
  3012. characters. 
  3013.  
  3014. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3015.   ΓööΓöÇΓöÇ //VB: ΓöÇΓöÇΓöÿ
  3016.  
  3017.  
  3018. ΓòÉΓòÉΓòÉ 7.4.8. VBPreferredFeatures Statement for Function Groups ΓòÉΓòÉΓòÉ
  3019.  
  3020. The optional VBPreferredFeatures statement specifies the preferred actions. 
  3021.  
  3022. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3023.   Γöé              ΓöîΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  Γöé
  3024.   Γöé              V             Γöé  Γöé
  3025.   ΓööΓöÇΓöÇ//VBPreferredFeatures: ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ action_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ
  3026.  
  3027.  action_name 
  3028.    Preferred action name. 
  3029.  
  3030.  
  3031. ΓòÉΓòÉΓòÉ 7.4.9. VBEndPartInfo Statement for Function Groups ΓòÉΓòÉΓòÉ
  3032.  
  3033. The VBEndPartInfo statement specifies the end of the interface information. 
  3034.  
  3035. >ΓöÇΓöÇ//VBEndPartInfo: ΓöÇΓöÇ function_group_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  3036.  
  3037.  function_group_name 
  3038.    Function group name matching the previous VBBeginPartInfo statement. 
  3039.  
  3040.  
  3041. ΓòÉΓòÉΓòÉ 7.4.10. Sample Function Group Information ΓòÉΓòÉΓòÉ
  3042.  
  3043. The following is an example of a function group interface: 
  3044.  
  3045.   //
  3046.  //  process function group information
  3047.  //
  3048.  //VBBeginPartInfo: ProcessFunctions, "Process functions"
  3049.  //VBIncludes: <process.h>
  3050.  //VBPartDataFile: 'Process.vbb'
  3051.  //VBComposerInfo: functions, 10701, dde4vr30
  3052.  //VBAction: abort, "Abort program.",,
  3053.  //VB:    void _LNK_CONV abort( )
  3054.  //VBAction: exit, "Exit program.",,
  3055.  //VB:    void _LNK_CONV exit( int exitCode)
  3056.  //VBAction: system, "Execute system command.",,
  3057.  //VB:    void _LNK_CONV system( const char * commandString)
  3058.  //VBEndPartInfo: ProcessFunctions
  3059.  
  3060.  
  3061. ΓòÉΓòÉΓòÉ 7.5. Enumeration Information Syntax ΓòÉΓòÉΓòÉ
  3062.  
  3063. This section describes the interface information for enumerations that Visual 
  3064. Builder uses. Syntax descriptions appear in the recommended order of occurrence 
  3065. in a file. 
  3066.  
  3067. For information about how to read these syntax diagrams, see How to Read Syntax 
  3068. Diagrams. 
  3069.  
  3070.  
  3071. ΓòÉΓòÉΓòÉ 7.5.1. VBBeginEnumInfo Statement ΓòÉΓòÉΓòÉ
  3072.  
  3073. The first statement describing the interface is the VBBeginEnumInfo statement. 
  3074. This statement specifies the enumeration name and description. The enum_name 
  3075. must be a valid and unique C++ enumeration name. 
  3076.  
  3077. >>ΓöÇΓöÇ//VBBeginEnumInfo: ΓöÇΓöÇ enum_name ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3078.                    ΓööΓöÇΓöÇ,"description" ΓöÇΓöÿ
  3079.  
  3080.  enum_name 
  3081.    Fully qualified C++ enumeration name. 
  3082.  
  3083.  description 
  3084.    Optional enumeration description. 
  3085.  
  3086.  
  3087. ΓòÉΓòÉΓòÉ 7.5.2. VBIncludes Statement for an Enumeration ΓòÉΓòÉΓòÉ
  3088.  
  3089. The VBIncludes statement describes the include file that contains the 
  3090. definition of the enumeration. 
  3091.  
  3092. >ΓöÇΓöÇΓöÇ //VBIncludes: ΓöÇΓöÇΓöÇΓöÇ<include_file>ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3093.                     ΓööΓöÇΓöÇ include_define ΓöÇΓöÇΓöÿ
  3094.  
  3095.  include_file 
  3096.    Header file that defines the enumeration. If you want to specify a link 
  3097.    dependency in your application make file, use double quotation marks (" ") 
  3098.    to delimit the file name instead of the angle brackets (< >). 
  3099.  
  3100.  include_define 
  3101.    Optional statement that associates a variable with the include statement, 
  3102.    enabling generated code to test for duplicate include statements. 
  3103.  
  3104.  
  3105. ΓòÉΓòÉΓòÉ 7.5.3. VBPartDataFile Statement for an Enumeration ΓòÉΓòÉΓòÉ
  3106.  
  3107. The optional VBPartDataFile statement specifies the file in which to save the 
  3108. enumeration information. If you do not use this statement, the imported file 
  3109. name is used with a .vbb extension. 
  3110.  
  3111. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3112.   ΓööΓöÇΓöÇ //VBPartDataFile: ΓöÇΓöÇΓöÇ file_name ΓöÇΓöÇΓöÿ
  3113.  
  3114.  file_name 
  3115.    File name in which to save the enumeration interface information. 
  3116.  
  3117.  
  3118. ΓòÉΓòÉΓòÉ 7.5.4. VBEnumerators Statement ΓòÉΓòÉΓòÉ
  3119.  
  3120. The VBEnumerators statement describes the enumerators for the enumeration. 
  3121.  
  3122.             ΓöîΓöÇΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3123.             V                 Γöé
  3124. >>ΓöÇΓöÇ//VBEnumerators: ΓöÇΓöÇΓöÇΓöÇΓöÇ enumeratorΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3125.                     ΓööΓöÇΓöÇ =value ΓöÇΓöÇΓöÿ
  3126.  
  3127.  enumerator 
  3128.    Enumerator name. 
  3129.  
  3130.  value 
  3131.    Value assigned to this enumerator. 
  3132.  
  3133.  
  3134. ΓòÉΓòÉΓòÉ 7.5.5. VB Statement for an Enumeration ΓòÉΓòÉΓòÉ
  3135.  
  3136. The optional VB statement allows the information to be continued on the next 
  3137. statement line. This can be useful when a single statement exceeds a reasonable 
  3138. length. For example, you can use this statement to keep each line under 80 
  3139. characters. 
  3140.  
  3141. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3142.   ΓööΓöÇΓöÇ //VB: ΓöÇΓöÇΓöÿ
  3143.  
  3144.  
  3145. ΓòÉΓòÉΓòÉ 7.5.6. VBEndEnumInfo Statement ΓòÉΓòÉΓòÉ
  3146.  
  3147. The VBEndEnumInfo statement specifies the end of the interface information. 
  3148.  
  3149. >ΓöÇΓöÇ//VBEndEnumInfo: ΓöÇΓöÇ enum_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  3150.  
  3151.  enum_name 
  3152.    Enumeration name matching the previous VBBeginEnumInfo statement. 
  3153.  
  3154.  
  3155. ΓòÉΓòÉΓòÉ 7.5.7. Sample Alignment Enumeration for IEntryField ΓòÉΓòÉΓòÉ
  3156.  
  3157. The IEntryField class defined in the ientryfd.hpp header file contains the 
  3158. following nested public Alignment enumeration: 
  3159.  
  3160.   #ifndef _IENTRYFD_
  3161.   #define _IENTRYFD_
  3162.  class IEntryField : public ITextControl  {
  3163.  public:
  3164.   enum Alignment {
  3165.    left,
  3166.    center,
  3167.    right
  3168.   };
  3169.  };
  3170.  #endif
  3171.  
  3172. An example of how you could define this Alignment enumeration in an interface 
  3173. file follows: 
  3174.  
  3175.   //VBBeginEnumInfo: IEntryField::Alignment
  3176.  //VBIncludes: <ientryfd.hpp> _IENTRYFD_
  3177.  //VBPartDataFile: 'VBBase.vbb'
  3178.  //VBEnumerators: left
  3179.  //VB:       ,center
  3180.  //VB:       ,right
  3181.  //VBEndEnumInfo: IEntryField::Alignment
  3182.  
  3183.  
  3184. ΓòÉΓòÉΓòÉ 7.6. Type Definition Information Syntax ΓòÉΓòÉΓòÉ
  3185.  
  3186. This section describes the interface information for type definitions that 
  3187. Visual Builder uses. Syntax descriptions appear in the recommended order of 
  3188. occurrence in a file. 
  3189.  
  3190. For information about how to read these syntax diagrams, see How to Read Syntax 
  3191. Diagrams. 
  3192.  
  3193.  
  3194. ΓòÉΓòÉΓòÉ 7.6.1. VBBeginTypedefInfo Statement ΓòÉΓòÉΓòÉ
  3195.  
  3196. The first statement describing the interface is the VBBeginTypedefInfo 
  3197. statement. This statement specifies the type definition name and the type 
  3198. definition description. 
  3199.  
  3200. >>ΓöÇΓöÇ//VBBeginTypedefInfo: ΓöÇΓöÇ typedef_name ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3201.                        ΓööΓöÇΓöÇ,"description" ΓöÇΓöÿ
  3202.  
  3203.  typedef_name 
  3204.    Fully qualified C++ type definition name. 
  3205.  
  3206.  description 
  3207.    Optional type definition description. 
  3208.  
  3209.  
  3210. ΓòÉΓòÉΓòÉ 7.6.2. VBIncludes Statement for a Type Definition ΓòÉΓòÉΓòÉ
  3211.  
  3212. The VBIncludes statement describes the include file that contains the type 
  3213. definition. 
  3214.  
  3215. >ΓöÇΓöÇΓöÇ //VBIncludes: ΓöÇΓöÇΓöÇΓöÇ<include_file>ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3216.                     ΓööΓöÇΓöÇ include_define ΓöÇΓöÇΓöÿ
  3217.  
  3218.  include_file 
  3219.    Header file that contains the type definition. If you want to specify a link 
  3220.    dependency in your application make file, use double quotation marks (" ") 
  3221.    to delimit the file name instead of the angle brackets (< >). 
  3222.  
  3223.  include_define 
  3224.    Optional statement that associates a variable with the include statement, 
  3225.    enabling generated code to test for duplicate include statements. 
  3226.  
  3227.  
  3228. ΓòÉΓòÉΓòÉ 7.6.3. VBPartDataFile Statement for a Type Definition ΓòÉΓòÉΓòÉ
  3229.  
  3230. The optional VBPartDataFile statement specifies the file in which to save the 
  3231. type definition information. If you do not use this statement, the imported 
  3232. file name is used with a .vbb extension. 
  3233.  
  3234. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3235.   ΓööΓöÇΓöÇ //VBPartDataFile: ΓöÇΓöÇΓöÇ file_name ΓöÇΓöÇΓöÿ
  3236.  
  3237.  file_name 
  3238.    File name in which to save the type definition interface information. 
  3239.  
  3240.  
  3241. ΓòÉΓòÉΓòÉ 7.6.4. VB Statement for a Type Definition ΓòÉΓòÉΓòÉ
  3242.  
  3243. The optional VB statement allows the information to be continued on the next 
  3244. statement line. This can be useful when a single statement exceeds a reasonable 
  3245. length. For example, you can use this statement to keep each line under 80 
  3246. characters. 
  3247.  
  3248. >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>
  3249.   ΓööΓöÇΓöÇ //VB: ΓöÇΓöÇΓöÿ
  3250.  
  3251.  
  3252. ΓòÉΓòÉΓòÉ 7.6.5. VBEndTypedefInfo Statement ΓòÉΓòÉΓòÉ
  3253.  
  3254. The VBEndTypedefInfo statement specifies the end of the interface information. 
  3255.  
  3256. >ΓöÇΓöÇ//VBEndTypedefInfo: ΓöÇΓöÇ typedef_name ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  3257.  
  3258.  typedef_name 
  3259.    Type definition name matching the previous VBBeginTypedefInfo statement. 
  3260.  
  3261.  
  3262. ΓòÉΓòÉΓòÉ 7.6.6. Sample Type Definition Information ΓòÉΓòÉΓòÉ
  3263.  
  3264. The type definition typedef int IBoolean; in the isynonym.hpp file could be 
  3265. defined by the following .vbe file: 
  3266.  
  3267.   //VBBeginTypedefInfo: IBoolean
  3268.  //VBIncludes: <isynonym.hpp> _ISYNONYM_
  3269.  //VBPartDataFile: 'VBBase.vbb'
  3270.  //VBEndTypedefInfo: IBoolean
  3271.  
  3272.  
  3273. ΓòÉΓòÉΓòÉ 7.7. Other Syntax Examples ΓòÉΓòÉΓòÉ
  3274.  
  3275. An example of the buttonClickEvent event in the IButton part information file 
  3276. follows: 
  3277.  
  3278.   //VBEvent: buttonClickEvent,
  3279.  //VB:    "Notification ID provided to observers when button is clicked"
  3280.  //VB:    buttonClickId
  3281.  
  3282. An example of the importFromFile action with an IString parameter from the IMLE 
  3283. part information file follows: 
  3284.  
  3285.   //VBAction: importFromFile,
  3286.  //VB:    "Inserts the contents of a file into the MLE"
  3287.  //VB:    unsigned long,
  3288.  //VB:    virtual unsigned long importFromFile(const char* fileName,
  3289.  //VB:    EOLFormat type = cfText)
  3290.  
  3291.  
  3292. ΓòÉΓòÉΓòÉ 8. Sharing Parts with Others ΓòÉΓòÉΓòÉ
  3293.  
  3294.      What you will achieve 
  3295.  
  3296.      Providing part files (.vbb) 
  3297.  
  3298.      Providing part information files (.vbe) 
  3299.  
  3300.  Personal notes: 
  3301.  
  3302.  
  3303. ΓòÉΓòÉΓòÉ 8.1. What You Will Achieve ΓòÉΓòÉΓòÉ
  3304.  
  3305. The most effective parts can be reused with little effort by others that are 
  3306. previously not familiar with the parts' design. This chapter describes how you 
  3307. can distribute parts to others for reuse in their own applications. Parts can 
  3308. be distributed in several ways, as follows: 
  3309.  
  3310.      Providing part files (.vbb) for immediate use in Visual Builder. This 
  3311.       method is preferred for distributing visual parts. 
  3312.  
  3313.      Providing part information files (.vbe) for import into Visual Builder. 
  3314.       This method works for almost any type of part but must be used to 
  3315.       distribute function groups and user primitive parts. 
  3316.  
  3317.  In this chapter, the term part consumer refers to the recipient of the parts 
  3318.  you distribute. 
  3319.  
  3320.  
  3321. ΓòÉΓòÉΓòÉ 8.2. Providing part files (.vbb) ΓòÉΓòÉΓòÉ
  3322.  
  3323. You can provide either visual or nonvisual parts in a part file, but this 
  3324. method lends itself more to visual parts, for the following reasons: 
  3325.  
  3326.      In the case of visual parts, part consumers can see the parts in the 
  3327.       Composition Editor as they would appear in a finished application. 
  3328.  
  3329.      Part consumers can modify the parts. 
  3330.  
  3331.  If you want to distribute primitive visual or Composers parts, you must 
  3332.  provide part information files (.vbe) instead. 
  3333.  
  3334.  To provide part files, do the following: 
  3335.  
  3336.    1. Using Visual Builder, create a part file containing the parts. 
  3337.  
  3338.    2. Create and assign any icons needed for the new parts. 
  3339.  
  3340.    3. Supply the following to the part consumer: 
  3341.  
  3342.           A part file that contains the parts to be distributed 
  3343.  
  3344.           Any additional code files (.hpv or .cpv) needed to compile and use 
  3345.            the parts 
  3346.  
  3347.           Documentation or installation instructions, including any 
  3348.            information about how to add the parts to Visual Builder's parts 
  3349.            palette 
  3350.  
  3351.  To use the parts you distributed, the part consumer loads the part files and 
  3352.  generates source code. 
  3353.  
  3354.  
  3355. ΓòÉΓòÉΓòÉ 8.3. Providing Part Information Files (.vbe) ΓòÉΓòÉΓòÉ
  3356.  
  3357. You can share nonvisual parts, class interface parts, or function groups 
  3358. through part information files. Use this method to distribute user primitive or 
  3359. Composers parts as well. One advantage to this method is that you can prevent 
  3360. the part consumer from modifying the parts. The IAddress sample part is an 
  3361. example of a part provided using this method. 
  3362.  
  3363. To provide part information files, do the following: 
  3364.  
  3365.    1. Create parts using Visual Builder or your favorite editor. For dynamic 
  3366.       linking, create a dll and import library containing the supplied parts. 
  3367.       The header (.h or .hpp) file can use the #pragma library statement to 
  3368.       specify the library to be used in the link step. 
  3369.  
  3370.    2. Create and assign any icons needed for the new parts. 
  3371.  
  3372.    3. Supply the following to the part consumer: 
  3373.  
  3374.           The part information file that contains the parts to be distributed 
  3375.  
  3376.           Any files (.hpp, .h, .hpv, .lib, .dll) needed to use the parts 
  3377.  
  3378.            Note:  You must provide resource files (.rci) for class interface 
  3379.                   parts. If you do not provide these files, the resource 
  3380.                   compiler issues missing-file error messages. This file may 
  3381.                   contain as little as an end-of-file character, but consider 
  3382.                   adding a comment line to remind users why the file is needed. 
  3383.  
  3384.           Documentation or installation instructions, including any 
  3385.            information about how to add the parts to Visual Builder's parts 
  3386.            palette 
  3387.  
  3388.  To use the parts you distributed, the part consumer imports the part 
  3389.  information file into Visual Builder to create part files (.vbb). If you 
  3390.  provided a DLL with the part information file, no code generation or further 
  3391.  compilation is required. 
  3392.  
  3393.  
  3394. ΓòÉΓòÉΓòÉ 9. The IBM Class Notification Framework ΓòÉΓòÉΓòÉ
  3395.  
  3396.      Overview 
  3397.  
  3398.      Notifiers and observers 
  3399.  
  3400.      Notification protocol 
  3401.  
  3402.      IBM C++ notification class hierarchy 
  3403.  
  3404.  Personal notes: 
  3405.  
  3406.  
  3407. ΓòÉΓòÉΓòÉ 9.1. Overview ΓòÉΓòÉΓòÉ
  3408.  
  3409. This chapter provides an overview of the IBM class notification framework. You 
  3410. use this framework to implement event and attribute notification for visual and 
  3411. nonvisual parts. Developers coding to the IBM Open Class Library can also use 
  3412. it. 
  3413.  
  3414. The notification framework is different from the previously existing event 
  3415. handler framework. Handlers are capable of stopping the dispatching of events 
  3416. to the remaining handlers in the chain.  This is unsatisfactory for a 
  3417. notification framework, where registered observer objects must always be 
  3418. notified of an event regardless of how the event was handled. 
  3419.  
  3420. The notification framework contains the following entities: 
  3421.  
  3422.      Notifier objects that support the notifier protocol defined by the 
  3423.       INotifier class 
  3424.  
  3425.      Observer objects that support the observer protocol defined by the 
  3426.       IObserver class 
  3427.  
  3428.      Notification IDs, which are defined for parts that have been enabled for 
  3429.       event notification 
  3430.  
  3431.      Notification event objects defined by the INotificationEvent class 
  3432.  
  3433.  For examples of how the notification framework can be implemented in code, see 
  3434.  C++ Code to Enable Notification. 
  3435.  
  3436.  
  3437. ΓòÉΓòÉΓòÉ 9.2. Notifiers and Observers ΓòÉΓòÉΓòÉ
  3438.  
  3439. Notifier objects enable other objects in the system to register dependence upon 
  3440. the state of the notifier objects' properties. To register dependence, objects 
  3441. add an observer object to the notifier object by using the following function 
  3442. in the IObserver class: 
  3443.  
  3444. virtual IObserver
  3445.  &handleNotificationsFor (INotifier& aNotifier,
  3446.              const IEventData& userData = IEventData()),
  3447.  
  3448. The IObserver class also supports removing an observer from a notifier via the 
  3449. following: 
  3450.  
  3451. virtual IObserver
  3452.  &stopHandlingNotificationsFor (INotifier& aNotifier );
  3453.  
  3454. Notifier objects are responsible for publishing their supported notification 
  3455. events, managing the list of observers, and notifying observers when an event 
  3456. occurs. To notify observers of attribute changes or events, notifiers use the 
  3457. following member function defined by the INotifier class: 
  3458.  
  3459. virtual INotifier
  3460.  ¬ifyObservers (const INotificationEvent& anEvent) = 0;
  3461.  
  3462. The INotifier abstract base class defines the notifier protocol and requires 
  3463. its derived classes to completely implement its interface. To ensure that all 
  3464. notifier objects can coexist, no data is stored in any notifier object. 
  3465.  
  3466. A notifier adds observers to an observer list and uses this list to notify 
  3467. observers in a first-in, first-notified manner. 
  3468.  
  3469. The IObserver class defines the protocol that accepts event signals from the 
  3470. notifier object by overriding the member function in the IObserver class as 
  3471. follows: 
  3472.  
  3473.   virtual IObserver
  3474.   &dispatchNotificationEvent (const INotificationEvent&)=0;
  3475.  
  3476. Because a single list of observers is kept for each notifier, all observers in 
  3477. the list get called when any notification occurs within the notifier. Each 
  3478. observer must test to determine if a given notification event should be 
  3479. processed. Normally, this is done by checking notificationId in an 
  3480. INotificationEvent object. 
  3481.  
  3482. Notifier objects publish the notification events that they support by providing 
  3483. a series of unique identifiers in their interface. These notification IDs are 
  3484. string objects that are defined in the notifier. The string is in the form of 
  3485. the class name followed by the event name, such as 
  3486. IStaticText::backgroundColor. Each notification event provides a unique public 
  3487. static notification ID. 
  3488.  
  3489. Events are typically a notification of changes in the attributes or intrinsic 
  3490. data that can be accessed in a notifier object. Attributes can represent any 
  3491. logical property of a part, such as the balance of an account, the size of a 
  3492. shipment, or the label of a push button. 
  3493.  
  3494. A notification event is the data provided to an observer object when a change 
  3495. occurs in the attributes of an object. Included in this data is the identity of 
  3496. the attribute being changed and the part in which the change has occurred. 
  3497. Also, some of the data supplied to the observer can be the actual data being 
  3498. changed in the notifier object. 
  3499.  
  3500. A notification event can also include observer-specific data. The caller that 
  3501. registers the observer with a notifier provides this data as the userData 
  3502. parameter on the following call in the IObserver class: 
  3503.  
  3504. virtual IObserver
  3505.  &handleNotificationsFor (INotifier&     aNotifier,
  3506.              const IEventData& userData = IEventData()),
  3507.  
  3508. The notifier passes this data to that observer anytime it notifies the observer 
  3509. of an event. To support the use of existing classes in a part-building tool, it 
  3510. is highly desirable to be able to derive from these classes and add all 
  3511. required notification behavior in the derived class. You do this by multiply 
  3512. inheriting from the base class and the INotifier class. You can then update the 
  3513. derived class to provide the required notifier behavior and the appropriate 
  3514. notification IDs. Ideally, the class can also provide the required notification 
  3515. behavior. Whether this can actually be done depends on the design of the base 
  3516. class. 
  3517.  
  3518.  
  3519. ΓòÉΓòÉΓòÉ 9.3. Notification Protocol ΓòÉΓòÉΓòÉ
  3520.  
  3521. Concrete classes that inherit from the INotifier class implement its protocol. 
  3522. This includes the following: 
  3523.  
  3524.      Enabling, disabling, and querying the ability to signal events. 
  3525.  
  3526.       In general, notifiers are created disabled and must be enabled before 
  3527.       they can signal events. This allows notifier objects to delay the setup 
  3528.       to support notification until the notifier is enabled. (It also allows 
  3529.       the Visual Builder connection objects to initialize themselves and 
  3530.       related connection objects.) 
  3531.  
  3532.       The following member functions in the INotifier class enable you to 
  3533.       enable and disable notification: 
  3534.  
  3535.             virtual INotifier
  3536.              &enableNotification  (Boolean enabled = true) = 0,
  3537.              &disableNotification  () = 0;
  3538.  
  3539.      Managing the collection of observers, including adding and removing 
  3540.       observers.  These are defined by the following protected members in 
  3541.       INotifier: 
  3542.  
  3543.             virtual INotifier
  3544.              &addObserver      (IObserver&     anObserver,
  3545.                         const IEventData& userData) = 0,
  3546.              &removeObserver    (const IObserver&  anObserver) = 0,
  3547.              &removeAllObservers  () = 0;
  3548.  
  3549.      Within the notifier object, calling the following member function every 
  3550.       time an event of interest occurs: 
  3551.  
  3552.        notifyObservers(const INotificationEvent&) 
  3553.  
  3554.       While the classes providing notification must call this function, in many 
  3555.       cases it makes sense that the responsibility be delegated to another 
  3556.       class.  For instance, in the IBM Open Class User Interface Class Library, 
  3557.       this responsibility is typically delegated to handler style objects. 
  3558.  
  3559.  The protected member INotifier::addObserver accepts a piece of typeless data 
  3560.  as a const IEventData& that is forwarded to the IObserver instance with any 
  3561.  notification request. This enables a piece of data to be maintained for each 
  3562.  instance of an observer. (One concern in the window handler framework today is 
  3563.  that data cannot be stored in a handler object because the handler might be 
  3564.  handling many windows.) 
  3565.  
  3566.  The IStandardNotifier class provides the concrete implementation of the 
  3567.  notifier protocol and provides the base support for nonvisual parts. The 
  3568.  notifier protocol is also supported in the subclasses of IWindow. These 
  3569.  classes inherit from a notifier class that supports registration of and 
  3570.  notification to observer objects. The notification under the IWindow classes 
  3571.  occurs primarily using the existing handler classes. 
  3572.  
  3573.  Note:  Notification does not work across multiple threads. 
  3574.  
  3575.  
  3576. ΓòÉΓòÉΓòÉ 9.4. IBM C++ Notification Class Hierarchy ΓòÉΓòÉΓòÉ
  3577.  
  3578.                             IBase
  3579.                               Γöé
  3580.                   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3581.                   Γöé                           Γöé
  3582.                 IVBase               INotificationEvent
  3583.                   Γöé
  3584.            ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3585.            Γöé                  Γöé
  3586.        INotifier          IObserver
  3587.            Γöé
  3588.     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3589.     Γöé             Γöé
  3590.  IWindow    IStandardNotifier
  3591.     Γöé
  3592.     Γöé
  3593.  IControl
  3594.  
  3595. Within this partial hierarchy, note the following: 
  3596.  
  3597.      The INotifier abstract class defines the notifier protocol. 
  3598.      The IObserver abstract class defines the observer protocol. 
  3599.      The INotificationEvent class implements the notification event object. 
  3600.      The IStandardNotifier and IWindow classes are concrete implementations of 
  3601.       the notifier protocol. 
  3602.      Nonvisual parts would normally be derived from IStandardNotifier. 
  3603.      Visual parts would normally be derived from IWindow or IControl. 
  3604.  
  3605.  
  3606. ΓòÉΓòÉΓòÉ 10. C++ Code to Enable Notification ΓòÉΓòÉΓòÉ
  3607.  
  3608. Overview 
  3609.  
  3610. Code for an observer class 
  3611.  
  3612. Code for a notifier class 
  3613.  
  3614. Sample notification flow 
  3615.  
  3616. Personal notes: 
  3617.  
  3618.  
  3619. ΓòÉΓòÉΓòÉ 10.1. Overview ΓòÉΓòÉΓòÉ
  3620.  
  3621. Normally, parts are connected by using the Composition Editor; however, 
  3622. developers can also create code that uses the notification framework. This 
  3623. chapter describes a sample program that uses the notification framework to test 
  3624. the IAddress class. The following example shows how the streetChangedAction 
  3625. member function (action) in the IAddressTest class is run when the street 
  3626. attribute changes in the address object. 
  3627.  
  3628.  
  3629. ΓòÉΓòÉΓòÉ 10.2. Code for an Observer Class ΓòÉΓòÉΓòÉ
  3630.  
  3631. The first step is to code the connection or observer class to be used. The 
  3632. StreetConnection class in the IAddressTest example follows: 
  3633.  
  3634.   //**************************************************************************
  3635.  // StreetConnection Event-to-Action Connection Class
  3636.  //**************************************************************************
  3637.  class StreetConnection : public IObserver
  3638.  {
  3639.  public:
  3640.   StreetConnection(IAddressTest * newTestTarget)
  3641.   { iTestTarget = newTestTarget;          //Save source } ;
  3642.   ~StreetConnection () {};
  3643.  
  3644.  protected:
  3645.   IObserver &dispatchNotificationEvent  (const INotificationEvent& anEvent)
  3646.   {
  3647.    if (IAddress::streetId == anEvent.notificationId())
  3648.    {
  3649.     try {iTestTarget->streetChangedAction();}
  3650.     catch (IException& exc) {}
  3651.    }
  3652.    return *this;
  3653.   } ;
  3654.   IAddressTest * iTestTarget;
  3655.  } ;
  3656.  
  3657. The key points in the previous sample code follow: 
  3658.  
  3659.      The StreetConnection class is publicly derived from the IObserver class. 
  3660.  
  3661.      The connection target is required on the StreetConnection constructor and 
  3662.       is saved in ITestTarget to be used later in the dispatchNotificationEvent 
  3663.       member function. 
  3664.  
  3665.      The dispatchNotificationEvent member function is defined, and the code 
  3666.       checks if this event is the street-changed event as follows. streetId is 
  3667.       the notification ID for the street attribute. 
  3668.  
  3669.        if (IAddress::streetId == anEvent.notificationId()) 
  3670.  
  3671.       This is followed by the code (action) to execute if the test is true: 
  3672.  
  3673.               try {iTestTarget->streetChangedAction();}
  3674.              catch (IException& exc) {}:
  3675.  
  3676.    //*************************************************************************
  3677.    // main  - Application entry point                     *
  3678.    //*************************************************************************
  3679.    int main(int argc, char **argv)     //Main procedure with no parameters
  3680.    {
  3681.     IApplication::current().        //Get current
  3682.      setArgs(argc, argv);         //  and set command line parameters
  3683.  
  3684.     IAddress* sourceNotifier;
  3685.     IAddressTest* testTarget;
  3686.     testTarget = new IAddressTest ();
  3687.     sourceNotifier = new IAddress ();
  3688.  
  3689.     {
  3690.      StreetConnection * iStreet = new StreetConnection (testTarget);
  3691.      iStreet->handleNotificationsFor(*sourceNotifier);
  3692.     }
  3693.     {
  3694.      CityConnection * iCity = new CityConnection (testTarget);
  3695.      iCity->handleNotificationsFor(*sourceNotifier);
  3696.     }
  3697.     {
  3698.      StateConnection * iState = new StateConnection (testTarget);
  3699.      iState->handleNotificationsFor(*sourceNotifier);
  3700.     }
  3701.     {
  3702.      ZipConnection * iZip = new ZipConnection (testTarget);
  3703.      iZip->handleNotificationsFor(*sourceNotifier);
  3704.     }
  3705.     sourceNotifier->enableNotification();
  3706.     sourceNotifier->setStreet("");
  3707.     sourceNotifier->setCity("");
  3708.     sourceNotifier->setState("");
  3709.     sourceNotifier->setZip("");
  3710.  
  3711.     delete sourceNotifier;
  3712.     delete testTarget;
  3713.    } /* end main */
  3714.  
  3715.  
  3716. ΓòÉΓòÉΓòÉ 10.3. Code for a Notifier Class ΓòÉΓòÉΓòÉ
  3717.  
  3718. The following code creates a notifier object called sourceNotifier and an 
  3719. observer object called testTarget that is called when events in sourceNotifier 
  3720. are signalled: 
  3721.  
  3722.   testTarget = new IAddressTest ();
  3723.  sourceNotifier = new IAddress ();
  3724.  
  3725. The following code creates a StreetConnection object and adds it as an observer 
  3726. to the sourceNotifier: 
  3727.  
  3728.   StreetConnection * iStreet = new StreetConnection (testTarget);
  3729.  iStreet->handleNotificationsFor(*sourceNotifier);
  3730.  
  3731. The following code enables notification in sourceNotifier and changes the value 
  3732. of the street attribute in the sourceNotifier object: 
  3733.  
  3734.   sourceNotifier->enableNotification();
  3735.  sourceNotifier->setStreet("");
  3736.  
  3737.  
  3738. ΓòÉΓòÉΓòÉ 10.4. Sample Notification Flow ΓòÉΓòÉΓòÉ
  3739.  
  3740. Calling the setStreet member function in the IAddress class starts a flow of 
  3741. control that results in the calling of the streetChangedAction in the 
  3742. IAddressTest class. Follow this flow starting with the setStreet member 
  3743. function in IAddress: 
  3744.  
  3745.   IAddress& IAddress::setStreet (const IString& aStreet)
  3746.  {
  3747.   if (iStreet != aStreet)
  3748.   {
  3749.    iStreet = aStreet;
  3750.    IString eventData(iStreet);
  3751.    notifyObservers(INotificationEvent(streetId, *this,
  3752.            true, (void*)&eventData));
  3753.   } /* endif */
  3754.   return *this;
  3755.  }
  3756.  
  3757. Because a street connection observer has been added to the address object and 
  3758. event notification has been enabled, running notifyObservers in setStreet 
  3759. causes dispatchNotificationEvent in StreetConnection to run, as follows: 
  3760.  
  3761.   IObserver &dispatchNotificationEvent (const INotificationEvent& anEvent)
  3762.  {
  3763.   if (IAddress::streetId == anEvent.notificationId())
  3764.   {
  3765.    try {iTestTarget->streetChangedAction();}
  3766.    catch (IException& exc) {}
  3767.   }
  3768.   return *this;
  3769.  } ;
  3770.  
  3771. When notifyObservers is called, all observers are called. Each observer must 
  3772. determine if this notification event should be processed. So the 
  3773. dispatchNotificationEvent in StreetConnection compares the notification ID, 
  3774. determines that this is a streetId notification event, and calls 
  3775. streetChangedAction in IAddressTest: 
  3776.  
  3777.   class IAddressTest : public IStandardNotifier
  3778.  {
  3779.   streetChangedAction()
  3780.   { printf("The Street Attribute has been changed\n"); }
  3781.  } ;
  3782.  
  3783. This completes the flow from the street notification (streetId) to the target 
  3784. action, streetChangedAction. 
  3785.  
  3786.  
  3787. ΓòÉΓòÉΓòÉ 11. IBM Open Class Library Conventions ΓòÉΓòÉΓòÉ
  3788.  
  3789.      Overview 
  3790.  
  3791.      File extensions 
  3792.  
  3793.      File names 
  3794.  
  3795.      Class names, function names, and data member names 
  3796.  
  3797.      Enumerations 
  3798.  
  3799.      Function return types 
  3800.  
  3801.      Function arguments 
  3802.  
  3803.      Feature names 
  3804.  
  3805.      Notification IDs 
  3806.  
  3807.      Other standards 
  3808.  
  3809.  Personal notes: 
  3810.  
  3811.  
  3812. ΓòÉΓòÉΓòÉ 11.1. Overview ΓòÉΓòÉΓòÉ
  3813.  
  3814. This appendix introduces you to the conventions used in the IBM Open Class 
  3815. Library, as follows: 
  3816.  
  3817.      File extensions 
  3818.      File names 
  3819.      Class, function, and data member names 
  3820.      Enumerations 
  3821.      Function return types 
  3822.      Function arguments 
  3823.      Feature names (attributes, actions, events), for Visual Builder only 
  3824.      Notification IDs 
  3825.      Other standards 
  3826.  
  3827.  
  3828. ΓòÉΓòÉΓòÉ 11.2. File Extensions ΓòÉΓòÉΓòÉ
  3829.  
  3830.  .c      C code file or C++ template code file. 
  3831.  
  3832.  .cpp    C++ code file. 
  3833.  
  3834.  .def    Import module definition file. 
  3835.  
  3836.  .dll    Dynamic link library file. 
  3837.  
  3838.  .h      C header file or C++ template header file. 
  3839.  
  3840.  .hpp    C++ header file. 
  3841.  
  3842.  .inl    C++ inline functions file. 
  3843.  
  3844.  .lib    Library file. 
  3845.  
  3846.  .mak    Make file. 
  3847.  
  3848.  .rc     Resource file. 
  3849.  
  3850.  .rsp    Import linker automatic response file. 
  3851.  
  3852.  .vbb    Visual Builder class (binary) file. 
  3853.  
  3854.  .vbe    Part information (external) file. 
  3855.  
  3856.  
  3857. ΓòÉΓòÉΓòÉ 11.3. File Names ΓòÉΓòÉΓòÉ
  3858.  
  3859. All files provided by the IBM Open Class Library begin with the letter "i," 
  3860. such as iapp.hpp. File names have a maximum of eight characters, including the 
  3861. "i." Following is a list of the file name extensions that are used: 
  3862.  
  3863.  ixxxxxxx.hpp    IBM Open Class Library header file. 
  3864.  
  3865.  ixxxxxxx.inl    IBM Open Class Library inline functions. 
  3866.  
  3867.  The file name generally indicates the class or classes it contains. For 
  3868.  example, the iapp.hpp file contains the IApplication and ICurrentApplication 
  3869.  classes. 
  3870.  
  3871.  
  3872. ΓòÉΓòÉΓòÉ 11.4. Class Names, Function Names, and Data Member Names ΓòÉΓòÉΓòÉ
  3873.  
  3874. Class names are mixed case, with the first letter of each word capitalized, as 
  3875. in ICurrentApplication. All class names in the global name space begin with the 
  3876. letter "I." 
  3877.  
  3878. Function names and data member names are also mixed case, except the first 
  3879. letter is always lowercase, as in the autoSize data member. Here are some more 
  3880. general rules about class and function names: 
  3881.  
  3882.      Acronyms are uppercase, as in IDBCSBuffer (DBCS is the acronym for 
  3883.       double-byte character set). Other acronyms are GUI (graphical user 
  3884.       interface) and DDE (dynamic data exchange). 
  3885.  
  3886.      Abbreviations are mixed case, as IPresSpaceHandle, which is the class for 
  3887.       presentation space handles. 
  3888.  
  3889.      Functions that query begin with a prefix that implies a query is being 
  3890.       conducted, such as is or has. The IDragItem class, for example, has the 
  3891.       isCopyable function, which queries whether an object can be copied. 
  3892.  
  3893.      Functions that render an object as a different type begin with the as 
  3894.       prefix, as in asUnsignedLong, which renders an object as an unsigned 
  3895.       long. 
  3896.  
  3897.      Functions that provide enabling or disabling capabilities begin with the 
  3898.       enable or disable prefix, respectively. The IEntryField class, for 
  3899.       example, provides the enableAutoScroll function, which enables automatic 
  3900.       scrolling. 
  3901.  
  3902.      Functions that set something begin with the set prefix. The 
  3903.       setDefaultStyle function, to follow the preceding example, is used to set 
  3904.       the default style for a class. 
  3905.  
  3906.      Functions that get something, however, have no get prefix. For example, 
  3907.       many classes use the defaultStyle function to get the default style for 
  3908.       that class. 
  3909.  
  3910.      Functions that act on objects are verbs, such as copy and move. 
  3911.  
  3912.      Function names and arguments are virtually self-explanatory. The 
  3913.       following example would move the IWindow object aWindow to the position 
  3914.       specified by the IPoint object aPoint. 
  3915.  
  3916.        aWindow.moveTo( aPoint ); 
  3917.  
  3918.      Many functions that toggle the state of an object are provided with an 
  3919.       optional Boolean argument that you can use to perform the opposite action 
  3920.       of the function. This allows the result of a prior query function to be 
  3921.       used as an input argument, such as the following: 
  3922.  
  3923.               Boolean initialVisibility = isVisible();
  3924.              hide();
  3925.              /* Do some hidden work */
  3926.              show(initialVisibility);
  3927.  
  3928.  
  3929. ΓòÉΓòÉΓòÉ 11.5. Enumerations ΓòÉΓòÉΓòÉ
  3930.  
  3931. The conventions for enumeration types and enumerators follow: 
  3932.  
  3933.      The first character of each enumeration name is uppercase, such as 
  3934.       Severity. If two words are joined, each begins with an uppercase letter, 
  3935.       such as ExceptionType. 
  3936.  
  3937.      Enumerators use the same naming conventions as functions; they begin with 
  3938.       lowercase letters, but if two words are joined, the second begins with an 
  3939.       uppercase letter, such as accessError. 
  3940.  
  3941.  
  3942. ΓòÉΓòÉΓòÉ 11.6. Function Return Types ΓòÉΓòÉΓòÉ
  3943.  
  3944. The return types for the various types of functions follow: 
  3945.  
  3946.      A testing function typically returns a Boolean (true or false), as 
  3947.       follows: 
  3948.  
  3949.        Boolean isValid() const 
  3950.  
  3951.      Other accessor functions typically return an object, as follows: 
  3952.  
  3953.               ISize size() const;         //Returns an object
  3954.              IWindow* owner();          //Returns a pointer to an object
  3955.  
  3956.      Functions that act on an object return an object reference, as follows: 
  3957.  
  3958.        IWindow& hide(); 
  3959.  
  3960.       This enables the chaining of function calls, as follows: 
  3961.  
  3962.        aWindow.moveTo(IPoint(10,10)).show(); 
  3963.  
  3964.  
  3965. ΓòÉΓòÉΓòÉ 11.7. Function Arguments ΓòÉΓòÉΓòÉ
  3966.  
  3967. Function arguments are usually passed using the following conventions: 
  3968.  
  3969.      Built-in types (ints, doubles) and enumerations are passed in by value. 
  3970.  
  3971.      Objects are passed by reference (a const reference if the argument is not 
  3972.       modified by the function). 
  3973.  
  3974.      Optional objects are passed by pointer. For example, a 0 pointer can be 
  3975.       passed. 
  3976.  
  3977.      IWindow objects are usually passed by pointer. 
  3978.  
  3979.      IContainerObjects are usually passed by pointer. 
  3980.  
  3981.      Strings are passed as const char *. This enables you to pass either an 
  3982.       IString or a literal character array. 
  3983.  
  3984.  
  3985. ΓòÉΓòÉΓòÉ 11.8. Feature Names ΓòÉΓòÉΓòÉ
  3986.  
  3987. Give actions, attributes, and events meaningful names, and start them with a 
  3988. lowercase letter to avoid confusion with part or class names. If you follow 
  3989. these simple conventions in choosing your feature names, it is easier for users 
  3990. of your parts to recognize the function of a feature: 
  3991.  
  3992.      Name actions with phrases that indicate activities to be performed, 
  3993.       together with an optional receiver of that activity. Examples of feature 
  3994.       names for actions are startTimer, openWindow, hide, and setFocus. 
  3995.  
  3996.      Name attributes with phrases that indicate the physical property they 
  3997.       represent. Examples of feature names for attributes are height, 
  3998.       buttonLabel, and contents. 
  3999.  
  4000.      Name events with phrases that indicate activities that either have 
  4001.       happened or are about to happen. Examples of feature names for events are 
  4002.       clicked, aboutToCloseWindow, and timeExpired. 
  4003.  
  4004.  Note:  Do not use feature names that start with avl or vb. These are reserved 
  4005.         for use by Visual Builder. 
  4006.  
  4007.  
  4008. ΓòÉΓòÉΓòÉ 11.9. Notification IDs ΓòÉΓòÉΓòÉ
  4009.  
  4010. Notification IDs are defined in the header files as public static data members. 
  4011. The notification ID name is the attribute or event name followed by "Id." The 
  4012. following is an example of the notification ID for the buttonClick event in the 
  4013. IButton class: 
  4014.  
  4015.   INotificationId const
  4016.   buttonClickId;
  4017.  
  4018. The notification ID is implemented in the code files as strings with the class 
  4019. name followed by the attribute or event name. An example from IButton code file 
  4020. follows: 
  4021.  
  4022.  const INotificationId IButton::buttonClickId="IButton::buttonClick"; 
  4023.  
  4024.  
  4025. ΓòÉΓòÉΓòÉ 11.10. Other Standards ΓòÉΓòÉΓòÉ
  4026.  
  4027. The following are additional standards followed by the IBM Open Class Library: 
  4028.  
  4029.      Header files are wrapped to ensure that files are not included more than 
  4030.       once. An example from the ibutton.hpp file follows: 
  4031.  
  4032.               #ifndef _IBUTTON_
  4033.               #define _IBUTTON_
  4034.  
  4035.      All functions that can be inlined are placed in separate .inl files with 
  4036.       a user option (I_NO_INLINES) to determine whether they should be inlined 
  4037.       into the application code. An example from the inotifev.hpp file follows: 
  4038.  
  4039.               #ifndef I_NO_INLINES
  4040.               #include <inotifev.inl>
  4041.              #endif
  4042.  
  4043.       If you do not want to inline these functions, then define I_NO_INLINES. 
  4044.  
  4045.      isynonym.hpp contains the names of the types and values that are in the 
  4046.       global name space but do not begin with the letter "I." If you have 
  4047.       collisions with other libraries, you can change the names in 
  4048.       isynonym.hpp. 
  4049.  
  4050.  
  4051. ΓòÉΓòÉΓòÉ 12. Code Listings ΓòÉΓòÉΓòÉ
  4052.  
  4053.      Overview 
  4054.  
  4055.      INotifier header code 
  4056.  
  4057.      IStandardNotifier header code 
  4058.  
  4059.      IObserver header code 
  4060.  
  4061.      INotificationEvent header code 
  4062.  
  4063.      IButton header code 
  4064.  
  4065.      Sample IAddress Part 
  4066.  
  4067.         -  Header code 
  4068.  
  4069.         -  Source code 
  4070.  
  4071.         -  Test code 
  4072.  
  4073.  Personal notes: 
  4074.  
  4075.  
  4076. ΓòÉΓòÉΓòÉ 12.1. Overview ΓòÉΓòÉΓòÉ
  4077.  
  4078. This chapter presents sample code listings for the following IBM Open Class 
  4079. Library header files: 
  4080.  
  4081.      INotifier 
  4082.      IStandardNotifier 
  4083.      IObserver 
  4084.      INotificationEvent 
  4085.      IButton 
  4086.  
  4087.  This chapter also presents the following for a sample IAddress part: 
  4088.  
  4089.      Header code (.hpp) 
  4090.      Source code (.cpp) 
  4091.      Test code 
  4092.  
  4093.  There might be differences between these printed samples and the sample code 
  4094.  shipped with Visual Builder. Where differences exist, use the shipped sample 
  4095.  code. 
  4096.  
  4097.  
  4098. ΓòÉΓòÉΓòÉ 12.2. INotifier Header Code ΓòÉΓòÉΓòÉ
  4099.  
  4100. This abstract class contains the notification protocol. 
  4101.  
  4102. #ifndef _INOTIFY_
  4103. #define _INOTIFY_
  4104. /*******************************************************************************
  4105. * FILE NAME: inotify.hpp                            *
  4106. *                                        *
  4107. * DESCRIPTION:                                 *
  4108. *  Declaration of the class:                          *
  4109. *   INotifier - Abstract Notifier protocol.                  *
  4110. *                                        *
  4111. * COPYRIGHT:                                  *
  4112. *  Licensed Materials - Property of IBM                    *
  4113. *  (C) Copyright IBM Corporation 1992, 1993, 1995               *
  4114. *  All Rights Reserved                             *
  4115. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  4116. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  4117. *******************************************************************************/
  4118. #ifndef _IVBASE_
  4119.  #include <ivbase.hpp>
  4120. #endif
  4121. /*----------------------------------------------------------------------------*/
  4122. /* Align classes on a four-byte boundary                    */
  4123. /*----------------------------------------------------------------------------*/
  4124. #pragma pack(4)
  4125.  
  4126. // Forward declarations
  4127. class IObserver;
  4128. class IObserverList;
  4129. class INotificationEvent;
  4130. class IEventData;
  4131.  
  4132. typedef const char* const
  4133.  INotificationId;
  4134.  
  4135. class INotifier : public IVBase {
  4136. typedef IVBase
  4137.  Inherited;
  4138.  
  4139. INotifier public 
  4140.  
  4141. public:
  4142.  
  4143. /*------------------------- Constructors/Destructor ----------------------------
  4144. | This class is an abstract base class, so objects cannot be constructed.    |
  4145. |                                        |
  4146. ------------------------------------------------------------------------------*/
  4147.  
  4148. /*---------------------------- Activation --------------------------------------
  4149. | The following functions affect the ability of an INotifier to notify     |
  4150. | of events of interest:                            |
  4151. |  enableNotification  - Causes the notifier to send notifications to any   |
  4152. |             observer objects added.                |
  4153. |  disableNotification - Causes the notifier to stop sending notifications to |
  4154. |             all observer objects added.              |
  4155. |  isEnabledForNotification - Returns true if a notifier is sending      |
  4156. |             notifications to its observers.            |
  4157. ------------------------------------------------------------------------------*/
  4158. virtual INotifier
  4159.  &enableNotification     ( Boolean enabled = true ) = 0,
  4160.  &disableNotification    ( ) = 0;
  4161.  
  4162. virtual Boolean
  4163.  isEnabledForNotification  ( ) const = 0;
  4164.  
  4165. /*---------------------------- Observer Notification ---------------------------
  4166. | The following function is used to notify observers of a change in a notifier         notification ID, and optional data provided by the  |
  4167. |             specific instance of the notifier.          |
  4168. ------------------------------------------------------------------------------*/
  4169. virtual INotifier
  4170.  ¬ifyObservers    ( const INotificationEvent& anEvent) = 0;
  4171.  
  4172. INotifier protected and private 
  4173.  
  4174. protected:
  4175. /*---------------------------- Observer Addition/Removal -----------------------
  4176. | The following functions add and remove observers from the notifier's     |
  4177. | collection:                                  |
  4178. |  addObserver     - Adds an observer to the notifier's collection.    |
  4179. |  removeObserver    - Removes an observer from the notifier's collection.  |
  4180. |  removeAllObservers  - Removes all observers from the notifier's collection.|
  4181. ------------------------------------------------------------------------------*/
  4182. virtual INotifier
  4183.  &addObserver      ( IObserver&     anObserver,
  4184.              const IEventData& userData) = 0,
  4185.  &removeObserver     ( const IObserver&  anObserver) = 0,
  4186.  &removeAllObservers   ( ) = 0;
  4187.  
  4188. /*---------------------------- ObserverList ------------------------------------
  4189. |  observerList      Returns the collection of IObservers.         |
  4190. ------------------------------------------------------------------------------*/
  4191.  
  4192. virtual IObserverList
  4193.  &observerList      ( ) const = 0;
  4194.  
  4195. /*---------------------------- Observer Notification ---------------------------
  4196. | The following function is used to notify observers of a change in a notifier         notification ID, and optional data provided by the  |
  4197. |             specific instance of the notifier.          |
  4198. ------------------------------------------------------------------------------*/
  4199. virtual INotifier
  4200.  ¬ifyObservers (const INotificationId& nId) = 0;
  4201.  
  4202. private:
  4203.  
  4204. friend class IObserver;
  4205. };
  4206.  
  4207.  
  4208. /*------------------------------------------------------------------------------
  4209. |  Resume compiler default packing                       |
  4210. ------------------------------------------------------------------------------*/
  4211. #pragma pack()
  4212.  
  4213. /*----------------------------- Inline Functions -----------------------------*/
  4214.  
  4215. #endif /* _INOTIFY_ */
  4216.  
  4217.  
  4218. ΓòÉΓòÉΓòÉ 12.3. IStandardNotifier Header Code ΓòÉΓòÉΓòÉ
  4219.  
  4220. The IStandardNotifier class implements the notification (INotifier) protocol. 
  4221. Nonvisual parts are derived from this class. 
  4222.  
  4223. #ifndef _ISTDNTFY_
  4224. #define _ISTDNTFY_
  4225. /*******************************************************************************
  4226. * FILE NAME: istdntfy.hpp                            *
  4227. *                                        *
  4228. * DESCRIPTION:                                 *
  4229. *  Declaration of the class:                          *
  4230. *   IStandardNotifier - Concrete implementation of the INotifier protocol.  *
  4231. *                                        *
  4232. * COPYRIGHT:                                  *
  4233. *  Licensed Materials - Property of IBM                    *
  4234. *  (C) Copyright IBM Corporation 1992, 1993, 1995               *
  4235. *  All Rights Reserved                             *
  4236. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  4237. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  4238. *******************************************************************************/
  4239. #ifndef _INOTIFY_
  4240.  #include <inotify.hpp>
  4241. #endif
  4242. #ifndef _IEVTDATA_
  4243.  #include <ievtdata.hpp>
  4244. #endif
  4245. /*----------------------------------------------------------------------------*/
  4246. /* Align classes on a four-byte boundary                    */
  4247. /*----------------------------------------------------------------------------*/
  4248. #pragma pack(4)
  4249.  
  4250. class IObserverList;
  4251. class IObserver;
  4252. class INotificationEvent;
  4253.  
  4254. class IStandardNotifier : public INotifier {
  4255. typedef IStandardNotifier
  4256.  Inherited;
  4257. /*******************************************************************************
  4258. * An IStandardNotifier provides a concrete implementation of the INotifier   *
  4259. * protocol. If you want to create classes that provide notification,      *
  4260. * you can do so by inheriting from IStandardNotifier.  Alternatively, you can  *
  4261. * inherit from INotifier directly and provide the notifier protocol yourself.  *
  4262. *******************************************************************************/
  4263.  
  4264. IStandardNotifier public 
  4265.  
  4266. public:
  4267.  
  4268. /*------------------------- Constructors/Destructor ----------------------------
  4269. |  The only constructor for an IStandardNotifier object is the default     |
  4270. |  constructor that accepts no parameters.                   |
  4271. ------------------------------------------------------------------------------*/
  4272.  IStandardNotifier ( );
  4273.  IStandardNotifier (const IStandardNotifier& partCopy);
  4274.  IStandardNotifier& operator= (const IStandardNotifier& aPart);
  4275.  
  4276. virtual
  4277.  ~IStandardNotifier ( );
  4278.  
  4279. /*---------------------------- Activation --------------------------------------
  4280. | The following functions affect the ability of a part to notify observers   |
  4281. | of events of interest:                            |
  4282. |  enableNotification  - Causes the part to send notifications to any     |
  4283. |             observer objects added.                |
  4284. |  disableNotification - Causes the part to stop sending notifications to   |
  4285. |             all observer objects added.              |
  4286. ------------------------------------------------------------------------------*/
  4287. virtual IStandardNotifier
  4288.  &enableNotification    ( Boolean enable = true),
  4289.  &disableNotification    ( );
  4290.  
  4291. virtual Boolean
  4292.  isEnabledForNotification ( ) const;
  4293.  
  4294. /*---------------------------- Observer Notification ---------------------------
  4295. | The following function is used to notify observers of a change in a notifier& anEvent);
  4296.  
  4297. /*----------------------- Notification Event Descriptions ----------------------
  4298. | These INotificationId strings are used for all notifications that       |
  4299. | IStandardNotifier provides to its observers:                 |
  4300. |  deleteId - Notification identifier provided to observers when the part   |
  4301. |        object is deleted.                        |
  4302. ------------------------------------------------------------------------------*/
  4303. static INotificationId const
  4304.  deleteId;
  4305.  
  4306. IStandardNotifier protected and private 
  4307.  
  4308. protected:
  4309. /*---------------------------- Observer Addition/Removal -----------------------
  4310. | The following functions add and remove observers from the notifiers      |
  4311. | collection:                                  |
  4312. |  addObserver     - Adds an observer to the part's collection.      |
  4313. |  removeObserver    - Removes an observer from the part's collection.    |
  4314. |  removeAllObservers  - Removes all observers from the part's collection.   |
  4315. ------------------------------------------------------------------------------*/
  4316. virtual IStandardNotifier
  4317.  &addObserver      ( IObserver&     anObserver,
  4318.              const IEventData& userData = IEventData(0)),
  4319.  &removeObserver     ( const IObserver& anObserver),
  4320.  &removeAllObservers   ( );
  4321.  
  4322. /*---------------------------- ObserverList ------------------------------------
  4323. |  observerList     - Returns the collection of IObservers         |
  4324. ------------------------------------------------------------------------------*/
  4325. IObserverList
  4326.  &observerList      ( ) const;
  4327.  
  4328. /*---------------------------- Observer Notification ---------------------------
  4329. | The following function is used to notify observers of a change in a notifier--------------------------------------*/
  4330. #pragma pack()
  4331.  
  4332.  
  4333. #endif /* _ISTDNTFY_ */
  4334.  
  4335.  
  4336. ΓòÉΓòÉΓòÉ 12.4. IObserver Header Code ΓòÉΓòÉΓòÉ
  4337.  
  4338. IObserver is an abstract class that can be subclassed and added to notifiers to 
  4339. receive event notification. 
  4340.  
  4341. #ifndef _IOBSERVR_
  4342. #define _IOBSERVR_
  4343. /*******************************************************************************
  4344. * FILE NAME: iobservr.hpp                            *
  4345. *                                        *
  4346. * DESCRIPTION:                                 *
  4347. *  Declaration of the class:                          *
  4348. *   IObserver - Abstract Observer protocol.                  *
  4349. *                                        *
  4350. * COPYRIGHT:                                  *
  4351. *  Licensed Materials - Property of IBM                    *
  4352. *  (C) Copyright IBM Corporation 1992, 1993, 1995               *
  4353. *  All Rights Reserved                             *
  4354. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  4355. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  4356. *                                        *
  4357. *******************************************************************************/
  4358.  
  4359. #ifndef _IVBASE_
  4360.  #include <ivbase.hpp>
  4361. #endif
  4362.  
  4363. #ifndef _IEVTDATA_
  4364.  #include <ievtdata.hpp>
  4365. #endif
  4366.  
  4367. /*----------------------------------------------------------------------------*/
  4368. /* Align classes on a four-byte boundary                    */
  4369. /*----------------------------------------------------------------------------*/
  4370. #pragma pack(4)
  4371.  
  4372. // Forward declarations
  4373. class IObserver;
  4374. class INotificationEvent;
  4375. class INotifier;
  4376.  
  4377. class IObserver : public IVBase {
  4378. typedef IVBase
  4379.  Inherited;
  4380.  
  4381. IObserver public 
  4382.  
  4383. public:
  4384. /*------------------------- Constructors/Destructor ----------------------------
  4385. | This class is an abstract class, so objects cannot be constructed.      |
  4386. |                                        |
  4387. ------------------------------------------------------------------------------*/
  4388.  ~IObserver ();
  4389.  
  4390. /*---------------------------- Notifier Attachment -----------------------------
  4391. | These functions permit attaching and detaching the observer object to/from  |
  4392. | a given notifier                               |
  4393. |  handleNotificationsFor    - Attaches the observer to the argument    |
  4394. |                  INotifier object.              |
  4395. |  stopHandlingNotificationsFor - Detaches the observer from the argument   |
  4396. |                  INotifier object.              |
  4397. ------------------------------------------------------------------------------*/
  4398. virtual IObserver
  4399.  &handleNotificationsFor    ( INotifier&     aNotifier,
  4400.                  const IEventData& userData = IEventData()),
  4401.  &stopHandlingNotificationsFor ( INotifier&     aNotifier );
  4402.  
  4403. IObserver protected and private 
  4404.  
  4405. protected:
  4406. /*---------------------------- Overrides  --------------------------------------
  4407. | The following function must be overriden in a subclass.            |
  4408. |  dispatchNotificationEvent  - An object of a class that inherits from    |
  4409. |            INotifier calls this function to notify an observer   |
  4410. |            of a change in itself.  The notification event      |
  4411. |            also includes notification-specific information.     |
  4412. ------------------------------------------------------------------------------*/
  4413. virtual IObserver
  4414.  &dispatchNotificationEvent  ( const INotificationEvent&)=0;
  4415.  
  4416. private:
  4417.  
  4418. friend class INotifier;
  4419. friend class IObserverList;
  4420. };
  4421.  
  4422.  
  4423. /*----------------------------------------------------------------------------*/
  4424. /* Resume compiler default packing                       */
  4425. /*----------------------------------------------------------------------------*/
  4426. #pragma pack()
  4427.  
  4428. /*----------------------------- Inline Functions -----------------------------*/
  4429.  
  4430. #endif /* _IOBSERVR_ */
  4431.  
  4432.  
  4433. ΓòÉΓòÉΓòÉ 12.5. INotificationEvent Header Code ΓòÉΓòÉΓòÉ
  4434.  
  4435. The class INotificationEvent provides the details of a notification event to an 
  4436. observer object as shown in the following example: 
  4437.  
  4438. #ifndef _INOTIFEV_
  4439. #define _INOTIFEV_
  4440. /*******************************************************************************
  4441. * FILE NAME: inotifev.hpp                            *
  4442. *                                        *
  4443. * DESCRIPTION:                                 *
  4444. *  Declaration of the class:                          *
  4445. *   INotificationEvent - The details of a notification to an IObserver    *
  4446. *    object.                                 *
  4447. *                                        *
  4448. * COPYRIGHT:                                  *
  4449. *  Licensed Materials - Property of IBM                    *
  4450. *  (C) Copyright IBM Corporation 1992, 1993, 1995               *
  4451. *  All Rights Reserved                             *
  4452. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  4453. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  4454. *******************************************************************************/
  4455. #ifndef _INOTIFY_
  4456.  #include <inotify.hpp>
  4457. #endif
  4458.  
  4459. #ifndef _IEVTDATA_
  4460.  #include <ievtdata.hpp>
  4461. #endif
  4462. /*----------------------------------------------------------------------------*/
  4463. /* Align classes on a four-byte boundary                    */
  4464. /*----------------------------------------------------------------------------*/
  4465. #pragma pack(4)
  4466.  
  4467. class INotificationEvent : public IBase {
  4468. typedef IBase
  4469.  Inherited;
  4470. /*******************************************************************************
  4471. *  The class INotificationEvent provides the details of a notification event  *
  4472. *  to an observer object.  Included in the event is the notification ID and   *
  4473. *  the notifier object.  Optionally included in the event is notifier-specific *
  4474. *  data (see the notifier for details) and observer-specific data provided   *
  4475. *  to the notifier when the observer was added to the notifier.         *
  4476. *******************************************************************************/
  4477.  
  4478. INotificationEvent public 
  4479.  
  4480. public:
  4481.  
  4482. enum EventType { attribute=1, event};
  4483.  
  4484. /*------------------------- Constructors/Destructor ----------------------------
  4485. ------------------------------------------------------------------------------*/
  4486.  INotificationEvent  ( const INotificationId&  anId,
  4487.             INotifier&        aNotifier,
  4488.             Boolean          notifierAttrChanged=true,
  4489.             const IEventData&     eventData=IEventData(),
  4490.             const IEventData&     observerData=IEventData());
  4491.  
  4492.  INotificationEvent  (const INotificationEvent& anEvent);
  4493.  
  4494. /*---------------------------- Accessors ---------------------------------------
  4495. ------------------------------------------------------------------------------*/
  4496. INotificationEvent
  4497.  &setNotifierAttrChanged  ( Boolean         changed=true),
  4498.  &setEventData       ( const IEventData&    eventData ),
  4499.  &setObserverData     ( const IEventData&    observerData);
  4500.  
  4501. INotificationId
  4502.  notificationId    ( ) const;
  4503. INotifier
  4504.  ¬ifier       ( ) const;
  4505. Boolean
  4506.  pnotifierAttrChanged  ( ) const;
  4507. IEventData
  4508.  eventData       ( ) const,
  4509.  observerData     ( ) const;
  4510. //
  4511.  
  4512. INotificationEvent protected and private 
  4513.  
  4514. private:
  4515.  
  4516. INotificationId
  4517.  evtId;
  4518. INotifier
  4519.  *evtNotifier;
  4520. Boolean
  4521.  attrChanged;
  4522. IEventData
  4523.  evtData,
  4524.  obsData;
  4525. };
  4526.  
  4527. /*----------------------------------------------------------------------------*/
  4528. /* Resume compiler default packing                       */
  4529. /*----------------------------------------------------------------------------*/
  4530. #pragma pack()
  4531.  
  4532. /*----------------------------- Inline Functions -----------------------------*/
  4533. #ifndef I_NO_INLINES
  4534.  #include <inotifev.inl>
  4535. #endif
  4536. #endif /* _INOTIFEV_ */
  4537.  
  4538.  
  4539. ΓòÉΓòÉΓòÉ 12.6. IButton Header Code ΓòÉΓòÉΓòÉ
  4540.  
  4541. IButton is an abstract class for button controls. 
  4542.  
  4543. #ifndef _IBUTTON_
  4544.  #define _IBUTTON_
  4545. /*******************************************************************************
  4546. * FILE NAME: ibutton.hpp                            *
  4547. *                                        *
  4548. * DESCRIPTION:                                 *
  4549. *  Declaration of the class:                          *
  4550. *   IButton - The IButton class is the abstract base class for button controls.
  4551. *                                        *
  4552. * COPYRIGHT:                                  *
  4553. *  Licensed Materials - Property of IBM                    *
  4554. *  (C) Copyright IBM Corporation 1992, 1993, 1995               *
  4555. *  All Rights Reserved                             *
  4556. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  4557. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  4558. *******************************************************************************/
  4559. #ifndef _ITEXTCTL_
  4560.  #include <itextctl.hpp>
  4561. #endif
  4562.  
  4563. #ifndef _IBUTTON1_
  4564.  #include <ibutton1.hpp>
  4565. #endif
  4566.  
  4567. /*----------------------------------------------------------------------------*/
  4568. /* Align classes on a four-byte boundary                    */
  4569. /*----------------------------------------------------------------------------*/
  4570. #pragma pack(4)
  4571.  
  4572. // Forward declarations for other classes:
  4573. class IColor;
  4574.  
  4575. class IButton : public ITextControl {
  4576. typedef ITextControl
  4577.  Inherited;
  4578. /*******************************************************************************
  4579. * The IButton class is the abstract base class for button controls.  This    *
  4580. * class contains the common functions for all button controls.  Actual button  *
  4581. * controls are created by deriving from this base class.            *
  4582. *******************************************************************************/
  4583.  
  4584. public:
  4585. /*----------------------- Style -----------------------------------------------
  4586.  The following functions provide a means to set and query button styles:
  4587.  
  4588.   Style - Nested class that provides static members that define the set of
  4589.       valid button styles.  These styles can be used in conjunction
  4590.       with the styles defined by the nested classes IWindow::Style and
  4591.       IControl::Style.  For example, you could define an instance of
  4592.       the IButton::Style class and initialize it as follows:
  4593.         IButton::Style
  4594.          style = IControl::tabStop;
  4595.       An object of this type is provided when the button is created.  A
  4596.       customizable default is used if no styles are specified.  Once
  4597.       the object is constructed, you can use IButton, IWindow, and IControl
  4598.       member functions to set or query the object's style.
  4599.  
  4600.       The declaration of the IButton::Style nested class is generated
  4601.       by the INESTEDBITFLAGCLASSDEF2 macro.
  4602.  
  4603.   The valid button styles are:
  4604.    noPointerFocus - Buttons with this style do not set the focus to
  4605.            themselves when the user clicks on them using the mouse.
  4606.            This enables the cursor to stay on a control for which
  4607.            information is required, rather than moving to the
  4608.            button.  This has no effect on keyboard interaction.
  4609. -----------------------------------------------------------------------------*/
  4610. INESTEDBITFLAGCLASSDEF2(Style, IButton, IWindow, IControl);
  4611.                 // style class definition
  4612. static const Style
  4613.  noPointerFocus;
  4614.  
  4615. /*-------------------------- Constructor/Destructor ----------------------------
  4616. | Instances of this class cannot be created.                  |
  4617. ------------------------------------------------------------------------------*/
  4618.  IButton ( );
  4619. virtual
  4620.  ~IButton ( );
  4621.  
  4622. /*------------------------------- Mouse Focus ----------------------------------
  4623. | The following functions are used to set and query whether the button can   |
  4624. | receive the input focus when clicked with the mouse pointer:         |
  4625. |  enableMouseClickFocus  - Enables the button to receive the focus when the  |
  4626. |               user clicks on the button using the mouse.     |
  4627. |  disableMouseClickFocus - Prevents the button from receiving the focus    |
  4628. |               when the user clicks on the button using the    |
  4629. |               mouse.                       |
  4630. |  allowsMouseClickFocus  - Queries whether the button can receive the focus. |
  4631. ------------------------------------------------------------------------------*/
  4632. #ifndef IC_MOTIF_FLAGNOP
  4633. IButton
  4634.  &enableMouseClickFocus  ( Boolean turnOn = true ),
  4635.  &disableMouseClickFocus ( );
  4636. Boolean
  4637.  allowsMouseClickFocus  ( ) const;
  4638. #endif  // end of IC_MOTIF_FLAGNOP
  4639.  
  4640. /*--------------------------- Highlighted State --------------------------------
  4641. | These operations test and set a button's highlight state.  A highlighted   |
  4642. | button has the same appearance as if the mouse selection button (mouse    |
  4643. | button 1) was pressed while the mouse pointer was over the button control:  |
  4644. |  isHighlighted  -  Returns true if the button's highlight state is set.   |
  4645. |  highlight    -  Sets the button's highlight state.            |
  4646. |  unhighlight   -  Turns off the button's highlight state.          |
  4647. ------------------------------------------------------------------------------*/
  4648. #ifndef IC_MOTIF_FLAGNOP
  4649. Boolean
  4650.  isHighlighted ( ) const;
  4651.  
  4652. virtual IButton
  4653.  &highlight   ( ),
  4654.  &unhighlight  ( );
  4655. #endif  // end of IC_MOTIF_FLAGNOP
  4656.  
  4657. /*----------------------------- Click the Button -------------------------------
  4658. |  click  - Simulates the user clicking on the button control using the    |
  4659. |       mouse selection button.                      |
  4660. ------------------------------------------------------------------------------*/
  4661. virtual IButton
  4662.  &click     ( );
  4663.  
  4664. #ifdef IC_PM
  4665. //#ifndef IC_MOTIF
  4666. /*----------------------------- Color Functions --------------------------------
  4667. |  foregroundColor     - Returns the foreground color value of the button  |
  4668. |               or the default if no color for the area has been  |
  4669. |               set.                        |
  4670. |  backgroundColor     - Returns the background color value of the button  |
  4671. |               or the default if no color for the area has been  |
  4672. |               set.                        |
  4673. |  disabledForegroundColor - Returns the disabled foreground color value of   |
  4674. |               the button or the default if no color for the   |
  4675. |               area has been set.                 |
  4676. |  hiliteForegroundColor  - Returns the hilite foreground color value of the  |
  4677. |               button or the default if no color for the area   |
  4678. |               has been set.                   |
  4679. |  hiliteBackgroundColor  - Returns the hilite background color value of the  |
  4680. |               button or the default if no color for the area   |
  4681. |               has been set.                   |
  4682. ------------------------------------------------------------------------------*/
  4683. virtual IColor
  4684.  foregroundColor     () const,
  4685.  backgroundColor     () const,
  4686.  disabledForegroundColor () const,
  4687.  hiliteForegroundColor  () const,
  4688.  hiliteBackgroundColor  () const;
  4689. //#endif
  4690. #endif
  4691.  
  4692. /*----------------------- Notification Event Descriptions ----------------------
  4693. | These INotificationId strings are used for all notifications that IButton   |
  4694. | provides to its observers:                          |
  4695. |  buttonClickId   - Notification identifier provided to observers when the |
  4696. |            button control is clicked by the user.         |
  4697. ------------------------------------------------------------------------------*/
  4698. // Attribute Change Notifications
  4699. static INotificationId const
  4700.  buttonClickId;
  4701.  
  4702. /*-------------------------------- Overrides -----------------------------------
  4703. | This class overrides the following inherited functions:            |
  4704. |  setText - Sets the text for the button and notifies a parent canvas to   |
  4705. |       update the layout for its children, if appropriate.        |
  4706. ------------------------------------------------------------------------------*/
  4707. virtual IButton
  4708.  &setText    ( const char* text ),
  4709.  &setText    ( const IResourceId& text );
  4710.  
  4711. protected:
  4712. private:
  4713. /*--------------------------------- Private ----------------------------------*/
  4714.  IButton    ( const IButton& );
  4715. IButton
  4716.  &operator=   ( const IButton& );
  4717.  
  4718. public:
  4719. /*--------------------- Obsolete data and Functions ----------------------------
  4720. | The following enumerations are defined:                    |
  4721. |  ColorArea - Used to replace the color for a particular region.       |
  4722. |        Values are:                           |
  4723. |         foreground      - Sets the color of the foreground text. |
  4724. |         disabledForeground  - Sets the foreground color for disabled |
  4725. |                    text.                  |
  4726. |         background      - Sets the color of the background of   |
  4727. |                    the button window.           |
  4728. |         highlightForeground - Sets the foreground color for      |
  4729. |                    highlighted text.            |
  4730. |         border        - Sets the color of the border that    |
  4731. |                    surrounds the button window.      |
  4732. |  setColor - Changes the color of the given region.              |
  4733. |  color   - Returns the color of the given region.              |
  4734. ------------------------------------------------------------------------------*/
  4735. enum ColorArea {
  4736.  foreground,
  4737.  background,
  4738.  disabledForeground,
  4739.  highlightForeground,
  4740.  border
  4741. };
  4742. IButton
  4743.  &setColor    ( ColorArea value, const IColor& color );
  4744. IColor
  4745.  color     ( ColorArea value ) const;
  4746. };  // class IButton
  4747.  
  4748. INESTEDBITFLAGCLASSFUNCS(Style, IButton);
  4749.                  // global style functions
  4750.  
  4751. /*----------------------------------------------------------------------------*/
  4752. /* Resume compiler default packing                       */
  4753. /*----------------------------------------------------------------------------*/
  4754. #pragma pack()
  4755.  
  4756. #endif  /* _IBUTTON_ */
  4757.  
  4758.  
  4759. ΓòÉΓòÉΓòÉ 12.7. Sample IAddress Part ΓòÉΓòÉΓòÉ
  4760.  
  4761. The IAddress nonvisual part contains several attributes, including street, 
  4762. city, state and zip code. 
  4763.  
  4764.  
  4765. ΓòÉΓòÉΓòÉ 12.7.1. IAddress Header Code (iadd.hpp) ΓòÉΓòÉΓòÉ
  4766.  
  4767. #ifndef _IADD_
  4768.  #define _IADD_
  4769. /*******************************************************************************
  4770. * FILE NAME: iadd.hpp                              *
  4771. *                                        *
  4772. * DESCRIPTION:                                 *
  4773. *  Declaration of the class:                          *
  4774. *   IAddress - Address Class                          *
  4775. *                                        *
  4776. * COPYRIGHT:                                  *
  4777. *  Licensed Materials - Property of IBM                    *
  4778. *  (C) Copyright IBM Corporation 1994, 1995                  *
  4779. *  All Rights Reserved                             *
  4780. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  4781. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  4782. *******************************************************************************/
  4783. #ifndef _ISTRING_
  4784.  #include <istring.hpp>
  4785. #endif
  4786. #ifndef _ISTDNTFY_
  4787.  #include <istdntfy.hpp>
  4788. #endif
  4789. /*----------------------------------------------------------------------------*/
  4790. /* Align classes on a four-byte boundary                    */
  4791. /*----------------------------------------------------------------------------*/
  4792. #pragma pack(4)
  4793.  
  4794. class IAddress : public IStandardNotifier
  4795. {
  4796. typedef IStandardNotifier
  4797.  Inherited;
  4798. public:
  4799. /*--------------------------- PUBLIC -----------------------------------------*/
  4800. /*------------------------- Constructors/Destructor ----------------------------
  4801. ------------------------------------------------------------------------------*/
  4802.  IAddress ();
  4803.  IAddress (const IAddress& partCopy);
  4804. virtual
  4805.  ~IAddress ();
  4806.  IAddress& operator= (const IAddress& aIAddress);
  4807.  
  4808. /*-------------------------------- Attributes ----------------------------------
  4809. | The following members support attributes for this class:           |
  4810. |   street           - Returns the street attribute.         |
  4811. |   city            - Returns the city attribute.          |
  4812. |   state            - Returns the state attribute.         |
  4813. |   zip             - Returns the zip attribute.          |
  4814. |   setStreet          - Sets the street attribute.          |
  4815. |   setCity           - Sets the city attribute.           |
  4816. |   setState          - Sets the state attribute.           |
  4817. |   setZip           - Sets the zip attribute.            |
  4818. ------------------------------------------------------------------------------*/
  4819. virtual IString
  4820.  street () const,
  4821.  city () const,
  4822.  state () const,
  4823.  zip () const;
  4824.  
  4825. virtual IAddress
  4826.  &setStreet (const IString& aStreet),
  4827.  &setCity (const IString& aCity),
  4828.  &setState (const IString& aState),
  4829.  &setZip (const IString& aZip);
  4830.  
  4831. /*-------------------------------- Actions -------------------------------------
  4832. | These operations or services provided by this class:             |
  4833. |  setStreetToDefault      - Sets street to a default value.        |
  4834. |  setCityToDefault       - Sets city to a default value.         |
  4835. |  setStateToDefault      - Sets state to a default value.        |
  4836. |  setZipToDefault       - Sets zip to a default value.         |
  4837. |  setToDefault         - Sets all attributes to their default values. |
  4838. ------------------------------------------------------------------------------*/
  4839. virtual IAddress
  4840.  &setStreetToDefault (),
  4841.  &setCityToDefault (),
  4842.  &setStateToDefault (),
  4843.  &setZipToDefault (),
  4844.  &setToDefault ();
  4845.  
  4846. /*----------------------- Notification Event Descriptions ----------------------
  4847. | These INotificationId strings are used for all notifications that IWindow   |
  4848. | provides to its observers:                          |
  4849. |  streetId           - Notification identifier provided to observers|
  4850. |                 when the street attribute changes.      |
  4851. |  cityId            - Notification identifier provided to observers|
  4852. |                 when the city attribute changes.       |
  4853. |  stateId           - Notification identifier provided to observers|
  4854. |                 when the state attribute changes.       |
  4855. |  zipId            - Notification identifier provided to observers|
  4856. |                 when the zip attribute changes.        |
  4857. ------------------------------------------------------------------------------*/
  4858. static INotificationId const
  4859.  streetId,
  4860.  cityId,
  4861.  stateId,
  4862.  zipId;
  4863.  
  4864. private:
  4865. /*--------------------------- PRIVATE ----------------------------------------*/
  4866.  IString iStreet;
  4867.  IString iCity;
  4868.  IString iState;
  4869.  IString iZip;
  4870. };
  4871.  
  4872. /*----------------------------------------------------------------------------*/
  4873. /* Resume compiler default packing                       */
  4874. /*----------------------------------------------------------------------------*/
  4875. #pragma pack()
  4876.  
  4877. #endif
  4878.  
  4879.  
  4880. ΓòÉΓòÉΓòÉ 12.7.2. IAddress Source Code (iadd.cpp) ΓòÉΓòÉΓòÉ
  4881.  
  4882. /*******************************************************************************
  4883. * FILE NAME: iadd.cpp                              *
  4884. *                                        *
  4885. * DESCRIPTION:                                 *
  4886. *  Class implementation of the class:                     *
  4887. *   IAddress - Address Class                          *
  4888. *                                        *
  4889. * COPYRIGHT:                                  *
  4890. *  Licensed Materials - Property of IBM                    *
  4891. *  (C) Copyright IBM Corporation 1994, 1995                  *
  4892. *  All Rights Reserved                             *
  4893. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  4894. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  4895. *******************************************************************************/
  4896.  
  4897. #ifndef _IADD_
  4898.  #include <iadd.hpp>          //IAddress class header
  4899. #endif
  4900.  
  4901. #ifndef _INOTIFEV_
  4902.  #include <inotifev.hpp>
  4903. #endif
  4904.  
  4905. const INotificationId IAddress::streetId="IAddress::street";
  4906. const INotificationId IAddress::cityId="IAddress::city";
  4907. const INotificationId IAddress::stateId="IAddress::state";
  4908. const INotificationId IAddress::zipId="IAddress::zip";
  4909.  
  4910. /*------------------------------------------------------------------------------
  4911. | IAddress::IAddress                              |
  4912. |                                        |
  4913. | Standard constructor.                             |
  4914. ------------------------------------------------------------------------------*/
  4915. IAddress::IAddress() : Inherited (),
  4916.  iStreet("101 Main Street"),
  4917.  iCity("Hometown"),
  4918.  iState("NC"),
  4919.  iZip("27511")
  4920. {
  4921. }
  4922.  
  4923. /*------------------------------------------------------------------------------
  4924. | IAddress::IAddress                              |
  4925. |                                        |
  4926. | Standard copy constructor                           |
  4927. ------------------------------------------------------------------------------*/
  4928. IAddress::IAddress (const IAddress& partCopy)
  4929.  : Inherited (partCopy),
  4930.  iStreet(partCopy.street()),
  4931.  iCity(partCopy.city()),
  4932.  iState(partCopy.state()),
  4933.  iZip(partCopy.zip())
  4934. {
  4935. }
  4936.  
  4937. /*------------------------------------------------------------------------------
  4938. | IAddress::~IAddress                              |
  4939. |                                        |
  4940. | Empty destructor here for page tuning                     |
  4941. ------------------------------------------------------------------------------*/
  4942. IAddress::~IAddress()
  4943. {
  4944. }
  4945.  
  4946. /*------------------------------------------------------------------------------
  4947. | IAddress::IAddress                              |
  4948. |                                        |
  4949. | Standard operator=                              |
  4950. ------------------------------------------------------------------------------*/
  4951. IAddress& IAddress::operator= (const IAddress& aIAddress)
  4952. {
  4953.  if (this == &aIAddress) {
  4954.   return *this;
  4955.  } /* endif */
  4956.  Inherited::operator=(aIAddress);
  4957.  setStreet(aIAddress.street());
  4958.  setCity(aIAddress.city());
  4959.  setState(aIAddress.state());
  4960.  setZip(aIAddress.zip());
  4961.  return *this;
  4962. }
  4963.  
  4964. /*------------------------------------------------------------------------------
  4965. | IAddress::street                               |
  4966. |                                        |
  4967. | Returns the street attribute                         |
  4968. ------------------------------------------------------------------------------*/
  4969. IString IAddress::street () const
  4970. {
  4971.  return iStreet;
  4972. }
  4973.  
  4974. /*------------------------------------------------------------------------------
  4975. | IAddress::setStreet                              |
  4976. |                                        |
  4977. | Sets the street attribute                           |
  4978. ------------------------------------------------------------------------------*/
  4979. IAddress& IAddress::setStreet (const IString& aStreet)
  4980. {
  4981.  if (iStreet != aStreet)
  4982.  {
  4983.   iStreet = aStreet;
  4984.   IString eventData(iStreet);
  4985.   notifyObservers(INotificationEvent(streetId, *this,
  4986.           true, (void*)&eventData));
  4987.  } /* endif */
  4988.  return *this;
  4989. }
  4990.  
  4991. /*------------------------------------------------------------------------------
  4992. | IAddress::city                                |
  4993. |                                        |
  4994. | Returns the city attribute                          |
  4995. ------------------------------------------------------------------------------*/
  4996. IString IAddress::city () const
  4997. {
  4998.  return iCity;
  4999. }
  5000.  
  5001. /*------------------------------------------------------------------------------
  5002. | IAddress::setCity                               |
  5003. |                                        |
  5004. | Sets the city attribute                            |
  5005. ------------------------------------------------------------------------------*/
  5006. IAddress& IAddress::setCity (const IString& aCity)
  5007. {
  5008.  if (iCity != aCity)
  5009.  {
  5010.   iCity = aCity;
  5011.   IString eventData(iCity);
  5012.   notifyObservers(INotificationEvent(cityId, *this,
  5013.           true, (void*)&eventData));
  5014.  } /* endif */
  5015.  return *this;
  5016. }
  5017.  
  5018. /*------------------------------------------------------------------------------
  5019. | IAddress::state                                |
  5020. |                                        |
  5021. | Returns the state attribute                          |
  5022. ------------------------------------------------------------------------------*/
  5023. IString IAddress::state () const
  5024. {
  5025.  return iState;
  5026. }
  5027.  
  5028. /*------------------------------------------------------------------------------
  5029. | IAddress::setState                              |
  5030. |                                        |
  5031. | Sets the state attribute                           |
  5032. ------------------------------------------------------------------------------*/
  5033. IAddress& IAddress::setState (const IString& aState)
  5034. {
  5035.  if (iState != aState)
  5036.  {
  5037.   iState = aState;
  5038.   IString eventData(iState);
  5039.   notifyObservers(INotificationEvent(stateId, *this,
  5040.           true, (void*)&eventData));
  5041.  } /* endif */
  5042.  return *this;
  5043. }
  5044.  
  5045. /*------------------------------------------------------------------------------
  5046. | IAddress::zip                                 |
  5047. |                                        |
  5048. | Returns the zip attribute                           |
  5049. ------------------------------------------------------------------------------*/
  5050. IString IAddress::zip () const
  5051. {
  5052.  return iZip;
  5053. }
  5054.  
  5055. /*------------------------------------------------------------------------------
  5056. | IAddress::setZip                               |
  5057. |                                        |
  5058. | Sets the zip attribute                            |
  5059. ------------------------------------------------------------------------------*/
  5060. IAddress& IAddress::setZip (const IString& aZip)
  5061. {
  5062.  if (iZip != aZip)
  5063.  {
  5064.   iZip = aZip;
  5065.   IString eventData(iZip);
  5066.   notifyObservers(INotificationEvent(zipId, *this,
  5067.           true, (void*)&eventData));
  5068.  } /* endif */
  5069.  return *this;
  5070. }
  5071.  
  5072. /*------------------------------------------------------------------------------
  5073. | IAddress::.setStreetToDefault                         |
  5074. |                                        |
  5075. | Performs the setStreetToDefault action                    |
  5076. ------------------------------------------------------------------------------*/
  5077. IAddress& IAddress::setStreetToDefault ()
  5078. {
  5079.  setStreet("101 Main Street");
  5080.  return *this;
  5081. }
  5082.  
  5083. /*------------------------------------------------------------------------------
  5084. | IAddress::setCityToDefault                          |
  5085. |                                        |
  5086. | Performs the setCityToDefault action                     |
  5087. ------------------------------------------------------------------------------*/
  5088. IAddress& IAddress::setCityToDefault ()
  5089. {
  5090.  setCity("Hometown");
  5091.  return *this;
  5092. }
  5093.  
  5094. /*------------------------------------------------------------------------------
  5095. | IAddress::setStateToDefault                          |
  5096. |                                        |
  5097. | Performs the setStateToDefault action                     |
  5098. ------------------------------------------------------------------------------*/
  5099. IAddress& IAddress::setStateToDefault ()
  5100. {
  5101.  setState("NC");
  5102.  return *this;
  5103. }
  5104.  
  5105. /*------------------------------------------------------------------------------
  5106. | IAddress::setZipToDefault                           |
  5107. |                                        |
  5108. | Performs the setZipToDefault action                      |
  5109. ------------------------------------------------------------------------------*/
  5110. IAddress& IAddress::setZipToDefault ()
  5111. {
  5112.  setZip("27511");
  5113.  return *this;
  5114. }
  5115.  
  5116. /*------------------------------------------------------------------------------
  5117. | IAddress::setToDefault                            |
  5118. |                                        |
  5119. | Performs the setToDefault action                       |
  5120. ------------------------------------------------------------------------------*/
  5121. IAddress& IAddress::setToDefault ()
  5122. {
  5123.  setStreetToDefault();
  5124.  setCityToDefault();
  5125.  setStateToDefault();
  5126.  setZipToDefault();
  5127.  return *this;
  5128. }
  5129.  
  5130.  
  5131. ΓòÉΓòÉΓòÉ 12.7.3. IAddress Test Code (iadd.cxx) ΓòÉΓòÉΓòÉ
  5132.  
  5133. /*******************************************************************************
  5134. * FILE NAME: iadd.cxx                              *
  5135. *                                        *
  5136. * COPYRIGHT:                                  *
  5137. *  Licensed Materials - Property of IBM                    *
  5138. *  (C) Copyright IBM Corporation 1994, 1995                  *
  5139. *  All Rights Reserved                             *
  5140. *  US Government Users Restricted Rights - Use, duplication, or disclosure   *
  5141. *  restricted by GSA ADP Schedule Contract with IBM Corp.           *
  5142. *******************************************************************************/
  5143.  
  5144. #include <iadd.hpp>
  5145. #include <stdio.h>
  5146. #ifndef _IOBSERVR_
  5147.  #include <iobservr.hpp>
  5148. #endif
  5149. #ifndef _INOTIFEV_
  5150.  #include <inotifev.hpp>
  5151. #endif
  5152. #ifndef _IAPP_
  5153.  #include <iapp.hpp>
  5154. #endif
  5155.  
  5156. class IAddressTest : public Inherited
  5157. {
  5158. public:
  5159.  IAddressTest () {}
  5160.  ~IAddressTest () {}
  5161.  
  5162.  streetChangedAction()
  5163.  { printf("The Street Attribute has been changed\n"); }
  5164.  
  5165.  cityChangedAction()
  5166.  { printf("The City Attribute has been changed\n"); }
  5167.  
  5168.  stateChangedAction()
  5169.  { printf("The State Attribute has been changed\n"); }
  5170.  
  5171.  zipChangedAction()
  5172.  { printf("The Zip Attribute has been changed\n"); }
  5173. } ;
  5174.  
  5175. //**************************************************************************
  5176. // StreetConnection Event-to-Action Connection Class
  5177. //**************************************************************************
  5178. class StreetConnection : public IObserver
  5179. {
  5180. public:
  5181.  StreetConnection(IAddressTest * newTestTarget)
  5182.  { iTestTarget = newTestTarget;          //Save source } ;
  5183.  ~StreetConnection () {};
  5184.  
  5185. protected:
  5186.  IObserver& dispatchNotificationEvent  (const INotificationEvent& anEvent)
  5187.  {
  5188.   if (IAddress::streetId == anEvent.notificationId())
  5189.   {
  5190.    try {iTestTarget->streetChangedAction();}
  5191.    catch (IException& exc) {}
  5192.   }
  5193.   return *this;
  5194.  } ;
  5195.  IAddressTest * iTestTarget;
  5196. } ;
  5197.  
  5198. //**************************************************************************
  5199. // CityConnection Event-to-Action Connection Class
  5200. //**************************************************************************
  5201. class CityConnection : public IObserver
  5202. {
  5203. public:
  5204.  CityConnection(IAddressTest * newTestTarget)
  5205.  { iTestTarget = newTestTarget;          //Save source } ;
  5206.  ~CityConnection () {};
  5207.  
  5208. protected:
  5209.  IObserver& dispatchNotificationEvent  (const INotificationEvent& anEvent)
  5210.  {
  5211.   if (IAddress::cityId == anEvent.notificationId())
  5212.   {
  5213.    try {iTestTarget->cityChangedAction();}
  5214.    catch (IException& exc) {}
  5215.   }
  5216.   return *this;
  5217.  } ;
  5218.  IAddressTest * iTestTarget;
  5219. } ;
  5220.  
  5221. //**************************************************************************
  5222. // StateConnection Event-to-Action Connection Class
  5223. //**************************************************************************
  5224. class StateConnection : public IObserver
  5225. {
  5226. public:
  5227.  StateConnection(IAddressTest * newTestTarget)
  5228.  { iTestTarget = newTestTarget;          //Save source } ;
  5229.  ~StateConnection () {};
  5230.  
  5231. protected:
  5232.  IObserver& dispatchNotificationEvent  (const INotificationEvent& anEvent)
  5233.  {
  5234.   if (IAddress::stateId == anEvent.notificationId())
  5235.   {
  5236.    try {iTestTarget->stateChangedAction();}
  5237.    catch (IException& exc) {}
  5238.   }
  5239.   return *this;
  5240.  } ;
  5241.  IAddressTest * iTestTarget;
  5242. } ;
  5243.  
  5244. //**************************************************************************
  5245. // ZipConnection Event-to-Action Connection Class
  5246. //**************************************************************************
  5247. class ZipConnection : public IObserver
  5248. {
  5249. public:
  5250.  ZipConnection(IAddressTest * newTestTarget)
  5251.  { iTestTarget = newTestTarget;          //Save source } ;
  5252.  ~ZipConnection () {};
  5253.  
  5254. protected:
  5255.  IObserver& dispatchNotificationEvent  (const INotificationEvent& anEvent)
  5256.  {
  5257.   if (IAddress::zipId == anEvent.notificationId())
  5258.   {
  5259.    try {iTestTarget->zipChangedAction();}
  5260.    catch (IException& exc) {}
  5261.   }
  5262.   return *this;
  5263.  } ;
  5264.  IAddressTest * iTestTarget;
  5265. } ;
  5266.  
  5267. //*************************************************************************
  5268. // main  - Application entry point                     *
  5269. //*************************************************************************
  5270. int main(int argc, char **argv)     //Main procedure with no parameters
  5271. {
  5272.  IApplication::current().        //Get current
  5273.   setArgs(argc, argv);         //  and set command line parameters
  5274.  
  5275.  IAddress * sourceNotifier;
  5276.  IAddressTest * testTarget;
  5277.  testTarget = new IAddressTest ();
  5278.  sourceNotifier = new IAddress ();
  5279.  
  5280.  {
  5281.   StreetConnection * iStreet = new StreetConnection (testTarget);
  5282.   iStreet->handleNotificationsFor(*sourceNotifier);
  5283.  }
  5284.  {
  5285.   CityConnection * iCity = new CityConnection (testTarget);
  5286.   iCity->handleNotificationsFor(*sourceNotifier);
  5287.  }
  5288.  {
  5289.   StateConnection * iState = new StateConnection (testTarget);
  5290.   iState->handleNotificationsFor(*sourceNotifier);
  5291.  }
  5292.  {
  5293.   ZipConnection * iZip = new ZipConnection (testTarget);
  5294.   iZip->handleNotificationsFor(*sourceNotifier);
  5295.  }
  5296.  sourceNotifier->enableNotification();
  5297.  sourceNotifier->setStreet("");
  5298.  sourceNotifier->setCity("");
  5299.  sourceNotifier->setState("");
  5300.  sourceNotifier->setZip("");
  5301.  
  5302.  delete sourceNotifier;
  5303.  delete testTarget;
  5304. } /* end main */
  5305.  
  5306.  
  5307. ΓòÉΓòÉΓòÉ 13. VisualAge for C++ Classes by Include and Data File ΓòÉΓòÉΓòÉ
  5308.  
  5309.  
  5310.  Name                                          Header File     Data File
  5311.  
  5312.  floatSamples                                  float.h         vbsample
  5313.  
  5314.  I0String                                      i0string.hpp
  5315.  
  5316.  I3StateCheckBox                               i3statbx.hpp
  5317.  
  5318.  IABag                                         iabag.h         vbcc
  5319.  
  5320.  IAccelerator                                  iaccel.hpp
  5321.  
  5322.  IAcceleratorKey                               iaccelky.hpp
  5323.  
  5324.  IAcceleratorTable                             iacceltb.hpp
  5325.  
  5326.  IACollection                                  iacllct.h
  5327.  
  5328.  IAddress                                      iadd.hpp        vbsample
  5329.  
  5330.  IADeque                                       iadeque.h       vbcc
  5331.  
  5332.  IAEqualityCollection                          iaequal.h       vbcc
  5333.  
  5334.  IAEqualityKeyCollection                       iaeqkey.h       vbcc
  5335.  
  5336.  IAEqualityKeySortedCollection                 iaeqksrt.h      vbcc
  5337.  
  5338.  IAEqualitySequence                            iaeqseq.h       vbcc
  5339.  
  5340.  IAEqualitySortedCollection                    iaeqsrt.h       vbcc
  5341.  
  5342.  IAHeap                                        iaheap.h        vbcc
  5343.  
  5344.  IAKeyBag                                      iakeybag.h      vbcc
  5345.  
  5346.  IAKeyCollection                               iakey.h         vbcc
  5347.  
  5348.  IAKeySet                                      iakeyset.h      vbcc
  5349.  
  5350.  IAKeySortedBag                                iaksbag.h       vbcc
  5351.  
  5352.  IAKeySortedCollection                         iaksrt.h        vbcc
  5353.  
  5354.  IAKeySortedSet                                iaksset.h       vbcc
  5355.  
  5356.  IAMap                                         iamap.h         vbcc
  5357.  
  5358.  IAnimatedButton                               ianimbut.hpp
  5359.  
  5360.  IAOrderedCollection                           iaorder.h
  5361.  
  5362.  IApplication                                  iapp.hpp
  5363.  
  5364.  IAPriorityQueue                               iaprioqu.h      vbcc
  5365.  
  5366.  IAQueue                                       iaqueue.h       vbcc
  5367.  
  5368.  IARelation                                    iarel.h         vbcc
  5369.  
  5370.  IASequence                                    iaseq.h
  5371.  
  5372.  IASequentialCollection                        iasqntl.h
  5373.  
  5374.  IASet                                         iaset.h         vbcc
  5375.  
  5376.  IASortedBag                                   iasrtbag.h      vbcc
  5377.  
  5378.  IASortedCollection                            iasrt.h         vbcc
  5379.  
  5380.  IASortedMap                                   iasrtmap.h      vbcc
  5381.  
  5382.  IASortedRelation                              iasrtrel.h      vbcc
  5383.  
  5384.  IASortedSet                                   iasrtset.h      vbcc
  5385.  
  5386.  IAStack                                       iastack.h       vbcc
  5387.  
  5388.  IBase                                         ibase.hpp
  5389.  
  5390.  IBaseComboBox                                 icombobs.hpp
  5391.  
  5392.  IBaseListBox                                  ilistbas.hpp
  5393.  
  5394.  IBaseSpinButton                               ispinbas.hpp
  5395.  
  5396.  IBitFlag                                      ibitflag.hpp
  5397.  
  5398.  IBitmapControl                                ibmpctl.hpp
  5399.  
  5400.  IButton                                       ibutton.hpp
  5401.  
  5402.  ICanvas                                       icanvas.hpp
  5403.  
  5404.  ICheckBox                                     icheckbx.hpp
  5405.  
  5406.  ICircularSlider                               icslider.hpp
  5407.  
  5408.  ICLibErrorInfo                                iexcept.hpp
  5409.  
  5410.  IClipboard                                    iclipbrd.hpp
  5411.  
  5412.  ICollectionViewComboBox                       icombovw.hpp
  5413.  
  5414.  ICollectionViewListBox                        ilistcvw.hpp
  5415.  
  5416.  IColor                                        icolor.hpp
  5417.  
  5418.  IComboBox                                     icombobx.hpp
  5419.  
  5420.  ICompany                                      icompany.hpp    vbsample
  5421.  
  5422.  IContainerColumn                              icnrcol.hpp
  5423.  
  5424.  IContainerControl                             icnrctl.hpp
  5425.  
  5426.  IContainerObject                              icnrobj.hpp
  5427.  
  5428.  IControl                                      icontrol.hpp
  5429.  
  5430.  ICurrentApplication                           iapp.hpp
  5431.  
  5432.  ICurrentThread                                ithread.hpp
  5433.  
  5434.  ICustomButton                                 icustbut.hpp
  5435.  
  5436.  ICustomer                                     icust.hpp       vbsample
  5437.  
  5438.  IDate                                         idate.hpp
  5439.  
  5440.  IDrawingCanvas                                idrawcv.hpp
  5441.  
  5442.  IDynamicLinkLibrary                           ireslib.hpp
  5443.  
  5444.  IElemPointer                                  iptr.h          vbcc
  5445.  
  5446.  IEntryField                                   ientryfd.hpp
  5447.  
  5448.  IErrorInfo                                    iexcept.hpp
  5449.  
  5450.  IFileDialog                                   ifiledlg.hpp
  5451.  
  5452.  IFlyOverHelpHandler                           iflyhhdr.hpp
  5453.  
  5454.  IFlyText                                      iflytext.hpp
  5455.  
  5456.  IFont                                         ifont.hpp
  5457.  
  5458.  IFontDialog                                   ifontdlg.hpp
  5459.  
  5460.  IFrameWindow                                  iframe.hpp
  5461.  
  5462.  IGraphicPushButton                            igraphbt.hpp
  5463.  
  5464.  IGroupBox                                     igroupbx.hpp
  5465.  
  5466.  IGUIErrorInfo                                 iexcept.hpp
  5467.  
  5468.  IHandle                                       ihandle.hpp
  5469.  
  5470.  IHandler                                      ihandler.hpp
  5471.  
  5472.  IHelpWindow                                   ihelp.hpp
  5473.  
  5474.  IIconControl                                  iiconctl.hpp
  5475.  
  5476.  IInfoArea                                     iinfoa.hpp
  5477.  
  5478.  IListBox                                      ilistbox.hpp
  5479.  
  5480.  IMenu                                         imenu.hpp
  5481.  
  5482.  IMenuBar                                      imenubar.hpp
  5483.  
  5484.  IMenuCascade                                  imnitem.hpp
  5485.  
  5486.  IMenuHandler                                  imenuhdr.hpp
  5487.  
  5488.  IMenuItem                                     imnitem.hpp
  5489.  
  5490.  IMenuSeparator                                imnitem.hpp
  5491.  
  5492.  IMessageBox                                   imsgbox.hpp
  5493.  
  5494.  IMM24FramesPerSecondTime                      immtime.hpp     vbmm
  5495.  
  5496.  IMM25FramesPerSecondTime                      immtime.hpp     vbmm
  5497.  
  5498.  IMM30FramesPerSecondTime                      immtime.hpp     vbmm
  5499.  
  5500.  IMMAmpMixer                                   immamix.hpp     vbmm
  5501.  
  5502.  IMMAudioCD                                    immcdda.hpp     vbmm
  5503.  
  5504.  IMMAudioCDContents                            immcdda.hpp     vbmm
  5505.  
  5506.  IMMConfigurableAudio                          immaud.hpp      vbmm
  5507.  
  5508.  IMMDevice                                     immdev.hpp      vbmm
  5509.  
  5510.  IMMDigitalVideo                               immdigvd.hpp    vbmm
  5511.  
  5512.  IMMErrorInfo                                  immexcpt.hpp    vbmm
  5513.  
  5514.  IMMFileMedia                                  immfilem.hpp    vbmm
  5515.  
  5516.  IMMHourMinSecFrameTime                        immtime.hpp     vbmm
  5517.  
  5518.  IMMHourMinSecTime                             immtime.hpp     vbmm
  5519.  
  5520.  IMMMasterAudio                                immmaud.hpp     vbmm
  5521.  
  5522.  IMMMillisecondTime                            immtime.hpp     vbmm
  5523.  
  5524.  IMMMinSecFrameTime                            immtime.hpp     vbmm
  5525.  
  5526.  IMMPlayableDevice                             immplayd.hpp    vbmm
  5527.  
  5528.  IMMPlayerPanel                                immplypn.hpp    vbmm
  5529.  
  5530.  IMMRecordable                                 immrecrd.hpp    vbmm
  5531.  
  5532.  IMMRemovableMedia                             immremed.hpp    vbmm
  5533.  
  5534.  IMMSequencer                                  immsequ.hpp     vbmm
  5535.  
  5536.  IMMSpeed                                      immspeed.hpp    vbmm
  5537.  
  5538.  IMMTime                                       immtime.hpp     vbmm
  5539.  
  5540.  IMMTrackMinSecFrameTime                       immttime.hpp    vbmm
  5541.  
  5542.  IMMWaveAudio                                  immwave.hpp     vbmm
  5543.  
  5544.  IMngPointer                                   iptr.h          vbcc
  5545.  
  5546.  IMultiCellCanvas                              imcelcv.hpp
  5547.  
  5548.  IMultiLineEdit                                imle.hpp
  5549.  
  5550.  INotebook                                     inotebk.hpp
  5551.  
  5552.  INotifier                                     inotify.hpp
  5553.  
  5554.  INumericSpinButton                            ispinnum.hpp
  5555.  
  5556.  IObserver                                     iobservr.hpp
  5557.  
  5558.  IOrderedRecord                                iordrrec.hpp    vbsample
  5559.  
  5560.  ioSamples                                     io.h            vbsample
  5561.  
  5562.  IOutlineBox                                   ioutlbox.hpp
  5563.  
  5564.  IPair                                         ipoint.hpp
  5565.  
  5566.  IPartOrderedCollection                        ipartccl.h      vbcc
  5567.  
  5568.  IPoint                                        ipoint.hpp
  5569.  
  5570.  IPointArray                                   iptarray.hpp
  5571.  
  5572.  IPopUpMenu                                    ipopmenu.hpp
  5573.  
  5574.  IProfile                                      iprofile.hpp
  5575.  
  5576.  IProgressIndicator                            islider.hpp
  5577.  
  5578.  IPushButton                                   ipushbut.hpp
  5579.  
  5580.  IRadioButton                                  iradiobt.hpp
  5581.  
  5582.  IRange                                        ipoint.hpp
  5583.  
  5584.  IRBag                                         irbag.h         vbcc
  5585.  
  5586.  IRDeque                                       irdeque.h       vbcc
  5587.  
  5588.  IRecord                                       irecord.hpp     vbsample
  5589.  
  5590.  IRectangle                                    irect.hpp
  5591.  
  5592.  IRefCounted                                   irefcnt.hpp
  5593.  
  5594.  IREqualitySequence                            ireqseq.h       vbcc
  5595.  
  5596.  IResource                                     ireslock.hpp
  5597.  
  5598.  IResourceId                                   ireslib.hpp
  5599.  
  5600.  IResourceLibrary                              ireslib.hpp
  5601.  
  5602.  IRHeap                                        irheap.h        vbcc
  5603.  
  5604.  IRKeyBag                                      irkeybag.h      vbcc
  5605.  
  5606.  IRKeySet                                      irkeyset.h      vbcc
  5607.  
  5608.  IRKeySortedBag                                irksbag.h       vbcc
  5609.  
  5610.  IRKeySortedSet                                irksset.h       vbcc
  5611.  
  5612.  IRMap                                         irmap.h         vbcc
  5613.  
  5614.  IRPriorityQueue                               irprioqu.h      vbcc
  5615.  
  5616.  IRQueue                                       irqueue.h       vbcc
  5617.  
  5618.  IRRelation                                    irrel.h         vbcc
  5619.  
  5620.  IRSequence                                    irseq.h
  5621.  
  5622.  IRSet                                         irset.h         vbcc
  5623.  
  5624.  IRSortedBag                                   irsrtbag.h      vbcc
  5625.  
  5626.  IRSortedMap                                   irsrtmap.h      vbcc
  5627.  
  5628.  IRSortedRelation                              irsrtrel.h      vbcc
  5629.  
  5630.  IRSortedSet                                   irsrtset.h      vbcc
  5631.  
  5632.  IRStack                                       irstack.h       vbcc
  5633.  
  5634.  IScrollBar                                    iscroll.hpp
  5635.  
  5636.  ISetCanvas                                    isetcv.hpp
  5637.  
  5638.  ISettingButton                                isetbut.hpp
  5639.  
  5640.  ISize                                         ipoint.hpp
  5641.  
  5642.  ISlider                                       islider.hpp
  5643.  
  5644.  ISplitCanvas                                  isplitcv.hpp
  5645.  
  5646.  IStandardNotifier                             istdntfy.hpp
  5647.  
  5648.  IStaticText                                   istattxt.hpp
  5649.  
  5650.  IString                                       istring.hpp
  5651.  
  5652.  IStringGenerator                              istrgen.hpp
  5653.  
  5654.  ISubmenu                                      isubmenu.hpp
  5655.  
  5656.  ISystemErrorInfo                              iexcept.hpp
  5657.  
  5658.  ITextControl                                  itextctl.hpp
  5659.  
  5660.  ITextSpinButton                               ispintxt.hpp
  5661.  
  5662.  ITime                                         itime.hpp
  5663.  
  5664.  ITitle                                        ititle.hpp
  5665.  
  5666.  IToolBar                                      itbar.hpp
  5667.  
  5668.  IToolBarButton                                itbarbut.hpp
  5669.  
  5670.  ITrace                                        itrace.hpp
  5671.  
  5672.  IVAvlKeySortedSet                             ivksset.h       vbcc
  5673.  
  5674.  IVBag                                         ivbag.h         vbcc
  5675.  
  5676.  IVBagOnBase                                   ivbag.h         vbcc
  5677.  
  5678.  IVBagOnBSTKeySortedSet                        ivbag.h         vbcc
  5679.  
  5680.  IVBagOnHashKeySet                             ivbag.h         vbcc
  5681.  
  5682.  IVBagOnSortedDilutedSequence                  ivbag.h         vbcc
  5683.  
  5684.  IVBagOnSortedLinkedSequence                   ivbag.h         vbcc
  5685.  
  5686.  IVBagOnSortedTabularSequence                  ivbag.h         vbcc
  5687.  
  5688.  IVBase                                        ivbase.hpp
  5689.  
  5690.  IVBBooleanPart                                ivbbool.hpp     vbsample
  5691.  
  5692.  IVBCheckMenuHandler                           ivbmenuh.hpp
  5693.  
  5694.  IVBContainerControl                           ivbcnr.h
  5695.  
  5696.  IVBDataTypePart                               ivbdtype.hpp    vbsample
  5697.  
  5698.  IVBDoublePart                                 ivbdbl.hpp      vbsample
  5699.  
  5700.  IVBDragDropHandler                            ivbdragh.hpp
  5701.  
  5702.  IVBFileDialog                                 ivbfiled.hpp
  5703.  
  5704.  IVBFlyText                                    ivbfly.hpp
  5705.  
  5706.  IVBFontDialog                                 ivbfontd.hpp
  5707.  
  5708.  IVBLogicalAndPart                             ivbland.hpp     vbsample
  5709.  
  5710.  IVBLogicalOrPart                              ivblor.hpp      vbsample
  5711.  
  5712.  IVBLongPart                                   ivblong.hpp     vbsample
  5713.  
  5714.  IVBMinSizeViewPortHandler                     ivbvpmsz.hpp
  5715.  
  5716.  IVBShortPart                                  ivbshort.hpp    vbsample
  5717.  
  5718.  IVBSTKeySortedSet                             ivksset.h       vbcc
  5719.  
  5720.  IVBStringPart                                 ivbstrng.hpp    vbsample
  5721.  
  5722.  IVBUnsignedLongPart                           ivbulong.hpp    vbsample
  5723.  
  5724.  IVBUnsignedShortPart                          ivbushrt.hpp    vbsample
  5725.  
  5726.  IVDeque                                       ivdeque.h       vbcc
  5727.  
  5728.  IVDequeOnBase                                 ivdeque.h       vbcc
  5729.  
  5730.  IVDequeOnDilutedSequence                      ivdeque.h       vbcc
  5731.  
  5732.  IVDilutedSequence                             ivseq.h         vbcc
  5733.  
  5734.  IVEqualitySequence                            iveqseq.h       vbcc
  5735.  
  5736.  IVEqualitySequenceOnBase                      iveqseq.h       vbcc
  5737.  
  5738.  IVEqualitySequenceOnDilutedSequence           iveqseq.h       vbcc
  5739.  
  5740.  IVEqualitySequenceOnTabularSequence           iveqseq.h       vbcc
  5741.  
  5742.  IVGAvlKeySortedSet                            ivksset.h       vbcc
  5743.  
  5744.  IVGBag                                        ivbag.h         vbcc
  5745.  
  5746.  IVGBagOnBSTKeySortedSet                       ivbag.h         vbcc
  5747.  
  5748.  IVGBagOnHashKeySet                            ivbag.h         vbcc
  5749.  
  5750.  IVGBagOnSortedDilutedSequence                 ivbag.h         vbcc
  5751.  
  5752.  IVGBagOnSortedLinkedSequence                  ivbag.h         vbcc
  5753.  
  5754.  IVGBagOnSortedTabularSequence                 ivbag.h         vbcc
  5755.  
  5756.  IVGBSTKeySortedSet                            ivksset.h       vbcc
  5757.  
  5758.  IVGDeque                                      ivdeque.h       vbcc
  5759.  
  5760.  IVGDequeOnDilutedSequence                     ivdeque.h       vbcc
  5761.  
  5762.  IVGDilutedSequence                            ivseq.h         vbcc
  5763.  
  5764.  IVGEqualitySequence                           iveqseq.h       vbcc
  5765.  
  5766.  IVGEqualitySequenceOnDilutedSequence          iveqseq.h       vbcc
  5767.  
  5768.  IVGEqualitySequenceOnTabularSequence          iveqseq.h       vbcc
  5769.  
  5770.  IVGHashKeyBag                                 ivkeybag.h      vbcc
  5771.  
  5772.  IVGHashKeySet                                 ivkeyset.h      vbcc
  5773.  
  5774.  IVGHeap                                       ivheap.h        vbcc
  5775.  
  5776.  IVGHeapOnDilutedSequence                      ivheap.h        vbcc
  5777.  
  5778.  IVGKeyBag                                     ivkeybag.h      vbcc
  5779.  
  5780.  IVGKeySet                                     ivkeyset.h      vbcc
  5781.  
  5782.  IVGKeySetOnBSTKeySortedSet                    ivkeyset.h      vbcc
  5783.  
  5784.  IVGKeySetOnSortedDilutedSequence              ivkeyset.h      vbcc
  5785.  
  5786.  IVGKeySetOnSortedLinkedSequence               ivkeyset.h      vbcc
  5787.  
  5788.  IVGKeySetOnSortedTabularSequence              ivkeyset.h      vbcc
  5789.  
  5790.  IVGKeySortedBag                               ivksbag.h       vbcc
  5791.  
  5792.  IVGKeySortedBagOnSortedDilutedSequence        ivksbag.h       vbcc
  5793.  
  5794.  IVGKeySortedBagOnSortedTabularSequence        ivksbag.h       vbcc
  5795.  
  5796.  IVGKeySortedSet                               ivksset.h       vbcc
  5797.  
  5798.  IVGKeySortedSetOnSortedDilutedSequence        ivksset.h       vbcc
  5799.  
  5800.  IVGKeySortedSetOnSortedLinkedSequence         ivksset.h       vbcc
  5801.  
  5802.  IVGKeySortedSetOnSortedTabularSequence        ivksset.h       vbcc
  5803.  
  5804.  IVGLinkedSequence                             ivseq.h         vbcc
  5805.  
  5806.  IVGMap                                        ivmap.h         vbcc
  5807.  
  5808.  IVGMapOnBSTKeySortedMap                       ivsrtmap.h      vbcc
  5809.  
  5810.  IVGMapOnBSTKeySortedSet                       ivmap.h         vbcc
  5811.  
  5812.  IVGMapOnHashKeySet                            ivmap.h         vbcc
  5813.  
  5814.  IVGMapOnSortedDilutedSequence                 ivmap.h         vbcc
  5815.  
  5816.  IVGMapOnSortedLinkedSequence                  ivmap.h         vbcc
  5817.  
  5818.  IVGMapOnSortedTabularSequence                 ivmap.h         vbcc
  5819.  
  5820.  IVGPriorityQueue                              ivprioqu.h      vbcc
  5821.  
  5822.  IVGQueue                                      ivqueue.h       vbcc
  5823.  
  5824.  IVGQueueOnDilutedSequence                     ivqueue.h       vbcc
  5825.  
  5826.  IVGQueueOnTabularSequence                     ivqueue.h       vbcc
  5827.  
  5828.  IVGRelation                                   ivrel.h         vbcc
  5829.  
  5830.  IVGSequence                                   ivseq.h
  5831.  
  5832.  IVGSet                                        ivset.h         vbcc
  5833.  
  5834.  IVGSetOnBSTKeySortedSet                       ivset.h         vbcc
  5835.  
  5836.  IVGSetOnHashKeySet                            ivset.h         vbcc
  5837.  
  5838.  IVGSetOnSortedDilutedSequence                 ivset.h         vbcc
  5839.  
  5840.  IVGSetOnSortedLinkedSequence                  ivset.h         vbcc
  5841.  
  5842.  IVGSetOnSortedTabularSequence                 ivset.h         vbcc
  5843.  
  5844.  IVGSortedBag                                  ivsrtbag.h      vbcc
  5845.  
  5846.  IVGSortedBagOnSortedDilutedSequence           ivsrtbag.h      vbcc
  5847.  
  5848.  IVGSortedBagOnSortedLinkedSequence            ivsrtbag.h      vbcc
  5849.  
  5850.  IVGSortedBagOnSortedTabularSequence           ivsrtbag.h      vbcc
  5851.  
  5852.  IVGSortedMap                                  ivsrtmap.h      vbcc
  5853.  
  5854.  IVGSortedMapOnSortedDilutedSequence           ivsrtmap.h      vbcc
  5855.  
  5856.  IVGSortedMapOnSortedLinkedSequence            ivsrtmap.h      vbcc
  5857.  
  5858.  IVGSortedMapOnSortedTabularSequence           ivsrtmap.h      vbcc
  5859.  
  5860.  IVGSortedRelation                             ivsrtrel.h      vbcc
  5861.  
  5862.  IVGSortedRelationOnSortedDilutedSequence      ivsrtrel.h      vbcc
  5863.  
  5864.  IVGSortedRelationOnSortedTabularSequence      ivsrtrel.h      vbcc
  5865.  
  5866.  IVGSortedSet                                  ivsrtset.h      vbcc
  5867.  
  5868.  IVGSortedSetOnBSTKeySortedSet                 ivsrtset.h      vbcc
  5869.  
  5870.  IVGSortedSetOnSortedDilutedSequence           ivsrtset.h      vbcc
  5871.  
  5872.  IVGSortedSetOnSortedLinkedSequence            ivsrtset.h      vbcc
  5873.  
  5874.  IVGSortedSetOnSortedTabularSequence           ivsrtset.h      vbcc
  5875.  
  5876.  IVGStack                                      ivstack.h       vbcc
  5877.  
  5878.  IVGStackOnDilutedSequence                     ivstack.h       vbcc
  5879.  
  5880.  IVGStackOnTabularSequence                     ivstack.h       vbcc
  5881.  
  5882.  IVGTabularSequence                            ivseq.h         vbcc
  5883.  
  5884.  IVHashKeyBag                                  ivkeybag.h      vbcc
  5885.  
  5886.  IVHashKeySet                                  ivkeyset.h      vbcc
  5887.  
  5888.  IVHeap                                        ivheap.h        vbcc
  5889.  
  5890.  IVHeapOnBase                                  ivheap.h        vbcc
  5891.  
  5892.  IVHeapOnDilutedSequence                       ivheap.h        vbcc
  5893.  
  5894.  IViewPort                                     ivport.hpp
  5895.  
  5896.  IVKeyBag                                      ivkeybag.h      vbcc
  5897.  
  5898.  IVKeyBagOnBase                                ivkeybag.h      vbcc
  5899.  
  5900.  IVKeySet                                      ivkeyset.h      vbcc
  5901.  
  5902.  IVKeySetOnBase                                ivkeyset.h      vbcc
  5903.  
  5904.  IVKeySetOnBSTKeySortedSet                     ivkeyset.h      vbcc
  5905.  
  5906.  IVKeySetOnSortedDilutedSequence               ivkeyset.h      vbcc
  5907.  
  5908.  IVKeySetOnSortedLinkedSequence                ivkeyset.h      vbcc
  5909.  
  5910.  IVKeySetOnSortedTabularSequence               ivkeyset.h      vbcc
  5911.  
  5912.  IVKeySortedBag                                ivksbag.h       vbcc
  5913.  
  5914.  IVKeySortedBagOnBase                          ivksbag.h       vbcc
  5915.  
  5916.  IVKeySortedBagOnSortedDilutedSequence         ivksbag.h       vbcc
  5917.  
  5918.  IVKeySortedBagOnSortedTabularSequence         ivksbag.h       vbcc
  5919.  
  5920.  IVKeySortedSet                                ivksset.h       vbcc
  5921.  
  5922.  IVKeySortedSetOnBase                          ivksset.h       vbcc
  5923.  
  5924.  IVKeySortedSetOnSortedLinkedSequence          ivksset.h       vbcc
  5925.  
  5926.  IVKeySortedSetOnSortedTabularSequence         ivksset.h       vbcc
  5927.  
  5928.  IVLinkedSequence                              ivseq.h         vbcc
  5929.  
  5930.  IVMap                                         ivmap.h         vbcc
  5931.  
  5932.  IVMapOnBase                                   ivmap.h         vbcc
  5933.  
  5934.  IVMapOnBSTKeySortedSet                        ivmap.h         vbcc
  5935.  
  5936.  IVMapOnHashKeySet                             ivmap.h         vbcc
  5937.  
  5938.  IVMapOnSortedDilutedSequence                  ivmap.h         vbcc
  5939.  
  5940.  IVMapOnSortedLinkedSequence                   ivmap.h         vbcc
  5941.  
  5942.  IVMapOnSortedTabularSequence                  ivmap.h         vbcc
  5943.  
  5944.  IVPriorityQueue                               ivprioqu.h      vbcc
  5945.  
  5946.  IVPriorityQueueOnBase                         ivprioqu.h      vbcc
  5947.  
  5948.  IVQueue                                       ivqueue.h       vbcc
  5949.  
  5950.  IVQueueOnBase                                 ivqueue.h       vbcc
  5951.  
  5952.  IVQueueOnDilutedSequence                      ivqueue.h       vbcc
  5953.  
  5954.  IVQueueOnTabularSequence                      ivqueue.h       vbcc
  5955.  
  5956.  IVRelation                                    ivrel.h         vbcc
  5957.  
  5958.  IVRelationOnBase                              ivrel.h         vbcc
  5959.  
  5960.  IVSequence                                    ivseq.h
  5961.  
  5962.  IVSequenceOnBase                              ivseq.h
  5963.  
  5964.  IVSet                                         ivset.h         vbcc
  5965.  
  5966.  IVSetOnBase                                   ivset.h         vbcc
  5967.  
  5968.  IVSetOnBSTKeySortedSet                        ivset.h         vbcc
  5969.  
  5970.  IVSetOnHashKeySet                             ivset.h         vbcc
  5971.  
  5972.  IVSetOnSortedDilutedSequence                  ivset.h         vbcc
  5973.  
  5974.  IVSetOnSortedLinkedSequence                   ivset.h         vbcc
  5975.  
  5976.  IVSetOnSortedTabularSequence                  ivset.h         vbcc
  5977.  
  5978.  IVSortedBag                                   ivsrtbag.h      vbcc
  5979.  
  5980.  IVSortedBagOnBase                             ivsrtbag.h      vbcc
  5981.  
  5982.  IVSortedBagOnSortedDilutedSequence            ivsrtbag.h      vbcc
  5983.  
  5984.  IVSortedBagOnSortedLinkedSequence             ivsrtbag.h      vbcc
  5985.  
  5986.  IVSortedBagOnSortedTabularSequence            ivsrtbag.h      vbcc
  5987.  
  5988.  IVSortedMap                                   ivsrtmap.h      vbcc
  5989.  
  5990.  IVSortedMapOnBase                             ivsrtmap.h      vbcc
  5991.  
  5992.  IVSortedMapOnSortedDilutedSequence            ivsrtmap.h      vbcc
  5993.  
  5994.  IVSortedMapOnSortedLinkedSequence             ivsrtmap.h      vbcc
  5995.  
  5996.  IVSortedMapOnSortedTabularSequence            ivsrtmap.h      vbcc
  5997.  
  5998.  IVSortedRelation                              ivsrtrel.h      vbcc
  5999.  
  6000.  IVSortedRelationOnBase                        ivsrtrel.h      vbcc
  6001.  
  6002.  IVSortedRelationOnSortedDilutedSequence       ivsrtrel.h      vbcc
  6003.  
  6004.  IVSortedRelationOnSortedTabularSequence       ivsrtrel.h      vbcc
  6005.  
  6006.  IVSortedSet                                   ivsrtset.h      vbcc
  6007.  
  6008.  IVSortedSetOnBase                             ivsrtset.h      vbcc
  6009.  
  6010.  IVSortedSetOnBSTKeySortedSet                  ivsrtset.h      vbcc
  6011.  
  6012.  IVSortedSetOnSortedLinkedSequence             ivsrtset.h      vbcc
  6013.  
  6014.  IVSortedSetOnSortedTabularSequence            ivsrtset.h      vbcc
  6015.  
  6016.  IVStack                                       ivstack.h       vbcc
  6017.  
  6018.  IVStackOnBase                                 ivstack.h       vbcc
  6019.  
  6020.  IVStackOnTabularSequence                      ivstack.h       vbcc
  6021.  
  6022.  IVTabularSequence                             ivseq.h         vbcc
  6023.  
  6024.  IWindow                                       iwindow.hpp
  6025.  
  6026.  mathSamples                                   math.h          vbsample
  6027.  
  6028.  staticWindowSamples                           iwindow.hpp     vbsample
  6029.  
  6030.  stdioSamples                                  stdio.h         vbsample
  6031.  
  6032.  stdlibSamples                                 stdlib.h        vbsample
  6033.  
  6034.  
  6035. ΓòÉΓòÉΓòÉ 14. Glossary ΓòÉΓòÉΓòÉ
  6036.  
  6037.  
  6038. ΓòÉΓòÉΓòÉ <hidden> Glossary description ΓòÉΓòÉΓòÉ
  6039.  
  6040. This glossary defines terms and abbreviations that are used in this book. If 
  6041. you do not find the term you are looking for, refer to the IBM Dictionary of 
  6042. Computing, New York:McGraw-Hill, 1994. 
  6043.  
  6044. This glossary includes terms and definitions from the American National 
  6045. Standard Dictionary for Information Systems, ANSI X3.172-1990, copyright 1990 
  6046. by the American National Standards Institute (ANSI). Copies may be purchased 
  6047. from the American National Standards Institute, 1430 Broadway, New York, New 
  6048. York 10018. 
  6049.  
  6050.  
  6051. ΓòÉΓòÉΓòÉ <hidden> Glossary listing ΓòÉΓòÉΓòÉ
  6052.  
  6053. A
  6054. abstract class
  6055. access
  6056. action
  6057. argument
  6058. attribute
  6059. attribute-to-action connection
  6060. attribute-to-attribute connection
  6061. attribute-to-member function connection
  6062. B
  6063. base class
  6064. behavior
  6065. C
  6066. caller
  6067. category
  6068. class
  6069. Class Editor
  6070. class hierarchy
  6071. class library
  6072. class member function
  6073. client area object
  6074. client object
  6075. collection
  6076. Common User Access (CUA)
  6077. composite part
  6078. Composition Editor
  6079. concrete class
  6080. connection
  6081. const
  6082. construction from parts
  6083. constructor
  6084. CUA
  6085. cursored emphasis
  6086. custom logic connection
  6087. D
  6088. data abstraction
  6089. data member
  6090. data model
  6091. data object
  6092. declaration
  6093. DEF file
  6094. derivation
  6095. destructor
  6096. DLL
  6097. dynamic link library (DLL)
  6098. E
  6099. encapsulation
  6100. event
  6101. event-to-action connection
  6102. event-to-attribute connection
  6103. event-to-member function connection
  6104. expansion area
  6105. F
  6106. feature
  6107. full attribute
  6108. free-form surface
  6109. G
  6110. graphical user interface (GUI)
  6111. GUI
  6112. H
  6113. handles
  6114. header file
  6115. I
  6116. inheritance
  6117. instance
  6118. L
  6119. legacy code
  6120. loaded
  6121. M
  6122. main part
  6123. member
  6124. member function
  6125. member function call
  6126. member function name
  6127. message
  6128. model
  6129. module definition file
  6130. N
  6131. nested class
  6132. nonvisual part
  6133. no-event attribute
  6134. no-set attribute
  6135. notebook part
  6136. O
  6137. object
  6138. object class
  6139. object factory
  6140. object-oriented programming
  6141. observer
  6142. operation
  6143. overloading
  6144. P
  6145. palette
  6146. parameter connection
  6147. parent class
  6148. part
  6149. part event
  6150. part event ID
  6151. part interface
  6152. Part Interface Editor
  6153. parts palette
  6154. preferred features
  6155. primary selection
  6156. private
  6157. process
  6158. program
  6159. protected
  6160. prototype
  6161. primitive part
  6162. process
  6163. property
  6164. pure virtual function
  6165. R
  6166. receiver
  6167. resource file
  6168. S
  6169. selection handles
  6170. server
  6171. service
  6172. settings view
  6173. sticky
  6174. structure
  6175. subpart
  6176. superclass
  6177. T
  6178. tear-off attribute
  6179. template
  6180. thread
  6181. tool bar
  6182. U
  6183. UI
  6184. unloaded
  6185. user interface (UI)
  6186. V
  6187. variable
  6188. view
  6189. virtual function
  6190. visual part
  6191. visual programming tool
  6192. W
  6193. white space
  6194. window
  6195.  
  6196.  
  6197. ΓòÉΓòÉΓòÉ <hidden> abstract class ΓòÉΓòÉΓòÉ
  6198.  
  6199. A class that provides common behavior across a set of subclasses but is not 
  6200. itself designed to have instances that work. An abstract class represents a 
  6201. concept; classes derived from it represent implementations of the concept. For 
  6202. example, IControl is the abstract base class for control view windows; the 
  6203. ICanvas and IListBox classes are controls derived from IControl. An abstract 
  6204. class must have at least one pure virtual function. 
  6205.  
  6206. See also  base class. 
  6207.  
  6208.  
  6209. ΓòÉΓòÉΓòÉ <hidden> access ΓòÉΓòÉΓòÉ
  6210.  
  6211. A property of a class that determines whether a class member is accessible in 
  6212. an expression or declaration. 
  6213.  
  6214.  
  6215. ΓòÉΓòÉΓòÉ <hidden> action ΓòÉΓòÉΓòÉ
  6216.  
  6217. A specification of a function that a part can perform. The visual builder uses 
  6218. action specifications to generate connections between parts. Actions are 
  6219. resolved to member function calls in the generated code. 
  6220.  
  6221. Compare to  event and  attribute. 
  6222.  
  6223.  
  6224. ΓòÉΓòÉΓòÉ <hidden> argument ΓòÉΓòÉΓòÉ
  6225.  
  6226. A data element, or value, included as part of a member function call. Arguments 
  6227. provide additional information that the called member function can use to 
  6228. perform the requested operation. 
  6229.  
  6230.  
  6231. ΓòÉΓòÉΓòÉ <hidden> attribute ΓòÉΓòÉΓòÉ
  6232.  
  6233. A specification of a property of a part. For example, a customer part could 
  6234. have a name attribute and an address attribute. An attribute can itself be a 
  6235. part with its own behavior and attributes. 
  6236.  
  6237. The visual builder uses attribute specifications to generate code to get and 
  6238. set part properties. 
  6239.  
  6240. Compare to  event and  action. 
  6241.  
  6242.  
  6243. ΓòÉΓòÉΓòÉ <hidden> attribute-to-action connection ΓòÉΓòÉΓòÉ
  6244.  
  6245. A connection that starts an action whenever an attribute's value changes. It is 
  6246. similar to an event-to-action connection because the attribute's event ID is 
  6247. used to notify the action when the value of the attribute changes. 
  6248.  
  6249. See also  connection. Compare to  event-to-action connection. 
  6250.  
  6251.  
  6252. ΓòÉΓòÉΓòÉ <hidden> attribute-to-attribute connection ΓòÉΓòÉΓòÉ
  6253.  
  6254. A connection from an attribute of one part to an attribute of another part. 
  6255. When one attribute is updated, the other attribute is updated automatically. 
  6256.  
  6257. See also  connection. 
  6258.  
  6259.  
  6260. ΓòÉΓòÉΓòÉ <hidden> attribute-to-member function connection ΓòÉΓòÉΓòÉ
  6261.  
  6262. A connection from an attribute of a part to a member function. The connected 
  6263. attribute receives its value from the member function, which can make 
  6264. calculations based on the values of other parts. 
  6265.  
  6266. See also  connection. 
  6267.  
  6268.  
  6269. ΓòÉΓòÉΓòÉ <hidden> base class ΓòÉΓòÉΓòÉ
  6270.  
  6271. A class from which other classes or parts are derived. A base class may itself 
  6272. be derived from another base class. 
  6273.  
  6274. See also  abstract class. 
  6275.  
  6276.  
  6277. ΓòÉΓòÉΓòÉ <hidden> behavior ΓòÉΓòÉΓòÉ
  6278.  
  6279. The set of external characteristics that an object exhibits. 
  6280.  
  6281.  
  6282. ΓòÉΓòÉΓòÉ <hidden> caller ΓòÉΓòÉΓòÉ
  6283.  
  6284. An object that sends a member function call to another object. 
  6285.  
  6286. Contrast with  receiver. 
  6287.  
  6288.  
  6289. ΓòÉΓòÉΓòÉ <hidden> category ΓòÉΓòÉΓòÉ
  6290.  
  6291. In the Composition Editor, a selectable grouping of parts represented by an 
  6292. icon in the left-most column. Selecting a category displays the parts belonging 
  6293. to that category in the next column. 
  6294.  
  6295. See also  parts palette. 
  6296.  
  6297.  
  6298. ΓòÉΓòÉΓòÉ <hidden> class ΓòÉΓòÉΓòÉ
  6299.  
  6300. An aggregate that can contain functions, types, and user-defined operators, in 
  6301. addition to data. Classes can be defined hierarchically, allowing one class to 
  6302. be an expansion of another, and can restrict access to its members. 
  6303.  
  6304.  
  6305. ΓòÉΓòÉΓòÉ <hidden> Class Editor ΓòÉΓòÉΓòÉ
  6306.  
  6307. The editor you use to specify the names of files that Visual Builder writes to 
  6308. when you generate default code. You can also use this editor to do the 
  6309. following: 
  6310.  
  6311.      Enter a description of the part 
  6312.      Specify a different .vbb file in which to store the part 
  6313.      See the name of the part's base class 
  6314.      Modify the part's default constructor 
  6315.      Enter additional constructor and destructor code 
  6316.      Specify a .lib file for the part 
  6317.      Specify a resource DLL and ID to assign an icon to the part 
  6318.      Specify other files that you want to include when you build your 
  6319.       application 
  6320.  
  6321.  Compare to  Composition Editor and  Part Interface Editor. 
  6322.  
  6323.  
  6324. ΓòÉΓòÉΓòÉ <hidden> class hierarchy ΓòÉΓòÉΓòÉ
  6325.  
  6326. A tree-like structure showing relationships among object classes. It places one 
  6327. abstract class at the top (a base class) and one or more layers of less 
  6328. abstract classes below it. 
  6329.  
  6330.  
  6331. ΓòÉΓòÉΓòÉ <hidden> class library ΓòÉΓòÉΓòÉ
  6332.  
  6333. A collection of classes. 
  6334.  
  6335.  
  6336. ΓòÉΓòÉΓòÉ <hidden> class member function ΓòÉΓòÉΓòÉ
  6337.  
  6338. See  member function. 
  6339.  
  6340.  
  6341. ΓòÉΓòÉΓòÉ <hidden> client area object ΓòÉΓòÉΓòÉ
  6342.  
  6343. An intermediate window between a frame window (IFrameWindow) and its controls 
  6344. and other child windows. 
  6345.  
  6346.  
  6347. ΓòÉΓòÉΓòÉ <hidden> client object ΓòÉΓòÉΓòÉ
  6348.  
  6349. An object that requests services from other objects. 
  6350.  
  6351.  
  6352. ΓòÉΓòÉΓòÉ <hidden> collection ΓòÉΓòÉΓòÉ
  6353.  
  6354. A set of features in which each feature is an object. 
  6355.  
  6356.  
  6357. ΓòÉΓòÉΓòÉ <hidden> Common User Access (CUA) ΓòÉΓòÉΓòÉ
  6358.  
  6359. An IBM architecture for designing graphical user interfaces using a set of 
  6360. standard components and terminology. 
  6361.  
  6362.  
  6363. ΓòÉΓòÉΓòÉ <hidden> composite part ΓòÉΓòÉΓòÉ
  6364.  
  6365. A part that is composed of a part and one or more subparts. A composite part 
  6366. can contain visual parts, nonvisual parts, or both. 
  6367.  
  6368. See also  nonvisual part, part, subpart, and  visual part. 
  6369.  
  6370.  
  6371. ΓòÉΓòÉΓòÉ <hidden> Composition Editor ΓòÉΓòÉΓòÉ
  6372.  
  6373. A view that is used to build a graphical user interface and to make connections 
  6374. between parts. 
  6375.  
  6376. Compare to  Class Editor and  Part Interface Editor. 
  6377.  
  6378.  
  6379. ΓòÉΓòÉΓòÉ <hidden> concrete class ΓòÉΓòÉΓòÉ
  6380.  
  6381. A subclass of an abstract class that is a specialization of the abstract class. 
  6382.  
  6383.  
  6384. ΓòÉΓòÉΓòÉ <hidden> connection ΓòÉΓòÉΓòÉ
  6385.  
  6386. A formal, explicit relationship between parts. Making connections is the basic 
  6387. technique for building any visual application because that defines the way in 
  6388. which parts communicate with one another. The visual builder generates the code 
  6389. that then implements these connections. 
  6390.  
  6391. See also  attribute-to-action connection, attribute-to-attribute connection, 
  6392. attribute-to-member function connection, parameter connection, custom logic 
  6393. connection, event-to-action connection, event-to-attribute connection, and 
  6394. event-to-member function connection. 
  6395.  
  6396.  
  6397. ΓòÉΓòÉΓòÉ <hidden> const ΓòÉΓòÉΓòÉ
  6398.  
  6399. An attribute of a data object that declares that the object cannot be changed. 
  6400.  
  6401.  
  6402. ΓòÉΓòÉΓòÉ <hidden> construction from parts ΓòÉΓòÉΓòÉ
  6403.  
  6404. A software development technology in which applications are assembled from 
  6405. existing and reusable software components, known as parts. 
  6406.  
  6407.  
  6408. ΓòÉΓòÉΓòÉ <hidden> constructor ΓòÉΓòÉΓòÉ
  6409.  
  6410. A special class member function that has the same name as the class and is used 
  6411. to construct and possibly initialize class objects. 
  6412.  
  6413.  
  6414. ΓòÉΓòÉΓòÉ <hidden> CUA ΓòÉΓòÉΓòÉ
  6415.  
  6416. See  Common User Access. 
  6417.  
  6418.  
  6419. ΓòÉΓòÉΓòÉ <hidden> cursored emphasis ΓòÉΓòÉΓòÉ
  6420.  
  6421. When the selection cursor is on a choice, that choice has cursored emphasis. 
  6422.  
  6423.  
  6424. ΓòÉΓòÉΓòÉ <hidden> custom logic connection ΓòÉΓòÉΓòÉ
  6425.  
  6426. A connection that causes your customized C or C++ code to be run. This 
  6427. connection can be triggered either when an attribute's value changes or an 
  6428. event occurs. 
  6429.  
  6430.  
  6431. ΓòÉΓòÉΓòÉ <hidden> data abstraction ΓòÉΓòÉΓòÉ
  6432.  
  6433. A data type with a private representation and a public set of operations. The 
  6434. C++ language uses the concept of classes to implement data abstraction. 
  6435.  
  6436.  
  6437. ΓòÉΓòÉΓòÉ <hidden> data member ΓòÉΓòÉΓòÉ
  6438.  
  6439. Private data that belongs to a given object and is hidden from direct access by 
  6440. all other objects. Data members can only be accessed by the member functions of 
  6441. the defining class and its subclasses. 
  6442.  
  6443.  
  6444. ΓòÉΓòÉΓòÉ <hidden> data model ΓòÉΓòÉΓòÉ
  6445.  
  6446. A combination of the base classes and parts shipped with the product and the 
  6447. classes and parts you save and create. They are saved in a file named 
  6448. vbbase.vbb. 
  6449.  
  6450.  
  6451. ΓòÉΓòÉΓòÉ <hidden> data object ΓòÉΓòÉΓòÉ
  6452.  
  6453. A storage area used to hold a value. 
  6454.  
  6455.  
  6456. ΓòÉΓòÉΓòÉ <hidden> declaration ΓòÉΓòÉΓòÉ
  6457.  
  6458. A description that makes an external object or function available to a function 
  6459. or a block. 
  6460.  
  6461.  
  6462. ΓòÉΓòÉΓòÉ <hidden> DEF file ΓòÉΓòÉΓòÉ
  6463.  
  6464. See  module definition file. 
  6465.  
  6466.  
  6467. ΓòÉΓòÉΓòÉ <hidden> derivation ΓòÉΓòÉΓòÉ
  6468.  
  6469. The creation of a new or abstract class from an existing or base class. 
  6470.  
  6471.  
  6472. ΓòÉΓòÉΓòÉ <hidden> destructor ΓòÉΓòÉΓòÉ
  6473.  
  6474. A special class member function that has the same name as the class and is used 
  6475. to destruct class objects. 
  6476.  
  6477.  
  6478. ΓòÉΓòÉΓòÉ <hidden> DLL ΓòÉΓòÉΓòÉ
  6479.  
  6480. See  dynamic link library. 
  6481.  
  6482.  
  6483. ΓòÉΓòÉΓòÉ <hidden> dynamic link library (DLL) ΓòÉΓòÉΓòÉ
  6484.  
  6485. In OS/2, a library containing data and code objects that can be used by 
  6486. programs or applications during loading or at run time. Although they are not 
  6487. part of the program's executable (.exe) file, they are sometimes required for 
  6488. an .exe file to run properly. 
  6489.  
  6490.  
  6491. ΓòÉΓòÉΓòÉ <hidden> encapsulation ΓòÉΓòÉΓòÉ
  6492.  
  6493. The hiding of a software object's internal representation. The object provides 
  6494. an interface that queries and manipulates the data without exposing its 
  6495. underlying structure. 
  6496.  
  6497.  
  6498. ΓòÉΓòÉΓòÉ <hidden> event ΓòÉΓòÉΓòÉ
  6499.  
  6500. A specification of a notification from a part. 
  6501.  
  6502. Compare to  action, attribute, and  part event. 
  6503.  
  6504.  
  6505. ΓòÉΓòÉΓòÉ <hidden> event-to-action connection ΓòÉΓòÉΓòÉ
  6506.  
  6507. A connection that causes an action to be performed when an event occurs. 
  6508.  
  6509. See also  connection. 
  6510.  
  6511.  
  6512. ΓòÉΓòÉΓòÉ <hidden> event-to-attribute connection ΓòÉΓòÉΓòÉ
  6513.  
  6514. A connection that changes the value of an attribute when a certain event 
  6515. occurs. 
  6516.  
  6517. See also  connection. 
  6518.  
  6519.  
  6520. ΓòÉΓòÉΓòÉ <hidden> event-to-member function connection ΓòÉΓòÉΓòÉ
  6521.  
  6522. A connection from an event of a part to a member function. When the connected 
  6523. event occurs, the member function is executed. 
  6524.  
  6525. See also  connection. 
  6526.  
  6527.  
  6528. ΓòÉΓòÉΓòÉ <hidden> expansion area ΓòÉΓòÉΓòÉ
  6529.  
  6530. The section of a multicell canvas between the current cell grid and the outer 
  6531. edge of the canvas. Visually, this area is bounded by the rightmost column 
  6532. gridline and the bottommost row gridline. 
  6533.  
  6534.  
  6535. ΓòÉΓòÉΓòÉ <hidden> feature ΓòÉΓòÉΓòÉ
  6536.  
  6537. A major component of a software product that can be installed separately. 
  6538.  
  6539. In Visual Builder, an action, attribute, or event that is available from a 
  6540. part's part interface and that other parts can connect to. 
  6541.  
  6542.  
  6543. ΓòÉΓòÉΓòÉ <hidden> full attribute ΓòÉΓòÉΓòÉ
  6544.  
  6545. An attribute that has all of the behaviors and characteristics that an 
  6546. attribute can have:  a data member, a get member function, a set member 
  6547. function, and an event identifier. 
  6548.  
  6549.  
  6550. ΓòÉΓòÉΓòÉ <hidden> free-form surface ΓòÉΓòÉΓòÉ
  6551.  
  6552. The large open area of the Composition Editor window. The free-form surface 
  6553. holds the visual parts contained in the views you build and representations of 
  6554. the nonvisual parts (models) that your application includes. 
  6555.  
  6556.  
  6557. ΓòÉΓòÉΓòÉ <hidden> graphical user interface (GUI) ΓòÉΓòÉΓòÉ
  6558.  
  6559. A type of interface that enables users to communicate with a program by 
  6560. manipulating graphical features, rather than by entering commands. Typically, a 
  6561. graphical user interface includes a combination of graphics, pointing devices, 
  6562. menu bars and other menus, overlapping windows, and icons. 
  6563.  
  6564.  
  6565. ΓòÉΓòÉΓòÉ <hidden> GUI ΓòÉΓòÉΓòÉ
  6566.  
  6567. See  graphical user interface. 
  6568.  
  6569.  
  6570. ΓòÉΓòÉΓòÉ <hidden> handles ΓòÉΓòÉΓòÉ
  6571.  
  6572. Small squares that appear on the corners of a selected visual part in the 
  6573. visual builder. Handles are used to resize parts. 
  6574.  
  6575. Compare to  primary selection. 
  6576.  
  6577.  
  6578. ΓòÉΓòÉΓòÉ <hidden> header file ΓòÉΓòÉΓòÉ
  6579.  
  6580. A file that contains system-defined control information that precedes user 
  6581. data. 
  6582.  
  6583.  
  6584. ΓòÉΓòÉΓòÉ <hidden> inheritance ΓòÉΓòÉΓòÉ
  6585.  
  6586. A mechanism by which an object class can use the attributes, relationships, and 
  6587. member functions defined in more abstract classes related to it (its base 
  6588. classes). 
  6589.  
  6590. An object-oriented programming technique that allows you to use existing 
  6591. classes as bases for creating other classes. 
  6592.  
  6593.  
  6594. ΓòÉΓòÉΓòÉ <hidden> instance ΓòÉΓòÉΓòÉ
  6595.  
  6596. Synonym for  object, a particular instantiation of a data type. 
  6597.  
  6598.  
  6599. ΓòÉΓòÉΓòÉ <hidden> legacy code ΓòÉΓòÉΓòÉ
  6600.  
  6601. Existing code that a user might have. Legacy applications often have 
  6602. character-based, nongraphical user interfaces; usually they are written in a 
  6603. nonobject-oriented language, such as C or COBOL. 
  6604.  
  6605.  
  6606. ΓòÉΓòÉΓòÉ <hidden> loaded ΓòÉΓòÉΓòÉ
  6607.  
  6608. The state of the mouse pointer between the time you select a part from the 
  6609. parts palette and deposit the part on the free-form surface. 
  6610.  
  6611.  
  6612. ΓòÉΓòÉΓòÉ <hidden> main part ΓòÉΓòÉΓòÉ
  6613.  
  6614. The part that users see when they start an application. This is the part from 
  6615. which the main() function C++ code for the application is generated. 
  6616.  
  6617. The main part is a special kind of composite part. 
  6618.  
  6619. See also  part and  subpart. 
  6620.  
  6621.  
  6622. ΓòÉΓòÉΓòÉ <hidden> member ΓòÉΓòÉΓòÉ
  6623.  
  6624. A data object in a structure or a union. 
  6625.  
  6626. In C++, classes and structures can also contain functions and types as members. 
  6627.  
  6628.  
  6629. ΓòÉΓòÉΓòÉ <hidden> member function ΓòÉΓòÉΓòÉ
  6630.  
  6631. An operator or function that is declared as a member of a class. A member 
  6632. function has access to the private and protected data members and member 
  6633. functions of objects of its class. 
  6634.  
  6635.  
  6636. ΓòÉΓòÉΓòÉ <hidden> member function call ΓòÉΓòÉΓòÉ
  6637.  
  6638. A communication from one object to another that requests the receiving object 
  6639. to execute a member function. 
  6640.  
  6641. A member function call consists of a member function name that indicates the 
  6642. requested member function and the arguments to be used in executing the member 
  6643. function. The member function call always returns some object to the requesting 
  6644. object as the result of performing the member function. 
  6645.  
  6646. Synonym for  message. 
  6647.  
  6648.  
  6649. ΓòÉΓòÉΓòÉ <hidden> member function name ΓòÉΓòÉΓòÉ
  6650.  
  6651. The component of a member function call that specifies the requested operation. 
  6652.  
  6653.  
  6654. ΓòÉΓòÉΓòÉ <hidden> message ΓòÉΓòÉΓòÉ
  6655.  
  6656. A request from one object that the receiving object implement a member 
  6657. function. Because data is encapsulated and not directly accessible, a message 
  6658. is the only way to send data from one object to another. Each message specifies 
  6659. the name of the receiving object, the member function to be implemented, and 
  6660. any arguments the member function needs for implementation. 
  6661.  
  6662. Synonym for  member function call. 
  6663.  
  6664.  
  6665. ΓòÉΓòÉΓòÉ <hidden> model ΓòÉΓòÉΓòÉ
  6666.  
  6667. A nonvisual part that represents the state and behavior of a object, such as a 
  6668. customer or an account. 
  6669.  
  6670. Contrast with  view. 
  6671.  
  6672.  
  6673. ΓòÉΓòÉΓòÉ <hidden> module definition file ΓòÉΓòÉΓòÉ
  6674.  
  6675. A file that describes the code segments within a load module. 
  6676.  
  6677. Synonym for DEF file. 
  6678.  
  6679.  
  6680. ΓòÉΓòÉΓòÉ <hidden> nested class ΓòÉΓòÉΓòÉ
  6681.  
  6682. A class defined within the scope of another class. 
  6683.  
  6684.  
  6685. ΓòÉΓòÉΓòÉ <hidden> nonvisual part ΓòÉΓòÉΓòÉ
  6686.  
  6687. A part that has no visual representation at run time. A nonvisual part 
  6688. typically represents some real-world object that exists in the business 
  6689. environment. 
  6690.  
  6691. Compare to  model. Contrast with  view and  visual part. 
  6692.  
  6693.  
  6694. ΓòÉΓòÉΓòÉ <hidden> no-event attribute ΓòÉΓòÉΓòÉ
  6695.  
  6696. An attribute that does not have an event identifier. 
  6697.  
  6698.  
  6699. ΓòÉΓòÉΓòÉ <hidden> no-set attribute ΓòÉΓòÉΓòÉ
  6700.  
  6701. An attribute that does not have a set member function. 
  6702.  
  6703.  
  6704. ΓòÉΓòÉΓòÉ <hidden> notebook part ΓòÉΓòÉΓòÉ
  6705.  
  6706. A visual part that resembles a bound notebook containing pages separated into 
  6707. sections by tabbed divider pages. A user can turn the pages of a notebook or 
  6708. select the tabs to move from one section to another. 
  6709.  
  6710.  
  6711. ΓòÉΓòÉΓòÉ <hidden> object ΓòÉΓòÉΓòÉ
  6712.  
  6713. A computer representation of something that a user can work with to perform a 
  6714. task. An object can appear as text or an icon. 
  6715.  
  6716. A collection of data and member functions that operate on that data, which 
  6717. together represent a logical entity in the system. In object-oriented 
  6718. programming, objects are grouped into classes that share common data 
  6719. definitions and member functions. Each object in the class is said to be an 
  6720. instance of the class. 
  6721.  
  6722. An instance of an object class consisting of attributes, a data structure, and 
  6723. operational member functions. It can represent a person, place, thing, event, 
  6724. or concept. Each instance has the same properties, attributes, and member 
  6725. functions as other instances of the object class, though it has unique values 
  6726. assigned to its attributes. 
  6727.  
  6728.  
  6729. ΓòÉΓòÉΓòÉ <hidden> object class ΓòÉΓòÉΓòÉ
  6730.  
  6731. A template for defining the attributes and member functions of an object. An 
  6732. object class can contain other object classes. An individual representation of 
  6733. an object class is called an object. 
  6734.  
  6735.  
  6736. ΓòÉΓòÉΓòÉ <hidden> object factory ΓòÉΓòÉΓòÉ
  6737.  
  6738. A nonvisual part capable of dynamically creating new instances of a specified 
  6739. part. For example, during the execution of an application, an object factory 
  6740. can create instances of a new class to collect the data being generated. 
  6741.  
  6742.  
  6743. ΓòÉΓòÉΓòÉ <hidden> object-oriented programming ΓòÉΓòÉΓòÉ
  6744.  
  6745. A programming approach based on the concepts of data abstraction and 
  6746. inheritance. Unlike procedural programming techniques, object-oriented 
  6747. programming concentrates on those data objects that comprise the problem and 
  6748. how they are manipulated, not on how something is accomplished. 
  6749.  
  6750.  
  6751. ΓòÉΓòÉΓòÉ <hidden> observer ΓòÉΓòÉΓòÉ
  6752.  
  6753. An object that receives notification from a notifier object. 
  6754.  
  6755.  
  6756. ΓòÉΓòÉΓòÉ <hidden> operation ΓòÉΓòÉΓòÉ
  6757.  
  6758. A member function or service that can be requested of an object. 
  6759.  
  6760.  
  6761. ΓòÉΓòÉΓòÉ <hidden> overloading ΓòÉΓòÉΓòÉ
  6762.  
  6763. An object-oriented programming technique that allows you to redefine functions 
  6764. and most standard C++ operators when the functions and operators are used with 
  6765. class types. 
  6766.  
  6767.  
  6768. ΓòÉΓòÉΓòÉ <hidden> palette ΓòÉΓòÉΓòÉ
  6769.  
  6770. See  parts palette. 
  6771.  
  6772.  
  6773. ΓòÉΓòÉΓòÉ <hidden> parameter connection ΓòÉΓòÉΓòÉ
  6774.  
  6775. A connection that satisfies a parameter of an action or member function by 
  6776. supplying either an attribute's value or the return value of an action, member 
  6777. function, or custom logic. The parameter is always the source of the 
  6778. connection. 
  6779.  
  6780. See also  connection. 
  6781.  
  6782.  
  6783. ΓòÉΓòÉΓòÉ <hidden> parent class ΓòÉΓòÉΓòÉ
  6784.  
  6785. The class from which another part or class inherits data, member functions, or 
  6786. both. 
  6787.  
  6788.  
  6789. ΓòÉΓòÉΓòÉ <hidden> part ΓòÉΓòÉΓòÉ
  6790.  
  6791. A self-contained software object with a standardized public interface, 
  6792. consisting of a set of external features that allow the part to interact with 
  6793. other parts. A part is implemented as a class that supports the INotifier 
  6794. protocol and has a part interface defined. 
  6795.  
  6796. The parts on the palette can be used as templates to create instances or 
  6797. objects. 
  6798.  
  6799.  
  6800. ΓòÉΓòÉΓòÉ <hidden> part event ΓòÉΓòÉΓòÉ
  6801.  
  6802. A representation of a change that occurs to a part. The events on a part's 
  6803. interface enable other interested parts to receive notification when something 
  6804. about the part changes. For example, a push button generates an event signaling 
  6805. that it has been clicked, which might cause another part to display a window. 
  6806.  
  6807.  
  6808. ΓòÉΓòÉΓòÉ <hidden> part event ID ΓòÉΓòÉΓòÉ
  6809.  
  6810. The name of a part static-data member used to identify which notification is 
  6811. being signaled. 
  6812.  
  6813.  
  6814. ΓòÉΓòÉΓòÉ <hidden> part interface ΓòÉΓòÉΓòÉ
  6815.  
  6816. A set of external features that allows a part to interact with other parts. A 
  6817. part's interface is made up of three characteristics: attributes, actions, and 
  6818. events. 
  6819.  
  6820.  
  6821. ΓòÉΓòÉΓòÉ <hidden> Part Interface Editor ΓòÉΓòÉΓòÉ
  6822.  
  6823. An editor that the application developer uses to create and modify attributes, 
  6824. actions, and events, which together make up the interface of a part. 
  6825.  
  6826. Compare to  Class Editor and  Composition Editor. 
  6827.  
  6828.  
  6829. ΓòÉΓòÉΓòÉ <hidden> parts palette ΓòÉΓòÉΓòÉ
  6830.  
  6831. The parts palette holds a collection of visual and nonvisual parts used in 
  6832. building additional parts for an application. The parts palette is organized 
  6833. into categories. Application developers can add parts to the palette for use in 
  6834. defining applications or other parts. 
  6835.  
  6836.  
  6837. ΓòÉΓòÉΓòÉ <hidden> preferred features ΓòÉΓòÉΓòÉ
  6838.  
  6839. A subset of the part's features that appear in a pop-up connection menu. 
  6840. Generally, they are the features used most often. 
  6841.  
  6842.  
  6843. ΓòÉΓòÉΓòÉ <hidden> primary selection ΓòÉΓòÉΓòÉ
  6844.  
  6845. In the Composition Editor, the part used as a base for an action that affects 
  6846. several parts. For example, an alignment tool will align all selected parts 
  6847. with the primary selection. Primary selection is indicated by closed (solid) 
  6848. selection handles, while the other selected parts have open selection handles. 
  6849.  
  6850. See also  selection handles. 
  6851.  
  6852.  
  6853. ΓòÉΓòÉΓòÉ <hidden> private ΓòÉΓòÉΓòÉ
  6854.  
  6855. Pertaining to a class member that is accessible only to member functions and 
  6856. friends of that class. 
  6857.  
  6858.  
  6859. ΓòÉΓòÉΓòÉ <hidden> process ΓòÉΓòÉΓòÉ
  6860.  
  6861. A program running under OS/2, along with the resources associated with it 
  6862. (memory, threads, file system resources, and so on). 
  6863.  
  6864.  
  6865. ΓòÉΓòÉΓòÉ <hidden> program ΓòÉΓòÉΓòÉ
  6866.  
  6867. One or more files containing a set of instructions conforming to a particular 
  6868. programming language syntax. 
  6869.  
  6870. A self-contained, executable module. Multiple copies of the same program can be 
  6871. run in different processes. 
  6872.  
  6873.  
  6874. ΓòÉΓòÉΓòÉ <hidden> protected ΓòÉΓòÉΓòÉ
  6875.  
  6876. Pertaining to a class member that is only accessible to member functions and 
  6877. friends of that class, or to member functions and friends of classes derived 
  6878. from that class. 
  6879.  
  6880.  
  6881. ΓòÉΓòÉΓòÉ <hidden> prototype ΓòÉΓòÉΓòÉ
  6882.  
  6883. A function declaration or definition that includes both the return type of the 
  6884. function and the types of its arguments. 
  6885.  
  6886.  
  6887. ΓòÉΓòÉΓòÉ <hidden> primitive part ΓòÉΓòÉΓòÉ
  6888.  
  6889. A basic building block of other parts. A primitive part can be relatively 
  6890. complex in terms of the function it provides. 
  6891.  
  6892.  
  6893. ΓòÉΓòÉΓòÉ <hidden> process ΓòÉΓòÉΓòÉ
  6894.  
  6895. A collection of code, data, and other system resources, including at least one 
  6896. thread of execution, that performs a data processing task. 
  6897.  
  6898.  
  6899. ΓòÉΓòÉΓòÉ <hidden> property ΓòÉΓòÉΓòÉ
  6900.  
  6901. A unique characteristic of a part. 
  6902.  
  6903.  
  6904. ΓòÉΓòÉΓòÉ <hidden> pure virtual function ΓòÉΓòÉΓòÉ
  6905.  
  6906. A virtual function that has a function definition of = 0;. 
  6907.  
  6908.  
  6909. ΓòÉΓòÉΓòÉ <hidden> receiver ΓòÉΓòÉΓòÉ
  6910.  
  6911. The object that receives a member function call. 
  6912.  
  6913. Contrast with  caller. 
  6914.  
  6915.  
  6916. ΓòÉΓòÉΓòÉ <hidden> resource file ΓòÉΓòÉΓòÉ
  6917.  
  6918. A file that contains data used by an application, such as text strings and 
  6919. icons. 
  6920.  
  6921.  
  6922. ΓòÉΓòÉΓòÉ <hidden> selection handles ΓòÉΓòÉΓòÉ
  6923.  
  6924. In the Composition Editor, small squares that appear on the corners of a 
  6925. selected visual part. Selection handles are used to resize parts. 
  6926.  
  6927. See also  primary selection. 
  6928.  
  6929.  
  6930. ΓòÉΓòÉΓòÉ <hidden> server ΓòÉΓòÉΓòÉ
  6931.  
  6932. A computer that provides services to multiple users or workstations in a 
  6933. network; for example, a file server, a print server, or a mail server. 
  6934.  
  6935.  
  6936. ΓòÉΓòÉΓòÉ <hidden> service ΓòÉΓòÉΓòÉ
  6937.  
  6938. A specific behavior that an object is responsible for exhibiting. 
  6939.  
  6940.  
  6941. ΓòÉΓòÉΓòÉ <hidden> settings view ΓòÉΓòÉΓòÉ
  6942.  
  6943. A view of a part that provides a way to display and set the attributes and 
  6944. options associated with the part. 
  6945.  
  6946.  
  6947. ΓòÉΓòÉΓòÉ <hidden> sticky ΓòÉΓòÉΓòÉ
  6948.  
  6949. In the Composition Editor, the mode that enables you to add multiple parts of 
  6950. the same class (for example, three push buttons) without going back and forth 
  6951. between the parts palette and the free-form surface. 
  6952.  
  6953.  
  6954. ΓòÉΓòÉΓòÉ <hidden> structure ΓòÉΓòÉΓòÉ
  6955.  
  6956. A construct that contains an ordered group of data objects. Unlike an array, 
  6957. the data objects within a structure can have varied data types. 
  6958.  
  6959.  
  6960. ΓòÉΓòÉΓòÉ <hidden> subpart ΓòÉΓòÉΓòÉ
  6961.  
  6962. A part that is used to create another part. 
  6963.  
  6964. See also  nonvisual part, part, and  visual part. 
  6965.  
  6966.  
  6967. ΓòÉΓòÉΓòÉ <hidden> superclass ΓòÉΓòÉΓòÉ
  6968.  
  6969. See  abstract class and  base class. 
  6970.  
  6971.  
  6972. ΓòÉΓòÉΓòÉ <hidden> tear-off attribute ΓòÉΓòÉΓòÉ
  6973.  
  6974. An attribute that an application developer has exposed to work with as though 
  6975. it were a stand-alone part. 
  6976.  
  6977.  
  6978. ΓòÉΓòÉΓòÉ <hidden> template ΓòÉΓòÉΓòÉ
  6979.  
  6980. A family of classes or functions with variable types. 
  6981.  
  6982.  
  6983. ΓòÉΓòÉΓòÉ <hidden> thread ΓòÉΓòÉΓòÉ
  6984.  
  6985. A unit of execution within a process. 
  6986.  
  6987.  
  6988. ΓòÉΓòÉΓòÉ <hidden> tool bar ΓòÉΓòÉΓòÉ
  6989.  
  6990. The strip of icons along the top of the free-form surface. The tool bar 
  6991. contains tools to help you construct composite parts. 
  6992.  
  6993.  
  6994. ΓòÉΓòÉΓòÉ <hidden> UI ΓòÉΓòÉΓòÉ
  6995.  
  6996. See  user interface. 
  6997.  
  6998.  
  6999. ΓòÉΓòÉΓòÉ <hidden> unloaded ΓòÉΓòÉΓòÉ
  7000.  
  7001. The state of the mouse pointer before you select a part from the parts palette 
  7002. and after you deposit a part on the free-form surface. In addition, you can 
  7003. unload the mouse pointer by pressing the Esc key. 
  7004.  
  7005.  
  7006. ΓòÉΓòÉΓòÉ <hidden> user interface (UI) ΓòÉΓòÉΓòÉ
  7007.  
  7008. The hardware, software, or both that enable a user to interact with a computer. 
  7009.  
  7010. The term user interface normally refers to the visual presentation and its 
  7011. underlying software with which a user interacts. 
  7012.  
  7013.  
  7014. ΓòÉΓòÉΓòÉ <hidden> variable ΓòÉΓòÉΓòÉ
  7015.  
  7016. A storage place within an object for a data feature. The data feature is an 
  7017. object, such as number or date, stored as an attribute of the containing 
  7018. object. 
  7019.  
  7020. A part that receives an identity at run time. A variable by itself contains no 
  7021. data or program logic; it must be connected such that it receives runtime 
  7022. identity from a part elsewhere in the application. 
  7023.  
  7024.  
  7025. ΓòÉΓòÉΓòÉ <hidden> view ΓòÉΓòÉΓòÉ
  7026.  
  7027. A visual part, such as a window, push button, or entry field. 
  7028.  
  7029. A visual representation that can display and change the underlying model 
  7030. objects of an application. Views are both the end result of developing an 
  7031. application and the basic unit of composition of user interfaces. 
  7032.  
  7033. Compare to  visual part. Contrast with  model. 
  7034.  
  7035.  
  7036. ΓòÉΓòÉΓòÉ <hidden> virtual function ΓòÉΓòÉΓòÉ
  7037.  
  7038. A function of a class that is declared with the keyword virtual. The 
  7039. implementation that is executed when you make a call to a virtual function 
  7040. depends on the type of the object for which it is called. This is determined at 
  7041. run time. 
  7042.  
  7043.  
  7044. ΓòÉΓòÉΓòÉ <hidden> visual part ΓòÉΓòÉΓòÉ
  7045.  
  7046. A part that has a visual representation at run time. Visual parts, such as 
  7047. windows, push buttons, and entry fields, make up the user interface of an 
  7048. application. 
  7049.  
  7050. Compare to  view. Contrast with  nonvisual part. 
  7051.  
  7052.  
  7053. ΓòÉΓòÉΓòÉ <hidden> visual programming tool ΓòÉΓòÉΓòÉ
  7054.  
  7055. A tool that provides a means for specifying programs graphically. Application 
  7056. programmers write applications by manipulating graphical representations of 
  7057. components. 
  7058.  
  7059.  
  7060. ΓòÉΓòÉΓòÉ <hidden> white space ΓòÉΓòÉΓòÉ
  7061.  
  7062. Space characters, tab characters, form-feed characters, and new-line 
  7063. characters. 
  7064.  
  7065.  
  7066. ΓòÉΓòÉΓòÉ <hidden> window ΓòÉΓòÉΓòÉ
  7067.  
  7068. A rectangular area of the screen with visible boundaries in which information 
  7069. is displayed. Windows can overlap on the screen, giving it the appearance of 
  7070. one window being on top of another. 
  7071.  
  7072. In the Composition Editor, a window is a part that can be used as a container 
  7073. for other visual parts, such as push buttons.