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

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About this Information ΓòÉΓòÉΓòÉ
  3.  
  4. The How Do I... information provides solutions to common tasks that you would 
  5. perform with the various components of VisualAge for C++. Before you begin to 
  6. use this information, it would be helpful to understand how to navigate through 
  7. it: 
  8.  
  9.      Use the Contents and Index facilities to locate topics. 
  10.      Use the Search facility to search the text of this document. 
  11.      Use hypertext links to acquire related information on the current topic. 
  12.       Hypertext links appear in a different color For example, below there are 
  13.       two lists of hypertext links. By double-clicking on the text of the link 
  14.       or by pressing Enter on a highlighted link, you will open a panel of 
  15.       related information. To shift the focus to other links using the 
  16.       keyboard, use the Tab key. 
  17.  
  18.  For more information on using this help facility, see: 
  19.  
  20.      How to Use the Contents 
  21.      How to Obtain Additional Information 
  22.      How to Access and Use IPF Facilities 
  23.  
  24.  For more information, see: 
  25.  
  26.      Other Information You Might Find Helpful 
  27.      Communicating Your Comments to IBM 
  28.      Notices 
  29.      Trademarks 
  30.  
  31.  
  32. ΓòÉΓòÉΓòÉ <hidden> How to Use the Contents ΓòÉΓòÉΓòÉ
  33.  
  34. The Contents window is the first to appear. Some topics have a plus ( ) icon 
  35. beside them. This icon indicates that additional topics are available. 
  36.  
  37. To expand the Contents if you are using a mouse, click on the plus ( ) icon. If 
  38. you are using the keyboard, use the Up or Down Arrow key to highlight the 
  39. topic, and press the plus (+) key. To see additional topics for a heading with 
  40. a plus ( ) icon, click on the icon or highlight that topic and press the plus 
  41. (+) key. 
  42.  
  43. To view a topic, double-click on the topic (or press the Up or Down Arrow key 
  44. to highlight the topic, and then press the Enter key). 
  45.  
  46.  
  47. ΓòÉΓòÉΓòÉ <hidden> How to Obtain Additional Information ΓòÉΓòÉΓòÉ
  48.  
  49. After you select a topic, the information for that topic appears in a window. 
  50. Highlighted words or phrases indicate that additional information is available. 
  51. Certain words and phrases are highlighted in a different color from the 
  52. surrounding text. These are called hypertext terms. 
  53.  
  54. If you are using a mouse, double-click on the highlighted word. If you are 
  55. using a keyboard, press the Tab key to move to the highlighted word, and then 
  56. press the Enter key. Additional information then appears in a window. 
  57.  
  58.  
  59. ΓòÉΓòÉΓòÉ <hidden> How to Access and Use IPF Facilities ΓòÉΓòÉΓòÉ
  60.  
  61. Several choices are available for managing the information presented in this 
  62. document. There are three PullDown menus: the Services menu, the Options menu, 
  63. and the Help menu. 
  64.  
  65. The actions that are selectable from the Services menu operate on the active 
  66. window currently displayed on the screen. These actions include the following: 
  67.  
  68.  Placing Bookmarks 
  69.    You can set a placeholder so you can retrieve information of interest to 
  70.    you. 
  71.  
  72.  Searching for Information 
  73.    You can find occurrences of a word or phrase in the current topic, selected 
  74.    topics, or all topics. 
  75.  
  76.  Printing Information 
  77.    You can print one or more topics. You can also print a set of topics by 
  78.    first marking the topics in the Contents list. 
  79.  
  80.  Copying Information to a File 
  81.    You can copy a topic that you are viewing to the System Clipboard or to a 
  82.    file that you can edit. This method is particularly useful for copying 
  83.    syntax definitions and program samples into the application that you are 
  84.    developing. 
  85.  
  86.  Using the actions that are selectable from the Options menu, you can change 
  87.  the way your Contents list is displayed. To expand the Contents and show all 
  88.  levels for all topics, choose Expand all from the Options PullDown menu. You 
  89.  can also press the Ctrl, Shift and * keys together. 
  90.  
  91.  The actions that are selectable from the Help menu allow you to select 
  92.  different types of help information. 
  93.  
  94.  For information about any of the menu choices, highlight the choice in the 
  95.  menu and press F1. 
  96.  
  97.  
  98. ΓòÉΓòÉΓòÉ <hidden> Placing Bookmarks ΓòÉΓòÉΓòÉ
  99.  
  100. When you place a bookmark on a topic, it is added to a list of bookmarks you 
  101. have previously set.  You can view the list, and you can remove one or all 
  102. bookmarks from the list.  If you have not set any bookmarks, the list is empty. 
  103.  
  104. To set a bookmark, do the following: 
  105.  
  106.    1. Select a topic from the Contents. 
  107.    2. When that topic appears, select the Bookmark option from the Services 
  108.       menu. 
  109.    3. If you want to change the name used for the bookmark, type the new name 
  110.       in the field. 
  111.    4. Click on the Place radio button (or press the Up or Down Arrow key to 
  112.       select it). 
  113.    5. Click on OK (or select it and press Enter). The bookmark is then added to 
  114.       the bookmark list. 
  115.  
  116.  
  117. ΓòÉΓòÉΓòÉ <hidden> Searching for Information ΓòÉΓòÉΓòÉ
  118.  
  119. You can specify a word or phrase to be searched.  You can also limit the search 
  120. to a set of topics by first marking the topics in the Contents list. 
  121.  
  122. To search for a word or phrase in all topics, do the following: 
  123.  
  124.    1. Select the Search option from the Services menu. 
  125.    2. Type the word or words to be searched for. 
  126.    3. Click on All sections (or press the Up or Down Arrow keys to select it). 
  127.    4. Click on Search (or select it and press Enter) to begin the search. 
  128.    5. The list of topics where the word or phrase appears is displayed. 
  129.  
  130.  
  131. ΓòÉΓòÉΓòÉ <hidden> Printing Information ΓòÉΓòÉΓòÉ
  132.  
  133. You can print one or more topics, the index, or the table of contents.  Make 
  134. sure that your printer is connected to the serial port, configured correctly, 
  135. and ready for input. To print: 
  136.  
  137.    1. Select Print from the Services menu. 
  138.    2. Select what you want to print. Note that the This section and Marked 
  139.       sections choices are only available if you are viewing a topic or if you 
  140.       have marked topics, respectively.  To mark topics in the table of 
  141.       contents, press the Ctrl key and click on the topics, or use the arrow 
  142.       keys. 
  143.    3. Select Print to print what you've chosen on your printer. 
  144.  
  145.  
  146. ΓòÉΓòÉΓòÉ <hidden> Copying Information to a File ΓòÉΓòÉΓòÉ
  147.  
  148. You can copy a topic that you are viewing in two ways: 
  149.  
  150.      Copy copies the topic that you are viewing into the System Clipboard. If 
  151.       you are using an editor that copies or cuts (or both) to the System 
  152.       Clipboard, and pastes to the System Clipboard, you can easily add the 
  153.       copied information to your program source module. 
  154.  
  155.      Copy to file copies the topic that you are viewing into a temporary file 
  156.       named TEXT.TMP. You can later edit that file by using any editor. 
  157.       TEXT.TMP is placed in the directory where your viewable document resides. 
  158.       This copy function does not apply if you are viewing the document from 
  159.       the CD-ROM. 
  160.  
  161.  To copy a topic, do the following: 
  162.  
  163.    1. Expand the Contents list and select a topic. 
  164.    2. When the topic appears, select Copy to file from the Services menu. 
  165.    3. The system puts the text pertaining to that topic into the temporary file 
  166.       TEXT.TMP. 
  167.  
  168.  
  169. ΓòÉΓòÉΓòÉ <hidden> Other Information You Might Find Helpful ΓòÉΓòÉΓòÉ
  170.  
  171. The VisualAge for C++ provides a number of online guides and references that we 
  172. hope you'll find helpful as you develop applications. This information 
  173. includes: 
  174.  
  175.      User's Guide information provides conceptual and usage information, 
  176.      Reference information is organized for quick access, and 
  177.      How Do I... information gives you specific instructions for performing 
  178.       common tasks. 
  179.  
  180.  You can get to this online information from the Information folder inside the 
  181.  main product folder. You can also get to it from the Help menu in any of the 
  182.  components of the product. 
  183.  
  184.  
  185. ΓòÉΓòÉΓòÉ <hidden> Communicating Your Comments to IBM ΓòÉΓòÉΓòÉ
  186.  
  187. If there is something you like, or dislike, about this document, please let us 
  188. know. You can use one of the methods listed below to send your comments to IBM. 
  189. Please be sure to include the complete title of the publication that you are 
  190. commenting on. For example, you would refer to the How Do I... information for 
  191. the Browser as: 
  192.   VisualAge for C++ Browser: How Do I... for Windows. 
  193.  
  194. The comments you send should only pertain to the information in this document 
  195. and its presentation. To request additional publications or to ask questions or 
  196. make comments about the functions of IBM products or systems, you should talk 
  197. to your IBM representative or your authorized IBM remarketer. 
  198.  
  199. When you send comments to IBM, you grant IBM a nonexclusive right to use or 
  200. distribute your comments in any way it believes appropriate without incurring 
  201. any obligation to you. 
  202.  
  203. You can send your comments to IBM in the following ways: 
  204.  
  205.      By mail to the following address: 
  206.  
  207.             IBM Canada Ltd. Laboratory
  208.             Information Development
  209.             2G/345/1150/TOR
  210.             1150 EGLINTON AVENUE EAST
  211.             NORTH YORK, ONTARIO
  212.             CANADA M3C 1H7
  213.  
  214.      By FAX to the following number: 
  215.  
  216.         -  United States and Canada: (416) 448-6161 
  217.         -  Other countries (+1) 416-448-6161 
  218.  
  219.      By electronic mail to one of the following IDs.  Be sure to include your 
  220.       entire network address if you wish to get a reply. 
  221.  
  222.         -  Internet: torrcf@vnet.ibm.com 
  223.         -  IBMLink: toribm(torrcf) 
  224.         -  IBM/PROFS: torolab4(torrcf) 
  225.         -  IBMMAIL: ibmmail(caibmwt9) 
  226.  
  227.  
  228. ΓòÉΓòÉΓòÉ <hidden> Notices ΓòÉΓòÉΓòÉ
  229.  
  230. (C) Copyright International Business Machines Corporation, 1995, 1996.  All 
  231. rights reserved. 
  232.  
  233. Note to U.S. Government Users - Documentation related to restricted rights - 
  234. Use, duplication, or disclosure is subject to restrictions set forth in GSA ADP 
  235. Schedule Contract with IBM Corp. 
  236.  
  237. This edition applies to Version 3.5 of IBM VisualAge for C++ for Windows 
  238. (33H4979, 33H4980) and to all subsequent releases and modifications until 
  239. otherwise indicated in new editions.  Make sure you are using the correct 
  240. edition for the level of the product. 
  241.  
  242. This publication could include technical inaccuracies or typographical errors. 
  243. Changes are periodically made to the information herein; any such changes will 
  244. be reported in subsequent revisions. 
  245.  
  246. Requests for publications and for technical information about IBM products 
  247. should be made to your IBM Authorized Dealer or your IBM Marketing 
  248. Representative. 
  249.  
  250. When you send information to IBM, you grant IBM a nonexclusive right to use or 
  251. distribute the information in any ways it believes appropriate without 
  252. incurring any obligation to you. 
  253.  
  254. Any reference to an IBM licensed program in this publication is not intended to 
  255. state or imply that only IBM's licensed program may be used. Any functionally 
  256. equivalent product, program, or service that does not infringe any of IBM's 
  257. intellectual property rights may be used instead of the IBM product, program, 
  258. or service. Evaluation and verification of operation in conjunction with other 
  259. products, except  those expressly designated by IBM, is the user's 
  260. responsibility. 
  261.  
  262. IBM may have patents or pending patent applications covering subject matter in 
  263. this document.  The furnishing of this document does not give you any license 
  264. to these patents.  You can send license inquiries, in writing, to the IBM 
  265. Director of Licensing. IBM Corporation, 500 Columbus Avenue, Thornwood, NY, 
  266. 10594, USA. 
  267.  
  268. This publication contains examples of data and reports used in daily business 
  269. operations. To illustrate them as completely as possible, the examples include 
  270. the names of individuals, companies, brands, and products. All of these names 
  271. are fictitious and any similarity to the names and addresses used by an actual 
  272. business enterprise is entirely coincidental. 
  273.  
  274.  
  275. ΓòÉΓòÉΓòÉ <hidden> Trademarks and Service Marks ΓòÉΓòÉΓòÉ
  276.  
  277. The following terms used in this publication are trademarks or service marks of 
  278. IBM Corporation in the United States or other countries: 
  279.  
  280.  IBM                      Personal System/2 
  281.  PS/2                     VisualAge 
  282.  WorkFrame 
  283.  
  284.  Windows is a trademark of Microsoft Corporation. 
  285.  
  286.  Other company, product, and service names, which may be denoted by a double 
  287.  asterisk(**), may be trademarks or service marks of others. 
  288.  
  289.  IBM's VisualAge products and services are not associated with or sponsored by 
  290.  Visual Edge Software, Ltd.. 
  291.  
  292.  
  293. ΓòÉΓòÉΓòÉ 2. Create a simple Visual Builder application ΓòÉΓòÉΓòÉ
  294.  
  295. Creating the To-Do List application consists of the following steps: 
  296.  
  297.    1. Starting Visual Builder for the To-Do List application 
  298.    2. Creating a new visual part for the To-Do List application 
  299.    3. Placing parts in the application window 
  300.    4. Resizing and aligning the parts 
  301.    5. Connecting the parts 
  302.    6. Generating the C++ code for your application 
  303.    7. Building the application 
  304.    8. Running the application 
  305.    9. Exiting the Composition Editor and Visual Builder 
  306.  
  307.  
  308. ΓòÉΓòÉΓòÉ 2.1. Start Visual Builder for the To-Do List application ΓòÉΓòÉΓòÉ
  309.  
  310. Before you create the To-Do List application, start Visual Builder. For this 
  311. sample application, start Visual Builder from the Tools folder, as follows: 
  312.  
  313.    1. Double-click on the VisualAge for C++ folder icon on your desktop. The 
  314.       VisualAge for C++ folder opens. 
  315.  
  316.    2. Double-click on the Tools folder icon. The Tools folder opens. 
  317.  
  318.    3. Double-click on the Visual Builder icon. Visual Builder displays the 
  319.       Visual Builder window, as shown in the following figure. 
  320.  
  321.  Next, you can create a new visual part for the To-Do List application. 
  322.  
  323.  
  324. ΓòÉΓòÉΓòÉ 2.2. Create a new visual part for the To-Do List application ΓòÉΓòÉΓòÉ
  325.  
  326. The next thing to do when creating the To-Do List application is to create the 
  327. main part, a new visual part, as follows: 
  328.  
  329.    1. Select PartNew. Visual Builder displays the Part-New window, as shown in 
  330.       the following figure: 
  331.  
  332.       The Part-New window provides the following fields in which you can enter 
  333.       information about your part: 
  334.  
  335.           The Class name field, where you enter the name of your part. Each 
  336.            composite part must have a name. 
  337.  
  338.            For the To-Do List application, enter the following: 
  339.  
  340.            ToDoList 
  341.  
  342.           The Description field, where you enter a description of your part. 
  343.  
  344.            For this example, enter the following: 
  345.  
  346.            The To-Do List application 
  347.  
  348.           The File name field, where you enter the name of the .vbb file in 
  349.            which you want Visual Builder to store your part. 
  350.  
  351.            For this example, you can either leave this field blank or enter the 
  352.            following: 
  353.  
  354.            todolist.vbb 
  355.  
  356.            This causes Visual Builder to store the ToDoList part in a file 
  357.            named todolist.vbb. If you leave this field blank, Visual Builder 
  358.            uses the part name as the name of the .vbb file by default, so the 
  359.            result is the same. 
  360.  
  361.           The Part type field, where you indicate the type of part. This field 
  362.            initially contains Visual part. But you can specify a different type 
  363.            of part to create by selecting one from the field's drop-down list 
  364.            box. 
  365.  
  366.            For this example, do not select a different part type because you 
  367.            want to create a visual part for the To-Do List application. 
  368.  
  369.           The Base class field, where you specify the class that you want to 
  370.            be the base class for the part you are creating. The base class is 
  371.            the part from which your part inherits attributes, events, and 
  372.            actions. The Base class field contains the default base class name 
  373.            of IFrameWindow, which Visual Builder uses when you specify that you 
  374.            want to create a new visual part. 
  375.  
  376.            For this example, leave IFrameWindow as the base class. 
  377.  
  378.    2. Select the Open push button to create a visual part named ToDoList whose 
  379.       parent is IFrameWindow. This causes Visual Builder to display the 
  380.       Composition Editor. 
  381.  
  382.  If you look back at the Visual Builder window, you see that the file 
  383.  todolist.vbb is now included in the list of loaded files. This file was 
  384.  created for you when you selected the Open push button in the Part-New window. 
  385.  
  386.  Before you place any parts in the application window, first edit its title. 
  387.  
  388.  Changing the title of the To-Do List application window 
  389.  
  390.  The new visual part that you just created contains an IFrameWindow* part. This 
  391.  will be the To-Do List application window. Change the title of this window by 
  392.  doing the following: 
  393.  
  394.    1. Double-click on the part. The part settings notebook for the part opens. 
  395.  
  396.    2. Enter the new title text in the Title text field, such as To-Do List. 
  397.  
  398.    3. Click on Apply. 
  399.  
  400.  
  401. ΓòÉΓòÉΓòÉ 2.3. Place parts in the application window ΓòÉΓòÉΓòÉ
  402.  
  403. After creating your new visual part and editing the title of the application 
  404. window, you can place the other parts of the To-Do List application in the 
  405. application window. 
  406.  
  407. Placing a static text part in the window 
  408.  
  409. The To-Do List application needs two static text parts. Follow these steps to 
  410. place the first static text part in the To-Do List application window: 
  411.  
  412.    1. Select , the Data entry category, from the row of icons on the left-hand 
  413.       side of the parts palette. 
  414.  
  415.    2. Select , the IStaticText* icon, from the row of icons on the right-hand 
  416.       side of the parts palette. When you move the mouse pointer over the 
  417.       free-form surface, you see that it has changed to crosshairs. This means 
  418.       the mouse pointer is loaded with the IStaticText* part. 
  419.  
  420.    3. Place the crosshairs in the upper-left corner of the To-Do List 
  421.       application window's client area and click mouse button 1. A static text 
  422.       part is placed in the window. 
  423.  
  424.    4. Change the text of the static text part to To-do item. Use the same 
  425.       method for changing text that you learned previously when you changed the 
  426.       title of the To-Do List application window. 
  427.  
  428.  Placing an entry field in the window 
  429.  
  430.  The To-Do List application needs an entry field part. Follow these steps to 
  431.  place an entry field part in the To-Do List application window: 
  432.  
  433.    1. Select , the Data entry category, from the row of icons on the left-hand 
  434.       side of the parts palette. 
  435.  
  436.    2. Select , the IEntryField* icon, from the row of icons on the right-hand 
  437.       side of the parts palette. 
  438.  
  439.    3. Place the crosshairs beneath the first static text part and click mouse 
  440.       button 1. The entry field part is placed beneath the static text part. 
  441.  
  442.  Placing another static text part in the window 
  443.  
  444.  The To-Do List application needs another static text part. Follow these steps 
  445.  to place and modify this part: 
  446.  
  447.    1. Place the second static text part in the To-Do List application window. 
  448.       Use the same method for placing a static text part that you learned 
  449.       previously when you placed the first static text part in the To-Do List 
  450.       application window. 
  451.  
  452.    2. Change the text of the static text part to To-do list. Use the same 
  453.       method for changing text that you learned when you changed the title of 
  454.       the To-Do List application window. 
  455.  
  456.  Placing a list box in the window 
  457.  
  458.  Because the to-do list is to consist of a list of text strings, you want to 
  459.  store that list in an IListBox* part. Follow these steps to place a list box 
  460.  part in the To-Do List application window: 
  461.  
  462.    1. Select , the Lists category, from the row of icons on the left-hand side 
  463.       of the parts palette. 
  464.  
  465.    2. Select , the IListBox* icon, from the row of icons that Visual Builder 
  466.       displays on the right-hand side of the parts palette. 
  467.  
  468.    3. Place the crosshairs below the second static text part and click mouse 
  469.       button 1. The list box part is placed beneath the second static text 
  470.       part. 
  471.  
  472.  Placing the push buttons in the window 
  473.  
  474.  The To-Do List application needs two push buttons, one for adding items to the 
  475.  list and one for removing items from the list. Follow these steps to place two 
  476.  push button parts in the To-Do List application window: 
  477.  
  478.    1. Select , the Buttons category, from the row of icons on the left-hand 
  479.       side of the parts palette. 
  480.  
  481.    2. Select , the IPushButton* icon, from the row of icons on the right-hand 
  482.       side of the parts palette. 
  483.  
  484.    3. Place the crosshairs below the lower-left corner of the list box and 
  485.       click mouse button 1. The first push button part is placed in the window. 
  486.  
  487.    4. Select the IPushButton* icon again. 
  488.  
  489.    5. Place the crosshairs to the right of the first push button and click 
  490.       mouse button 1. The second push button is placed in the window. 
  491.  
  492.    6. Change the text of the first push button to Add. Use the same method you 
  493.       used to change the text in the title bar. 
  494.  
  495.    7. Change the text of the second push button to Remove. 
  496.  
  497.  
  498. ΓòÉΓòÉΓòÉ 2.4. Size and align the parts ΓòÉΓòÉΓòÉ
  499.  
  500. Now that you have placed all of the parts you need in the application window, 
  501. it is time to resize and align them. When you have finished, your application 
  502. window should look like the following figure: 
  503.  
  504. Matching the width of the list box to the width of the entry field 
  505.  
  506. Follow these steps to match the width of the list box to the width of the entry 
  507. field: 
  508.  
  509.    1. Move the mouse pointer over the list box. 
  510.  
  511.    2. In OS/2, press and hold mouse button 1. In Windows, select the list box. 
  512.       The selection handles appear at the four corners of the list box. 
  513.  
  514.    3. In OS/2, while holding down mouse button 1, move the mouse pointer to the 
  515.       entry field. In Windows, while holding down the Shift key, select the 
  516.       entry field. The selection handles on the list box become round, and 
  517.       black selection handles appear on the four corners of the entry field. 
  518.       This means that both parts are selected, but the entry field is the 
  519.       anchor part. Therefore, any sizing actions performed using the tool bar 
  520.       cause the list box to match the size of its anchor part, the entry field. 
  521.  
  522.    4. Select , the Match Width tool, from the row of icons on the tool bar, 
  523.       located beneath the menu bar. The width of the list box changes to match 
  524.       that of the entry field. 
  525.  
  526.  Matching the width of the Add push button to that of the Remove push button 
  527.  
  528.  Using the techniques you learned in the preceding steps, match the width of 
  529.  the Add push button to that of the Remove push button. 
  530.  
  531.  Dragging and dropping parts in the application window 
  532.  
  533.  Before you align the parts, you might want to drag and drop some of them to 
  534.  put them in closer proximity to each other. For example, you might want the 
  535.  static text parts to be closer to the parts that they label. Follow these 
  536.  steps to drag and drop the parts in the application window: 
  537.  
  538.  Note:  The following instructions are written for dragging and dropping 
  539.         multiple parts simultaneously. If you just want to drag and drop one 
  540.         part at a time, you can skip the first step. 
  541.  
  542.    1. Select all of the parts you want to drag using the technique that you 
  543.       learned previously when matching the width of the list box to the width 
  544.       of the entry field. 
  545.  
  546.    2. Move the mouse pointer over one of the parts that you selected to drag. 
  547.  
  548.    3. Press and hold mouse button 2 in OS/2 or mouse button 1 in Windows and 
  549.       move the mouse cursor. Visual Builder displays an outline of the parts 
  550.       that you are dragging. 
  551.  
  552.    4. Move the outline to the place where you want to drop the parts and 
  553.       release the mouse button. The parts are moved to their new location. 
  554.  
  555.  Resizing the application window 
  556.  
  557.  At this point, the parts in the application window are closer to the left 
  558.  window border than to the right window border. Follow these steps to resize 
  559.  the application window: 
  560.  
  561.    1. Select the application window by clicking mouse button 1 on the title 
  562.       bar. 
  563.  
  564.    2. Move the mouse pointer over the selection handle on the lower-right 
  565.       corner of the application window. 
  566.  
  567.    3. Press and hold mouse button 1. 
  568.  
  569.    4. Resize the application window by dragging the mouse pointer towards the 
  570.       left until the right border of the application window is approximately 
  571.       the same distance from the entry field and list box as the left border 
  572.       is. 
  573.  
  574.            To size the window in only one direction, either horizontally or 
  575.            vertically, hold down the Shift key while dragging the mouse 
  576.            pointer. 
  577.  
  578.  Centering the entry field and list box within the application window 
  579.  
  580.  The entry field and list box need to be centered within the application 
  581.  window. Follow these steps to center them: 
  582.  
  583.    1. Select the entry field. 
  584.  
  585.    2. Select , the Distribute Horizontally tool, from the row of icons on the 
  586.       tool bar. Visual Builder centers the entry field between the left and 
  587.       right borders of the application window. 
  588.  
  589.    3. Select the list box and then the entry field, making the entry field the 
  590.       anchor part. Use the multiple part selection technique you learned 
  591.       previously. 
  592.  
  593.    4. Select , the Align Center tool, from the row of icons on the tool bar. 
  594.       The list box is centered beneath the entry field. 
  595.  
  596.  Aligning the static text, entry field, and list box parts so their left edges 
  597.  are even 
  598.  
  599.  The static parts need to be aligned evenly with the left edges of the entry 
  600.  field and list box. Follow these steps to align them: 
  601.  
  602.    1. Select the first static text part and then select the entry field, making 
  603.       the entry field the anchor part. Use the multiple part selection 
  604.       technique you learned previously. 
  605.  
  606.    2. Select , the Align Left tool, from the row of icons on the tool bar. The 
  607.       first static text part is aligned even with the left edge of the entry 
  608.       field. 
  609.  
  610.    3. Repeat steps 1 and 2 for the second static text part and the list box. 
  611.       The second static text part is aligned even with the left edge of the 
  612.       list box. 
  613.  
  614.  Aligning the top edges of the push buttons 
  615.  
  616.  The push buttons need to be aligned so that their top edges are even. Follow 
  617.  these steps to align them: 
  618.  
  619.    1. Select the Add push button and then select the Remove push button. Use 
  620.       the multiple part selection technique you learned previously. 
  621.  
  622.    2. Select , the Align Top tool. Visual Builder aligns the Add push button 
  623.       even with the top of the Remove push button. 
  624.  
  625.  Centering the push buttons between the bottom edge of the list box and the 
  626.  bottom border of the application window 
  627.  
  628.  The push buttons need to be centered between the bottom edge of the list box 
  629.  and the bottom border of the application window. Follow these steps to center 
  630.  them: 
  631.  
  632.    1. Select both push buttons. You can make either push button the anchor 
  633.       part. Use the multiple part selection technique you learned previously. 
  634.  
  635.    2. Move the mouse pointer over either push button. 
  636.  
  637.    3. Press and hold mouse button 2 in OS/2 or mouse button 1 in Windows and 
  638.       position the push buttons midway between the bottom edge of the list box 
  639.       and the bottom window border. 
  640.  
  641.    4. When the push buttons are in place, release the mouse button. 
  642.  
  643.  Your application should now look like the one shown in the following figure: 
  644.  
  645.  Spacing the push buttons evenly across the application window 
  646.  
  647.  The push buttons need to be evenly spaced across the width of the application 
  648.  window. Follow these steps to space them: 
  649.  
  650.    1. Select both push buttons. You can make either push button the anchor 
  651.       part. Use the multiple part selection technique you learned previously. 
  652.  
  653.    2. Select , the Distribute Horizontally tool. Visual Builder spaces both 
  654.       push buttons evenly across the application window. 
  655.  
  656.  
  657. ΓòÉΓòÉΓòÉ 2.5. Connect the parts ΓòÉΓòÉΓòÉ
  658.  
  659. You can now connect the parts so that your application can add items to and 
  660. remove items from the to-do list. You need to connect the push buttons to the 
  661. list box and entry field. The following steps show you how to do this. 
  662.  
  663. Connecting the Add push button to the list box 
  664.  
  665. The connection between the Add push button and the list box provides the 
  666. information your application needs to add items to the list box. 
  667.  
  668.    1. With the mouse pointer over the Add push button and click mouse button 2. 
  669.       A pop-up menu is displayed. 
  670.  
  671.    2. Select Connect. A cascaded menu, called the connection menu, of the Add 
  672.       push button is displayed. 
  673.  
  674.    3. Select the buttonClickEvent feature. Selecting the buttonClickEvent 
  675.       feature means that you want something to happen whenever a user clicks 
  676.       this push button. The mouse pointer changes to look like a spider, 
  677.       indicating that it is ready for you to select another feature. 
  678.  
  679.    4. Move the mouse pointer to the list box and click mouse button 1. A pop-up 
  680.       menu is displayed showing the connection menu of the list box. 
  681.  
  682.    5. Select the addAsLast action. Selecting the addAsLast action means that 
  683.       you want new items to be added to the end of the to-do list whenever a 
  684.       user clicks the Add push button. The connection is shown in the following 
  685.       figure: 
  686.  
  687.       The line connecting the Add push button to the list box is dark green. It 
  688.       points from the push button to the list box, showing that the event that 
  689.       occurs when the push button is selected will cause the list box to 
  690.       perform an action. 
  691.  
  692.       Notice that the connection line is dashed instead of solid. A dashed line 
  693.       means that the connection is incomplete. The connection is supposed to 
  694.       add something to the list box when the Add push button is clicked, but 
  695.       you have not yet supplied what needs to be added. The next step does 
  696.       that. 
  697.  
  698.    6. Move the mouse pointer to the dashed connection line between the Add push 
  699.       button and the list box. 
  700.  
  701.    7. To take a shortcut to display connection menus, hold down the Alt key, 
  702.       click mouse button 2, and release the Alt key immediately afterward. The 
  703.       pop-up menu for the connection is displayed. 
  704.  
  705.    8. Select the text parameter. The text parameter is the reason the 
  706.       connection line is dashed. You need to give this parameter a value. 
  707.  
  708.    9. Move the mouse pointer over the entry field, and click mouse button 1. 
  709.       Visual Builder displays the connection menu for the list box. 
  710.  
  711.   10. Select the text attribute. Selecting the text attribute here means that 
  712.       you want to pass the text that a user enters in the entry field to the 
  713.       text parameter of the addAsLast action. This text string is added to the 
  714.       end of the to-do list whenever the addAsLast action is called, which 
  715.       occurs whenever the Add push button is clicked. The completed connection 
  716.       is shown in the following figure: 
  717.  
  718.       The line connecting the entry field to the connection between the Add 
  719.       push button and the list box is violet. The solid arrow head points to 
  720.       the entry field, showing that the text attribute is the target of the 
  721.       connection. 
  722.  
  723.       The round arrow head points to the connection line, indicating that the 
  724.       text parameter of the addAsLast action is the source of the connection. 
  725.       When the text parameter needs a value, which occurs when a user clicks on 
  726.       the Add push button, the connection invokes the get member function of 
  727.       the entry field's text attribute. The value of that attribute (the text 
  728.       in the entry field) is returned to the text parameter and the addAsLast 
  729.       action puts the text string in the list box. 
  730.  
  731.       Notice that both of the connection lines are solid. This means that the 
  732.       connection between the Add push button and the list box now has the 
  733.       information it needs to perform its function, so the connection is 
  734.       complete. 
  735.  
  736.  Connecting the Remove push button to the list box 
  737.  
  738.  The connection between the Remove push button and the list box provides the 
  739.  information your application needs to remove items from the list box. 
  740.  
  741.    1. With the mouse pointer over the Remove push button, hold down the Alt key 
  742.       and click mouse button 2. Visual Builder displays the connection menu for 
  743.       the Remove push button. 
  744.  
  745.    2. Select the buttonClickEvent feature. 
  746.  
  747.    3. Move the mouse pointer to the list box and click mouse button 1. Visual 
  748.       Builder displays the connection menu for the list box. 
  749.  
  750.    4. Select the remove action. Selecting the remove action means that you want 
  751.       your application to remove the selected item in the to-do list whenever a 
  752.       user clicks the Remove push button. Once again, the connection is 
  753.       incomplete. 
  754.  
  755.    5. Move the mouse pointer to the connection between the Remove push button 
  756.       and the list box. 
  757.  
  758.    6. Hold down the Alt key and click mouse button 2. Visual Builder displays 
  759.       the connection menu for the connection. 
  760.  
  761.    7. Select the index parameter. The index parameter is the reason the 
  762.       connection line is dashed. You need to give this parameter a value. 
  763.  
  764.    8. Move the mouse pointer over the list box and click mouse button 1. Visual 
  765.       Builder displays the connection menu for the list box. 
  766.  
  767.    9. Select the selection attribute. Selecting the selection attribute means 
  768.       that you want to pass the index of the selected item in the list box to 
  769.       the index parameter of the remove action. The remove action uses this 
  770.       index to determine which item to remove whenever the Remove push button 
  771.       is clicked. 
  772.  
  773.       Making this connection completes your application. It should now look 
  774.       like the one shown in the following figure: 
  775.  
  776.       Note:  In the preceding figure, we changed the shape of the connection 
  777.              between the Remove push button and the list box to make it easier 
  778.              for you to see. You can do this by selecting the connection and 
  779.              dragging the middle selection handle. 
  780.  
  781.  Now that you have made all of the connections, the next step is to generate 
  782.  your C++ source code. 
  783.  
  784.  
  785. ΓòÉΓòÉΓòÉ 2.6. Generate the C++ code for your application ΓòÉΓòÉΓòÉ
  786.  
  787. The first thing you must do to get your application ready to build is to 
  788. generate the C++ code. This is a two-part process that consists of generating 
  789. the source code for your new visual part and then generating the source code 
  790. for your main() procedure. 
  791.  
  792. Generating the source code for your visual part 
  793.  
  794. To generate the C++ source code for your visual part, select FileSave and 
  795. generatePart source. 
  796.  
  797.            Another way to generate part code is to select , the Part Code 
  798.            Generation tool, on the tool bar. The results are the same. 
  799.  
  800.  Visual Builder generates the following files in the working directory: 
  801.  
  802.  todolist.cpp   The C++ code for your ToDoList part. 
  803.  todolist.hpp   The C++ header file for your ToDoList part. 
  804.  todolist.h     The resource header file for your todolist.cpp file. 
  805.  todolist.rci   The resource file for your todolist.rcx file, which will be 
  806.                 created when you generate source code for your main() function. 
  807.  
  808.  Generating the source code for your main() function 
  809.  
  810.  To generate the source code for your main() function, select FileSave and 
  811.  generatemain() for part. Visual Builder generates the following files in the 
  812.  working directory: 
  813.  
  814.  todolist.app   The main function for your application. 
  815.  
  816.                 Note:  If you start Visual Builder from a WorkFrame project, 
  817.                        the name of this file is vbmain.cpp. 
  818.  
  819.  todolist.mak   The make file that you specify when you build your application. 
  820.  
  821.  todolist.rcx   The main resource file. It includes a resource (.rci) file for 
  822.                 each part that you generated part source for. In this example, 
  823.                 there is only one, todolist.rci, because you only needed to 
  824.                 generate part source for one part. 
  825.  
  826.  You have now generated the C++ code for your application. The next step is to 
  827.  build the application. 
  828.  
  829.  
  830. ΓòÉΓòÉΓòÉ 2.7. Build the application ΓòÉΓòÉΓòÉ
  831.  
  832. Building your application consists of compiling and linking it. To build your 
  833. application, do the following: 
  834.  
  835.    1. Open a command prompt window. 
  836.  
  837.    2. Change to your Visual Builder working directory. 
  838.  
  839.    3. Enter the following command: 
  840.  
  841.       nmake todolist.mak 
  842.  
  843.       This command produces the following files: 
  844.  
  845.       todolist.exe        The executable file for your application. 
  846.  
  847.       todolist.map        The application configuration map. 
  848.  
  849.       todolist.o          The object file for your application. 
  850.  
  851.                           Note:  If you start Visual Builder from a WorkFrame 
  852.                                  project, the name of this file is vbmain.obj. 
  853.  
  854.       todolist.rc         The preprocessed resource file for your application. 
  855.                           Visual Builder concatenates and places all resource 
  856.                           files into this file. 
  857.  
  858.       todolist.obj        The object file for your part. Visual Builder 
  859.                           provides a separate object module for your part that 
  860.                           is used when compiling this part with other parts. 
  861.  
  862.       todolist.res        The binary resource file that is bound to 
  863.                           todolist.exe. 
  864.  
  865.  You have now built your application; the next step is to run your application. 
  866.  
  867.  
  868. ΓòÉΓòÉΓòÉ 2.8. Run the application ΓòÉΓòÉΓòÉ
  869.  
  870. To run your application from the same command prompt from which you entered the 
  871. nmake command, enter the following: 
  872.  
  873. todolist 
  874.  
  875. Once your application is running, experiment with it to make sure it works as 
  876. you designed it. 
  877.  
  878. You can add a finishing touch to your application by creating a program object 
  879. in OS/2 or a shortcut in Windows. Once you have done this, you can run your 
  880. application by simply double-clicking on the program object or shortcut you 
  881. just created. 
  882.  
  883.  
  884. ΓòÉΓòÉΓòÉ 2.9. Exit the Composition Editor and Visual Builder ΓòÉΓòÉΓòÉ
  885.  
  886. To exit either the Composition Editor or Visual Builder, do either of the 
  887. following. 
  888.  
  889.      Select FileExit. 
  890.      Double-click on the system menu icon in the window. 
  891.  
  892.  Note:  You must exit Visual Builder before you can shut down the operating 
  893.         system. Otherwise, the operating system might not shut down completely, 
  894.         requiring you to turn the computer off. 
  895.  
  896.  When you exit Visual Builder, any changes you have made to the selections in 
  897.  the Options menu are saved. Therefore, if you want certain options to be 
  898.  selected or deselected the next time you start Visual Builder, be sure to 
  899.  select or deselect them before exiting Visual Builder. 
  900.  
  901.  If you try to exit Visual Builder while one or more editor windows is open, 
  902.  Visual Builder displays a message asking if you want to close the editors and 
  903.  Visual Builder. You can select either of the following: 
  904.  
  905.      The OK push button to exit the windows 
  906.      The Cancel push button to cancel the exit request 
  907.  
  908.  If you select the OK push button with this message displayed or try to exit an 
  909.  editor and the open editor window contains unsaved changes, Visual Builder 
  910.  displays a message asking if you want to save the changes for each open editor 
  911.  before exiting. You can select either of the following: 
  912.  
  913.      The Yes push button to save the changes and exit 
  914.      The No push button to exit without saving the changes 
  915.      The Cancel push button to cancel the exit request 
  916.  
  917.  
  918. ΓòÉΓòÉΓòÉ 3. Start Visual Builder ΓòÉΓòÉΓòÉ
  919.  
  920.      From a command prompt 
  921.  
  922.      From the tools folder 
  923.  
  924.      From a WorkFrame project 
  925.  
  926.  
  927. ΓòÉΓòÉΓòÉ 3.1. Start Visual Builder from a command prompt ΓòÉΓòÉΓòÉ
  928.  
  929. To start Visual Builder from the C/C++ window in OS/2, do the following: 
  930.  
  931.    1. Double-click on the VisualAge for C++ folder icon. The folder opens. 
  932.  
  933.    2. Double-click on the C/C++ Window icon. The C/C++ window opens. 
  934.  
  935.    3. Enter the following: 
  936.  
  937.       ivb 
  938.  
  939.    4. Press the Enter key. Visual Builder displays the Visual Builder window. 
  940.  
  941.  To start Visual Builder from an MS/DOS command window in Windows, do the 
  942.  following: 
  943.  
  944.    1. Open an MS/DOS command window. 
  945.    2. Enter the following: 
  946.  
  947.       ivb 
  948.    3. Press the Enter key. Visual Builder displays the Visual Builder window. 
  949.  
  950.  
  951. ΓòÉΓòÉΓòÉ 3.2. Start Visual Builder from the tools folder ΓòÉΓòÉΓòÉ
  952.  
  953. To start Visual Builder from the VisualAge C++ Tools folder in OS/2, do the 
  954. following: 
  955.  
  956.    1. Double-click on the VisualAge for C++ folder icon. The folder opens. 
  957.  
  958.    2. Double-click on the VisualAge C++ Tools folder icon. The folder opens. 
  959.  
  960.    3. Double-click on the Visual Builder icon. Visual Builder displays the 
  961.       Visual Builder window. 
  962.  
  963.  To start Visual Builder from the VisualAge C++ folder in Windows 95, do the 
  964.  following: 
  965.  
  966.    1. Select IBM VisualAge C++ for WindowsVisual Builder from the StartPrograms 
  967.       choice on the toolbar. The folder opens. 
  968.  
  969.    2. Double-click on the Visual Builder icon. Visual Builder displays the 
  970.       Visual Builder window. 
  971.  
  972.  To start Visual Builder from the VisualAge C++ folder in Windows NT, do the 
  973.  following: 
  974.  
  975.    1. Double-click on the IBM VisualAge C++ folder on the desktop. The folder 
  976.       opens. 
  977.  
  978.    2. Double-click on the Visual Builder icon. Visual Builder displays the 
  979.       Visual Builder window. 
  980.  
  981.  
  982. ΓòÉΓòÉΓòÉ 3.3. Start Visual Builder from a WorkFrame project ΓòÉΓòÉΓòÉ
  983.  
  984. In OS/2 
  985.  
  986. You can start Visual Builder from a WorkFrame project folder in the following 
  987. ways. 
  988.  
  989. Note:  The following steps assume that your project inherits the settings of a 
  990.        VisualAge C++ project or that it was created using a Project Smarts 
  991.        template. 
  992.  
  993.    1. To start Visual Builder and also load and open an existing .vbb file that 
  994.       you want to work with, open the WorkFrame project folder and do either of 
  995.       the following: 
  996.  
  997.           Double-click on the name of the .vbb file. 
  998.  
  999.           Click on the name of the .vbb file with mouse button 2 and select 
  1000.            Visual from the pop-up menu. 
  1001.  
  1002.    2. To start Visual Builder without loading and opening an existing .vbb 
  1003.       file, do either of the following: 
  1004.  
  1005.           If the WorkFrame project folder is closed, you can click on the 
  1006.            folder with mouse button 2 and select Visual from the pop-up menu. 
  1007.  
  1008.           If the WorkFrame project folder is open, you can do one of the 
  1009.            following: 
  1010.  
  1011.              -  Click on the white space in the project folder with mouse 
  1012.                 button2 and select Visual from the pop-up menu. 
  1013.  
  1014.              -  Select Project on the menu bar and then select Visual in the 
  1015.                 pull-down menu. 
  1016.  
  1017.       Visual Builder displays the Visual Builder window. If you double-clicked 
  1018.       on a .vbb file to open Visual Builder, that file is loaded and opened. 
  1019.  
  1020.  In Windows 
  1021.  
  1022.  You can start Visual Builder from a WorkFrame project in the following ways. 
  1023.  
  1024.    1. To start Visual Builder and also load and open an existing .vbb file that 
  1025.       you want to work with, open the WorkFrame project and do either of the 
  1026.       following: 
  1027.  
  1028.           Double-click on the name of the .vbb file. 
  1029.  
  1030.           Click on the name of the .vbb file with mouse button 2 and select 
  1031.            Visual from the pop-up menu. 
  1032.  
  1033.    2. To start Visual Builder without loading and opening an existing .vbb 
  1034.       file, do either of the following: 
  1035.  
  1036.           Click on the white space in the project folder with mouse button 2 
  1037.            and select Visual from the pop-up menu. 
  1038.  
  1039.           Select Project on the menu bar and then select Visual in the 
  1040.            pull-down menu. 
  1041.  
  1042.       Visual Builder displays the Visual Builder window. If you double-clicked 
  1043.       on a .vbb file to open Visual Builder, that file is loaded and opened. 
  1044.  
  1045.  
  1046. ΓòÉΓòÉΓòÉ 4. Load part files ΓòÉΓòÉΓòÉ
  1047.  
  1048. To give Visual Builder access to parts, you must load the contents of the part 
  1049. files that contain those parts by doing the following: 
  1050.  
  1051.    1. Select FileLoad in the Visual Builder window. 
  1052.  
  1053.       Visual Builder displays the window shown below: 
  1054.  
  1055.    2. Select the file or files that you want to load. 
  1056.  
  1057.    3. Select the OK push button. 
  1058.  
  1059.                      When you are just loading one file, it is quicker to 
  1060.                      double-click on the file name instead of selecting the 
  1061.                      file name and the OK push button. 
  1062.  
  1063.       The file name or names are displayed in the Loaded part files list box in 
  1064.       the Visual Builder window. The following figure shows the Visual Builder 
  1065.       window with multiple part files loaded. 
  1066.  
  1067.  
  1068. ΓòÉΓòÉΓòÉ 5. Unload part files ΓòÉΓòÉΓòÉ
  1069.  
  1070. If a part file appears in the Loaded part files list box in the Visual Builder 
  1071. window, Visual Builder has access to the parts that the part file contains. If 
  1072. you do not want Visual Builder to have access to those parts, you can unload 
  1073. the part file, with the exception of vbbase.vbb. To unload one or more part 
  1074. files, do the following. 
  1075.  
  1076. Note:  Close all Visual Builder editor windows before unloading part files. In 
  1077.        some cases, Visual Builder does not refresh the internal data model to 
  1078.        indicate that a part file has been unloaded. 
  1079.  
  1080.    1. Select one or more files in the Loaded part files list box. 
  1081.  
  1082.           To select multiple files in OS/2, hold down the Ctrl key while 
  1083.            clicking on the file names with mouse button 1. 
  1084.  
  1085.           To select multiple files in Windows, hold down the Shift key while 
  1086.            clicking on the file names with mouse button 1. 
  1087.  
  1088.       To select a block of parts in the list, hold down the Shift key while 
  1089.       clicking on the topmost part. Then hold down the Shift key while clicking 
  1090.       on the bottommost part. All parts listed between the two selected parts 
  1091.       parts are also selected. 
  1092.  
  1093.    2. Select FileUnload. 
  1094.  
  1095.       The following window is displayed showing the files you selected to 
  1096.       unload: 
  1097.  
  1098.       At this point, you can review the files that you selected and make any 
  1099.       changes by deselecting any file or files that you want to remain loaded. 
  1100.  
  1101.    3. Select the Unload push button. 
  1102.  
  1103.       The window disappears and the file names are removed from the Loaded part 
  1104.       files list box. 
  1105.  
  1106.  
  1107. ΓòÉΓòÉΓòÉ 6. Select all part files ΓòÉΓòÉΓòÉ
  1108.  
  1109. To select all of the part files, select EditSelect all files. Visual Builder 
  1110. highlights all of the part files listed in the Loaded part files list box. 
  1111.  
  1112. At this point, you can review the list to see if you want to deselect any of 
  1113. the files. 
  1114.  
  1115.  
  1116. ΓòÉΓòÉΓòÉ 7. Deselect all part files ΓòÉΓòÉΓòÉ
  1117.  
  1118. To deselect all of the part files, select EditDeselect all files. Visual 
  1119. Builder removes the highlighting from all of the selected part files listed in 
  1120. the Loaded part files list box. 
  1121.  
  1122. At this point, you can review the list to see if you want to select any of the 
  1123. files. 
  1124.  
  1125.  
  1126. ΓòÉΓòÉΓòÉ 8. Customize the information area ΓòÉΓòÉΓòÉ
  1127.  
  1128. The following options allow you to specify the kind of information that Visual 
  1129. Builder displays in the information area for a selected part in the Visual 
  1130. Builder window. To use these options, select OptionsInformation area and then 
  1131. select one of the following options: 
  1132.  
  1133.  Show base class 
  1134.    Displays the C++ notation for a class and its base class. For example, if 
  1135.    you select IVBContainerControl when this option is selected, Visual Builder 
  1136.    displays the following in the information area to show that IControl is 
  1137.    IVBContainerControl's base class: 
  1138.  
  1139.    base: IVBContainerControl 
  1140.  
  1141.  Show description 
  1142.    Displays a brief description of the selected part. For example, if you 
  1143.    select IVBContainerControl when this option is selected, Visual Builder 
  1144.    displays the following description in the information area: 
  1145.  
  1146.    IBM VB container control 
  1147.  
  1148.  Show full file names 
  1149.    Displays the name of the part file in which the part is stored. For example, 
  1150.    if you select IVBContainerControl when this option is selected, Visual 
  1151.    Builder displays the following file name in the information area to show 
  1152.    that vbbase.vbb contains the IVBContainerControl part. 
  1153.  
  1154.    from: VBBase.vbb 
  1155.  
  1156.  
  1157. ΓòÉΓòÉΓòÉ 9. See the base files ΓòÉΓòÉΓòÉ
  1158.  
  1159. Select OptionsShow base files to display the names of IBM-shipped part files 
  1160. loaded in Visual Builder. If this option is selected, the file names appear in 
  1161. the Loaded part files list box. 
  1162.  
  1163.  
  1164. ΓòÉΓòÉΓòÉ 10. See where part files are located ΓòÉΓòÉΓòÉ
  1165.  
  1166. Select OptionsShow full file names to see the drive and directory where each of 
  1167. your part files is stored. 
  1168.  
  1169.  
  1170. ΓòÉΓòÉΓòÉ 11. See the type list ΓòÉΓòÉΓòÉ
  1171.  
  1172. To display a type list, do the following: 
  1173.  
  1174.    1. Select the part file or files for which you want to see defined types. 
  1175.  
  1176.    2. Select OptionsShow type list. 
  1177.  
  1178.       A list box titled Loaded type information is displayed at the bottom of 
  1179.       the Visual Builder window, as shown in the following figure. 
  1180.  
  1181.  
  1182. ΓòÉΓòÉΓòÉ 12. Use File Allocation Table (FAT) file names ΓòÉΓòÉΓòÉ
  1183.  
  1184. Select OptionsDefault to FAT file names if your system uses the File Allocation 
  1185. Table (FAT) file system. This option is selected by default when you first 
  1186. install VisualAge for C++. The FAT file system limits file names to a maximum 
  1187. of eight characters and file name extensions to a maximum of three characters. 
  1188.  
  1189.  
  1190. ΓòÉΓòÉΓòÉ 13. Set make file generation ΓòÉΓòÉΓòÉ
  1191.  
  1192. Select OptionsGenerate make files if you want Visual Builder to generate a make 
  1193. file for you when you generate the source code for the main() function of your 
  1194. application. 
  1195.  
  1196.  
  1197. ΓòÉΓòÉΓòÉ 14. Set the working directory ΓòÉΓòÉΓòÉ
  1198.  
  1199. Select OptionsSet working directory if you want to store files created with 
  1200. Visual Builder in a different working directory. The default working directory 
  1201. is the directory in which you installed Visual Builder. 
  1202.  
  1203. Note:  This option does not appear if you start Visual Builder from a WorkFrame 
  1204.        project. 
  1205.  
  1206.  When you select this option, Visual Builder displays the following window: 
  1207.  
  1208.  To change the working directory, do the following: 
  1209.  
  1210.    1. Type the complete path to the directory in which you want to store Visual 
  1211.       Builder files that you create. 
  1212.  
  1213.       The path consists of all directories that must be opened to get to the 
  1214.       working directory. 
  1215.  
  1216.    2. Select the OK push button. 
  1217.  
  1218.  If the path you enter in the Working Directory window is not valid, Visual 
  1219.  Builder displays an error message and resets the path to the last valid path 
  1220.  that was entered. 
  1221.  
  1222.  
  1223. ΓòÉΓòÉΓòÉ 15. Refresh the display ΓòÉΓòÉΓòÉ
  1224.  
  1225. You might want to ensure that the information displayed in the Visual Builder 
  1226. window is current, for example, when you have loaded and unloaded several part 
  1227. files or moved parts from one part file to another. If such a situation occurs, 
  1228. you can cause the display to show the latest updates by selecting EditRefresh. 
  1229.  
  1230.  
  1231. ΓòÉΓòÉΓòÉ 16. Work with the Class Editor ΓòÉΓòÉΓòÉ
  1232.  
  1233.      Entering a description of a part 
  1234.  
  1235.      Moving a part to a different part file 
  1236.  
  1237.      Seeing the base class of a part 
  1238.  
  1239.      Modifying a part's constructor 
  1240.  
  1241.      Specifying your own constructor code 
  1242.  
  1243.      Specifying your own destructor code 
  1244.  
  1245.      Specifying a library file 
  1246.  
  1247.      Specifying a starting resource ID 
  1248.  
  1249.      Specifying a unique icon for your part 
  1250.  
  1251.      Specifying the names of your code generation files 
  1252.  
  1253.      Specifying files to include when you build your application 
  1254.  
  1255.  
  1256. ΓòÉΓòÉΓòÉ 16.1. Enter a description of a part ΓòÉΓòÉΓòÉ
  1257.  
  1258. Use the Description field in the Class Editor to enter a description of your 
  1259. part. This description is used in the following places: 
  1260.  
  1261.      If you add your part to the parts palette, the description appears in the 
  1262.       information area at the bottom of the Composition Editor when you select 
  1263.       the part. 
  1264.  
  1265.      If you export your part information into a .vbe file, the description is 
  1266.       included in the first line. 
  1267.  
  1268.       In the following example, the text shown in quotation marks was taken 
  1269.       from the Description field for the ToDoList part. 
  1270.  
  1271.       //VBBeginPartInfo: ToDoList,"To-Do List sample application" 
  1272.  
  1273.  
  1274. ΓòÉΓòÉΓòÉ 16.2. Move a part to a different part file from the Class Editor ΓòÉΓòÉΓòÉ
  1275.  
  1276. The Part file specification field in the Class Editor shows the name of the 
  1277. .vbb file that contains this part. If you want to move this part to another 
  1278. part file while using the Class Editor, do the following: 
  1279.  
  1280.    1. Replace the name of the current part file with the name of another part 
  1281.       file in which you want to store the part. 
  1282.  
  1283.    2. Select FileSave to apply the change. 
  1284.  
  1285.       Visual Builder moves the part from the former part file to the one you 
  1286.       just specified. If the part file you specified does not exist, Visual 
  1287.       Builder creates it for you. 
  1288.  
  1289.  
  1290. ΓòÉΓòÉΓòÉ 16.3. See the base class of a part ΓòÉΓòÉΓòÉ
  1291.  
  1292. The Base class-access level field in the Class Editor shows the name of the 
  1293. base class for your part. This is the class name that you specified as the base 
  1294. class when you created the part. 
  1295.  
  1296. This field also shows you the current access level to the base class:  public, 
  1297. protected, or private. 
  1298.  
  1299. You cannot modify the base class name or the access level. 
  1300.  
  1301.  
  1302. ΓòÉΓòÉΓòÉ 16.4. Modify a part's constructor ΓòÉΓòÉΓòÉ
  1303.  
  1304. The Constructor field in the Class Editor initially contains a constructor 
  1305. prototype that Visual Builder inserts for you. If Visual Builder's prototype 
  1306. does not do exactly what you want it to do, you can modify it by typing over 
  1307. the text in this field. If you do modify Visual Builder's prototype, you must 
  1308. be aware of the assumptions made during generation of the constructor code. 
  1309.  
  1310. When generating the part's base class initializer list, Visual Builder uses the 
  1311. following process to supply input arguments for the base class: 
  1312.  
  1313.    1. Visual Builder tries to match up the names of input arguments in the 
  1314.       modified constructor with those of input arguments in the base class' 
  1315.       constructor. 
  1316.  
  1317.    2. To supply arguments that remain unmatched, Visual Builder looks for the 
  1318.       following special attributes in the primary part that correspond to input 
  1319.       arguments in the base class' constructor. (In an IFrameWindow-based 
  1320.       composite part, the IFrameWindow* part is the primary part.) 
  1321.  
  1322.           id, the part's window ID 
  1323.           parent, the part's parent window 
  1324.           owner, the part's owner 
  1325.           rect, the rectangle that represents the part's size and position 
  1326.  
  1327.    3. To supply arguments that are still unmatched, Visual Builder looks for 
  1328.       default argument values in the header prototype for the base class' 
  1329.       constructor. 
  1330.  
  1331.    4. If any arguments are not matched up at this point, Visual Builder 
  1332.       displays an error message. 
  1333.  
  1334.  If you want your class to have multiple constructors, put them in the .hpv and 
  1335.  .cpv files that contain your feature code and include them when the code is 
  1336.  generated. Otherwise, if you modify your code after generating it, your 
  1337.  changes will be lost the next time you generate your code. 
  1338.  
  1339.  For information about including files, see Specifying Files for Visual Builder 
  1340.  to Include When You Build Your Application. 
  1341.  
  1342.  
  1343. ΓòÉΓòÉΓòÉ 16.5. Specify my own constructor code ΓòÉΓòÉΓòÉ
  1344.  
  1345. Use the User constructor code field in the Class Editor to enter your own 
  1346. constructor code for the part that you are editing. If you enter code in this 
  1347. field, it is added at the end of the default constructor that Visual Builder 
  1348. provides for you. If you have more than one line of code, put your code into a 
  1349. function and put the function name in this field. Put the code for this 
  1350. function in the files that Visual Builder creates when you generate your 
  1351. feature code. These file names are specified in the User .hpv file and User 
  1352. .cpv file fields. 
  1353.  
  1354.  
  1355. ΓòÉΓòÉΓòÉ 16.6. Specify my own destructor code ΓòÉΓòÉΓòÉ
  1356.  
  1357. Use the User destructor code field in the Class Editor to enter your own 
  1358. destructor code for the part that you are editing. If you enter code in this 
  1359. field, it is added at the beginning of the default destructor that Visual 
  1360. Builder provides for you. If you have more than one line of code, put your code 
  1361. into a function and put the function name in this field. Put the code for this 
  1362. function in the files that Visual Builder creates when you generate your 
  1363. feature code. These file names are specified in the User .hpv file and User 
  1364. .cpv file fields. 
  1365.  
  1366.  
  1367. ΓòÉΓòÉΓòÉ 16.7. Specify a library file ΓòÉΓòÉΓòÉ
  1368.  
  1369. Use the .LIB file name field in the Class Editor to specify the name of a 
  1370. library file (.lib) that you want to to be included when you generate the 
  1371. source code for your part. The library file points to a .dll file that contains 
  1372. information about a part in your application that was compiled separately. When 
  1373. you generate the source code for your part, Visual Builder includes a #pragma 
  1374. statement to include the library file. 
  1375.  
  1376. When Visual Builder generates make files for other parts that use this part, 
  1377. the .lib file is specified in the make file as a dependency. 
  1378.  
  1379.  
  1380. ΓòÉΓòÉΓòÉ 16.8. Specify a starting resource ID ΓòÉΓòÉΓòÉ
  1381.  
  1382. Use the Starting resource ID field in the Class Editor to specify the number 
  1383. that Visual Builder is to use as a starting point for generating resource IDs 
  1384. for your part. If this field is enabled, Visual Builder exports all 
  1385. translatable strings into a STRINGTABLE written to the file partname.rci. 
  1386. Visual Builder also calculates the corresponding resource IDs for these strings 
  1387. and writes them to a file named partname.h. These files are generated with the 
  1388. .cpp and .hpp files for the part. 
  1389.  
  1390. The check box next to the field enables the starting resource ID. The first 
  1391. time you select this check box, Visual Builder enables the field and inserts a 
  1392. default starting resource ID. You can change this number. For information about 
  1393. how to choose a starting resource ID, see Guidelines for Specifying Starting 
  1394. Resource IDs. 
  1395.  
  1396. If the check box is deselected later, the number in the field is included in 
  1397. the .h file when you generate the code, but it is not referenced. 
  1398.  
  1399. Generating resource IDs is useful if the text in your application is being 
  1400. translated into another language. For more information, see Using Resource 
  1401. Files for Translation. 
  1402.  
  1403.  
  1404. ΓòÉΓòÉΓòÉ 16.9. Specify a unique icon for my part ΓòÉΓòÉΓòÉ
  1405.  
  1406. Fill in the fields in the Icon group box in the Class Editor before you add 
  1407. your part to the parts palette so that you can use an icon other than the 
  1408. default icon provided by Visual Builder to represent your part. The default 
  1409. icon is . 
  1410.  
  1411. The Icon group box contains the following fields: 
  1412.  
  1413.  DLL name The resource DLL that contains the icon you want to use. Enter just 
  1414.    the file name, not the extension. 
  1415.  
  1416.  Resource ID The resource ID number of the icon in the DLL whose name you 
  1417.    entered in the DLL name field. 
  1418.  
  1419.  When you enter both the DLL name and a valid resource ID number, Visual 
  1420.  Builder displays the icon that matches the resource ID number in the area 
  1421.  below the Resource ID field. This occurs when you click on another field. This 
  1422.  allows you to verify that you entered the correct resource ID number. 
  1423.  
  1424.  Note:  If you do not specify a DLL, Visual Builder uses the default icon. If 
  1425.         you specify a DLL but Visual Builder cannot find it, Visual Builder 
  1426.         uses the question mark icon, . 
  1427.  
  1428.  If the question mark icon appears, make sure the following conditions are met: 
  1429.  
  1430.      The DLL exists and is in the current directory. 
  1431.      The DLL file name is correct. 
  1432.      The resource ID for the icon (in the .rc file) exists in the DLL. 
  1433.  
  1434.  
  1435. ΓòÉΓòÉΓòÉ 16.10. Specify the names of my code generation files ΓòÉΓòÉΓòÉ
  1436.  
  1437. The Code generation files group box in the Class Editor contains the following 
  1438. fields: 
  1439.  
  1440.      A C++ header file (.hpp) field 
  1441.      A C++ code file (.cpp) field 
  1442.  
  1443.  The file names displayed in these fields are the files into which your C++ 
  1444.  header file code and source code are written. This occurs when you generate 
  1445.  code from the Visual Builder window or from any of the editors by selecting 
  1446.  FileSave and generatePart source. 
  1447.  
  1448.  For complete information about generating source code, see Generating Source 
  1449.  Code for Parts and Applications. 
  1450.  
  1451.  The fields in the group box initially contain .hpp and .cpp file names that 
  1452.  are based on the name of the part you are editing. To change the file names in 
  1453.  these fields, select FileSave so that Visual Builder uses the new file names. 
  1454.  
  1455.  Attention:  If the files already exist, Visual Builder replaces their contents 
  1456.              with the code currently being generated. 
  1457.  
  1458.  Visual Builder writes both files to the working directory. 
  1459.  
  1460.  
  1461. ΓòÉΓòÉΓòÉ 16.11. Specify files to include when I build my application ΓòÉΓòÉΓòÉ
  1462.  
  1463. The User files included in generation group box in the Class Editor allows you 
  1464. to specify files that you want to be included when you build your application. 
  1465. These fields are typically used to contain the names of the files that hold 
  1466. user code that Visual Builder is to use when you generate feature code for your 
  1467. part's features. 
  1468.  
  1469. Attention:  If you import a nonvisual part and specify a user include source 
  1470.             code and header files, do not generate part source for that 
  1471.             nonvisual part. If you do, Visual Builder generates its own source 
  1472.             code and header files, which overwrite your files. 
  1473.  
  1474.  The .hpv and .cpv file extensions are used because the WorkFrame Build tool 
  1475.  tries to compile every .cpp file that it finds into an object module (.obj 
  1476.  file). Because these files are not meant to be compiled by themselves, using 
  1477.  the different file extension prevents this from happening. 
  1478.  
  1479.  
  1480. ΓòÉΓòÉΓòÉ 17. Add an attribute ΓòÉΓòÉΓòÉ
  1481.  
  1482. To add an attribute in the Part Interface Editor, do one of the following: 
  1483.  
  1484.      If you want to add the attribute using the default attribute type, get 
  1485.       member function, set member function, and event identification that 
  1486.       Visual Builder provides, enter a name in the Attribute name field and 
  1487.       select the Add with defaults push button. Visual Builder adds the 
  1488.       attribute to the part interface. 
  1489.  
  1490.      If you want to see the default attribute type, get member function, set 
  1491.       member function, and event identification that Visual Builder provides 
  1492.       before you add the attribute, select the Defaults push button. 
  1493.  
  1494.      If you want to add the attribute after seeing or modifying its default 
  1495.       information or after entering your own information, select the Add push 
  1496.       button. Visual Builder adds the attribute to the part interface. 
  1497.  
  1498.  
  1499. ΓòÉΓòÉΓòÉ 18. Change an attribute ΓòÉΓòÉΓòÉ
  1500.  
  1501. To change, or update, an attribute in the Part Interface Editor, do the 
  1502. following. 
  1503.  
  1504. Note:  You can change anything about an attribute except its name. To change an 
  1505.        attribute's name, you must create a new attribute with the name you want 
  1506.        to use. 
  1507.  
  1508.    1. Select the attribute that you want to change or type its name in the 
  1509.       Attribute name field. 
  1510.  
  1511.    2. Make the changes that you want to make in the fields on the right side of 
  1512.       the Attribute page. 
  1513.  
  1514.    3. Select the Update push button. Visual Builder updates the changes you 
  1515.       made in its internal data model. To save the changes, select FileSave. 
  1516.  
  1517.       If you select Update and try to close the part without selecting 
  1518.       FileSave, Visual Builder displays a message asking if you want to save 
  1519.       the file. 
  1520.  
  1521.  
  1522. ΓòÉΓòÉΓòÉ 19. Delete an attribute ΓòÉΓòÉΓòÉ
  1523.  
  1524. To delete an attribute in the Part Interface Editor, do the following: 
  1525.  
  1526.    1. Select the attribute that you want to delete or type its name in the 
  1527.       Attribute name field. 
  1528.  
  1529.    2. Select the Delete push button. Visual Builder deletes the attribute. 
  1530.  
  1531.  
  1532. ΓòÉΓòÉΓòÉ 20. Set defaults for an attribute ΓòÉΓòÉΓòÉ
  1533.  
  1534. To set defaults for an attribute in the Part Interface Editor, do the 
  1535. following: 
  1536.  
  1537.    1. Select the attribute that you want to set defaults for or type its name 
  1538.       in the Attribute name field. 
  1539.  
  1540.    2. Change the attribute type in the Attribute type field. 
  1541.  
  1542.    3. Select the Defaults push button. 
  1543.  
  1544.  Visual Builder changes all occurrences of the former attribute type to the new 
  1545.  attribute type in the fields on the right side of the Attribute page. 
  1546.  
  1547.  
  1548. ΓòÉΓòÉΓòÉ 21. Clear the attribute page fields ΓòÉΓòÉΓòÉ
  1549.  
  1550. To clear the fields on the Attribute page, select the Clear push button. 
  1551.  
  1552. Visual Builder clears all of the fields on the Attribute page. 
  1553.  
  1554.  
  1555. ΓòÉΓòÉΓòÉ 22. Add an event ΓòÉΓòÉΓòÉ
  1556.  
  1557. To add an event in the Part Interface Editor, do one of the following: 
  1558.  
  1559.      If you want to add the event using the default event identification that 
  1560.       Visual Builder provides, enter a name in the Event name field and select 
  1561.       the Add with defaults push button. 
  1562.  
  1563.       Visual Builder adds the event to the part interface. 
  1564.  
  1565.      If you want to see the default event identification that Visual Builder 
  1566.       provides before you add the event, select the Defaults push button. 
  1567.  
  1568.  Adding a parameter and its type 
  1569.  
  1570.  To add a parameter and its type to the Parameters and their types table, do 
  1571.  the following. 
  1572.  
  1573.  Note:  You can add only one parameter and type for each event. 
  1574.  
  1575.    1. Move the mouse pointer over the table and click mouse button 2. 
  1576.  
  1577.       Visual Builder displays a pop-up menu. 
  1578.  
  1579.    2. Select either Add before or Add after. 
  1580.  
  1581.    3. Select the Update push button. Visual Builder adds a row to the table 
  1582.       with a default parameter name and type. 
  1583.  
  1584.  Changing parameter names and types 
  1585.  
  1586.  To change the parameter names and types in the table, do the following: 
  1587.  
  1588.    1. Click on the parameter name with mouse button 1. 
  1589.  
  1590.    2. Type the parameter name you want to use. 
  1591.  
  1592.    3. Click on the parameter type with mouse button 1 or press the Tab key. 
  1593.  
  1594.    4. Type the parameter type you want to use. 
  1595.  
  1596.       Note:  To exit the edit mode, press Shift+Enter. 
  1597.  
  1598.    5. Select the Update push button. 
  1599.  
  1600.  Deleting parameter names and types 
  1601.  
  1602.  To delete parameter names and types from this table, do the following: 
  1603.  
  1604.    1. Select the row by moving the mouse pointer to the number in the left-hand 
  1605.       column and clicking mouse button 1. 
  1606.  
  1607.    2. With the mouse pointer still over the row, click mouse button 2. 
  1608.  
  1609.    3. Select Delete selected row from the pop-up menu. The row is deleted. 
  1610.  
  1611.  
  1612. ΓòÉΓòÉΓòÉ 23. Change an event ΓòÉΓòÉΓòÉ
  1613.  
  1614. To change, or update, an event, do the following. 
  1615.  
  1616. Note:  You can change anything about an event except its name. To change an 
  1617.        event's name, you must create a new event with the name you want to use. 
  1618.  
  1619.    1. Select the event that you want to change or type its name in the Event 
  1620.       name field. 
  1621.  
  1622.    2. Make the changes that you want to make in the fields on the right side of 
  1623.       the Event page. 
  1624.  
  1625.    3. Select the Update push button. Visual Builder saves the changes you made. 
  1626.  
  1627.  
  1628. ΓòÉΓòÉΓòÉ 24. Delete an event ΓòÉΓòÉΓòÉ
  1629.  
  1630. To delete an event, do the following: 
  1631.  
  1632.    1. Select the event that you want to delete or type its name in the Event 
  1633.       name field. 
  1634.  
  1635.    2. Select the Delete push button. Visual Builder deletes the event. 
  1636.  
  1637.       Note:  If you added the event that you just deleted to the preferred 
  1638.              features list, you must go to the Preferred page and delete it 
  1639.              there, too. 
  1640.  
  1641.  
  1642. ΓòÉΓòÉΓòÉ 25. Set defaults for an event ΓòÉΓòÉΓòÉ
  1643.  
  1644. To set defaults for an event, do the following: 
  1645.  
  1646.    1. Select the event that you want to set defaults for or type its name in 
  1647.       the Event name field. 
  1648.  
  1649.    2. Select the Defaults push button. Visual Builder changes the former event 
  1650.       identification to the default event identification in the Event 
  1651.       identification field. 
  1652.  
  1653.  
  1654. ΓòÉΓòÉΓòÉ 26. Clear the Event page fields ΓòÉΓòÉΓòÉ
  1655.  
  1656. To clear the fields on the Event page, select the Clear push button. 
  1657.  
  1658. Visual Builder clears all of the fields on the Event page. 
  1659.  
  1660.  
  1661. ΓòÉΓòÉΓòÉ 27. Add an action ΓòÉΓòÉΓòÉ
  1662.  
  1663. To add an action in the Part Interface Editor, do one of the following: 
  1664.  
  1665.      If you want to add the action using int as the default return type for 
  1666.       both the action member function and for the value that the member 
  1667.       function returns, enter a name in the Action name field and select the 
  1668.       Add with defaults push button. Visual Builder adds the action to the part 
  1669.       interface. The action name is used as the action member function name 
  1670.       with a return type of int in the Action member function field. In 
  1671.       addition, int is inserted in the Return type field. 
  1672.  
  1673.      If you want to see the default return type (int) before you add the 
  1674.       action, select the Defaults push button. 
  1675.  
  1676.  
  1677. ΓòÉΓòÉΓòÉ 28. Change an action ΓòÉΓòÉΓòÉ
  1678.  
  1679. To change, or update, an action in the Part Interface Editor, do the following. 
  1680.  
  1681. Note:  You can change anything about an action except its name. To change an 
  1682.        action's name, you must create a new action with the name you want to 
  1683.        use. 
  1684.  
  1685.    1. Select the action that you want to change or type its name in the Action 
  1686.       name field. 
  1687.  
  1688.    2. Make the changes that you want to make in the fields on the right side of 
  1689.       the Action page. 
  1690.  
  1691.    3. Select the Update push button. Visual Builder saves the changes you made. 
  1692.  
  1693.  
  1694. ΓòÉΓòÉΓòÉ 29. Delete an action ΓòÉΓòÉΓòÉ
  1695.  
  1696. To delete an action in the Part Interface Editor, do the following: 
  1697.  
  1698.    1. Select the action that you want to delete or type its name in the Action 
  1699.       name field. 
  1700.  
  1701.    2. Select the Delete push button. Visual Builder deletes the action. 
  1702.  
  1703.       Note:  If you added the action that you just deleted to the Preferred 
  1704.              Features list, you must go to the Preferred page and delete it 
  1705.              there, too. 
  1706.  
  1707.  
  1708. ΓòÉΓòÉΓòÉ 30. Set defaults for an action ΓòÉΓòÉΓòÉ
  1709.  
  1710. To set defaults for an action in the Part Interface Editor, do the following: 
  1711.  
  1712.    1. Select the action that you want to set defaults for or type its name in 
  1713.       the Action name field. 
  1714.  
  1715.    2. Select the Defaults push button. Visual Builder changes the former return 
  1716.       type to the default return type in both the Action member function and 
  1717.       the Return type fields. 
  1718.  
  1719.  
  1720. ΓòÉΓòÉΓòÉ 31. Change parameter names ΓòÉΓòÉΓòÉ
  1721.  
  1722. To change the names in the Parameter names table on the Action page in the Part 
  1723. Interface Editor, do the following: 
  1724.  
  1725.    1. Place the mouse pointer over a parameter name and click mouse button 1. 
  1726.  
  1727.    2. Edit the text in the cell. 
  1728.  
  1729.    3. To exit the edit mode, press Shift-Enter. 
  1730.  
  1731.    4. Select the Update push button. 
  1732.  
  1733.  
  1734. ΓòÉΓòÉΓòÉ 32. Clear the Action page fields ΓòÉΓòÉΓòÉ
  1735.  
  1736. To clear the fields on the Action page, select the Clear push button. 
  1737.  
  1738. Visual Builder clears all of the fields on the Action page. 
  1739.  
  1740.  
  1741. ΓòÉΓòÉΓòÉ 33. Promote a feature ΓòÉΓòÉΓòÉ
  1742.  
  1743. To promote a feature in the Part Interface Editor for a subpart, do the 
  1744. following: 
  1745.  
  1746.    1. Select a subpart name from the list box beneath the Subpart name field or 
  1747.       type the name in the field. Visual Builder displays the name of the 
  1748.       subpart that you select in the Subpart name field. 
  1749.  
  1750.    2. Select a feature type from the list box beneath the Feature type field or 
  1751.       type the name in the field. Visual Builder displays the type that you 
  1752.       select (attribute, event, or action) in the the Feature type field. 
  1753.  
  1754.    3. Select the feature that you want to promote from the list box beneath the 
  1755.       Promotable feature field or type the name in the field. Visual Builder 
  1756.       displays the feature that you select in the Promotable feature field. 
  1757.  
  1758.    4. Do one of the following: 
  1759.  
  1760.           If you want to promote the feature using the default name that 
  1761.            Visual Builder provides, select the Add with defaults push button. 
  1762.            Visual Builder promotes the feature and displays the feature name in 
  1763.            both the Promote feature name field and in the list box below this 
  1764.            field. 
  1765.  
  1766.           If you want to see the default feature name that Visual Builder 
  1767.            provides before you promote the feature, select the Defaults push 
  1768.            button. Visual Builder displays the default name for the feature in 
  1769.            the Promote feature name field. 
  1770.  
  1771.           If you want to promote a feature after seeing its default name or 
  1772.            typing another name that you prefer, select the Add push button. 
  1773.            Visual Builder promotes the feature using the name in the Promote 
  1774.            feature name field and displays the name in the list box below this 
  1775.            field. 
  1776.  
  1777.  
  1778. ΓòÉΓòÉΓòÉ 34. Change a promoted feature ΓòÉΓòÉΓòÉ
  1779.  
  1780. To update a feature that you have already promoted, do the following: 
  1781.  
  1782.    1. Select the promoted feature that you want to update. 
  1783.  
  1784.    2. Select those aspects of the promoted feature that you want to update in 
  1785.       the fields on the right side of the Promote page. You can select any or 
  1786.       all of the following: 
  1787.  
  1788.           Subpart name 
  1789.           Feature type 
  1790.           Promotable feature 
  1791.  
  1792.    3. Select the Update push button. Visual Builder updates those aspects of 
  1793.       the feature that you selected. 
  1794.  
  1795.  
  1796. ΓòÉΓòÉΓòÉ 35. Delete a promoted feature ΓòÉΓòÉΓòÉ
  1797.  
  1798. To delete a promoted feature, do the following: 
  1799.  
  1800.    1. Select the promoted feature that you want to delete. 
  1801.  
  1802.    2. Select the Delete push button. Visual Builder deletes the promoted 
  1803.       feature from the list box beneath the Promote feature name field. 
  1804.  
  1805.       Note:  If you added the promoted feature that you just deleted to the 
  1806.              preferred features list, you must go to the Preferred page and 
  1807.              delete it there, too. 
  1808.  
  1809.  
  1810. ΓòÉΓòÉΓòÉ 36. Clear the Promote page fields ΓòÉΓòÉΓòÉ
  1811.  
  1812. To clear the fields on the Promote page, select the Clear push button. Visual 
  1813. Builder removes the information from all of the fields on the page. 
  1814.  
  1815.  
  1816. ΓòÉΓòÉΓòÉ 37. Add a preferred feature ΓòÉΓòÉΓòÉ
  1817.  
  1818. To add a preferred feature to the connection menu for a part, do the following: 
  1819.  
  1820.    1. Select a feature name from one of the list boxes on the left side of the 
  1821.       page. 
  1822.  
  1823.    2. Do either of the following: 
  1824.  
  1825.           Select the Add push button at the bottom of the page. 
  1826.  
  1827.           With the mouse pointer still over the list box in which you selected 
  1828.            the feature name, do the following: 
  1829.  
  1830.              a. Click mouse button 2. A pop-up menu with the Add choice 
  1831.                 appears. 
  1832.  
  1833.              b. Select Add to add the feature. 
  1834.  
  1835.       The feature name that you selected is inserted into the Preferred 
  1836.       features list box in alphabetical order. 
  1837.  
  1838.  
  1839. ΓòÉΓòÉΓòÉ 38. Remove a preferred feature ΓòÉΓòÉΓòÉ
  1840.  
  1841. You can remove a preferred feature name from the connection menu for a part. 
  1842. Doing this removes the feature from the menu only; it does not delete the 
  1843. feature. 
  1844.  
  1845. To remove a preferred feature from the connection menu for a part, do the 
  1846. following: 
  1847.  
  1848.    1. Select the name that you want to remove from the Preferred Features list 
  1849.       box. 
  1850.  
  1851.    2. Do either of the following: 
  1852.  
  1853.           Select the Remove push button at the bottom of the page. 
  1854.  
  1855.           With the mouse pointer still over the feature name in the Preferred 
  1856.            features list box, do the following: 
  1857.  
  1858.              a. Click mouse button 2. A pop-up menu appears. 
  1859.  
  1860.              b. Select Remove to remove the selected feature. 
  1861.  
  1862.       A message box is displayed to make sure you want to remove the name of 
  1863.       this preferred feature. 
  1864.  
  1865.    3. Select Yes to remove the feature name from the list. The feature name 
  1866.       that you selected is removed from the list. 
  1867.  
  1868.  
  1869. ΓòÉΓòÉΓòÉ 39. Remove all preferred features ΓòÉΓòÉΓòÉ
  1870.  
  1871. You can remove all of the feature names from the connection menu for a part. 
  1872. Doing this removes the features from the menu only; it does not delete the 
  1873. features. Once you remove all preferred features from the connection menu, you 
  1874. must select More to use the features in a connection. 
  1875.  
  1876. To remove all of the preferred features from the connection menu for a part, do 
  1877. either of the following: 
  1878.  
  1879.      Select the Remove all push button at the bottom of the page. 
  1880.  
  1881.      With the mouse pointer over the Preferred Features list box, do the 
  1882.       following: 
  1883.  
  1884.         1. Click mouse button 2. A pop-up menu appears. 
  1885.  
  1886.         2. Select Remove all to remove all of the selected features. 
  1887.  
  1888.  A message box is displayed to make sure you want to remove all of the 
  1889.  preferred features. 
  1890.  
  1891.  Select Yes to remove all of the feature names from the list. All of the 
  1892.  feature names are removed from the list. 
  1893.  
  1894.  
  1895. ΓòÉΓòÉΓòÉ 40. Show inherited preferred features only ΓòÉΓòÉΓòÉ
  1896.  
  1897. To show only the preferred features that your part inherits from other parts, 
  1898. select the Default push button. 
  1899.  
  1900. A message box is displayed. Select Yes to display only the inherited preferred 
  1901. features. 
  1902.  
  1903.  
  1904. ΓòÉΓòÉΓòÉ 41. Create nonvisual parts ΓòÉΓòÉΓòÉ
  1905.  
  1906.      Defining the part interface 
  1907.  
  1908.      Adding code to your part 
  1909.  
  1910.  
  1911. ΓòÉΓòÉΓòÉ 41.1. Create Nonvisual Parts ΓòÉΓòÉΓòÉ
  1912.  
  1913. Creating a part 
  1914.  
  1915. You create a part by doing the following: 
  1916.  
  1917.    1. Design the part. 
  1918.  
  1919.    2. Define the part interface, either through the Part Interface Editor or by 
  1920.       importing a part information file. 
  1921.  
  1922.    3. Add code to your part. You can use C++ code written outside of Visual 
  1923.       Builder, or you can generate feature code in Visual Builder and modify 
  1924.       it. 
  1925.  
  1926.  
  1927. ΓòÉΓòÉΓòÉ 41.2. Define the Part Interface ΓòÉΓòÉΓòÉ
  1928.  
  1929. When you are satisfied with your part's design, you are ready to define the 
  1930. part interface to Visual Builder, as follows: 
  1931.  
  1932.    1. Define the attributes of your part. 
  1933.  
  1934.       A part's attributes typically correlate to the class' data members and 
  1935.       can additionally include derived attributes, or attributes that are 
  1936.       determined based on the value of other attributes. 
  1937.  
  1938.    2. Define the member functions that get or set the value of those 
  1939.       attributes. 
  1940.  
  1941.    3. Define any actions that you want the part to be able to do. 
  1942.  
  1943.       A part's actions correlate to the class' public member functions. 
  1944.  
  1945.    4. Specify the event notification identifier used to signal a change in the 
  1946.       value of each attribute. 
  1947.  
  1948.  You can define the part interface in either of the following ways: 
  1949.  
  1950.      Use the Part Interface Editor. In this way, you create the part from the 
  1951.       Visual Builder window and then enter each feature of the part interface 
  1952.       individually using the pages of the Part Interface Editor. 
  1953.  
  1954.      Use a part information file. In this way, you encode part information in 
  1955.       a file and then create the part and its interface by importing the 
  1956.       information into Visual Builder. This method might be more efficient if 
  1957.       C++ code already exists for your part. See and refer to Building 
  1958.       VisualAge for C++ Parts for Fun and Profit for information about creating 
  1959.       part information files. 
  1960.  
  1961.  
  1962. ΓòÉΓòÉΓòÉ 41.2.1. Define the Part Interface using the Part Interface Editor ΓòÉΓòÉΓòÉ
  1963.  
  1964. To define the part interface using the Part Interface Editor, do the following: 
  1965.  
  1966.    1. Open a new nonvisual part called OAContractor. 
  1967.  
  1968.       The Part Interface Editor appears. 
  1969.  
  1970.    2. On the Attribute page, do the following: 
  1971.  
  1972.         a. Type lastName in the Attribute name text-entry field and select the 
  1973.            Add with defaults push button. 
  1974.  
  1975.         b. Change any of the default values, if needed. 
  1976.  
  1977.            For this example, do the following: 
  1978.  
  1979.              1. Change the default attribute type to IString. 
  1980.  
  1981.                 You can do this by doing either of the following: 
  1982.  
  1983.                     Type the value directly into the entry field. 
  1984.  
  1985.                     Select the drop-down list box arrow to the right of the 
  1986.                      entry field and select IString from the list. 
  1987.  
  1988.              2. Edit the Get member function and Set member function fields, 
  1989.                 changing int to IString. This causes these member functions to 
  1990.                 accept IString as a parameter instead of int. 
  1991.  
  1992.              3. Select the Update push button to save the changes you just 
  1993.                 made. 
  1994.  
  1995.         c. Select the Clear push button to clear the fields before adding the 
  1996.            next attribute. 
  1997.  
  1998.         d. Repeat the previous steps for the contractor's firstName, 
  1999.            middleInitial, homeStreet, homeCity, homeState, homeZip, startDate, 
  2000.            endDate, currentContract, and phoneNumber attributes. For these 
  2001.            attributes, specify the IString attribute type before selecting the 
  2002.            Add with defaults push button in the first step. This prevents you 
  2003.            from having to change int to IString as you did previously. 
  2004.  
  2005.         e. Define the contractorID attribute as IString, with the following get 
  2006.            member function: 
  2007.  
  2008.            OAContractor & contractorID(); 
  2009.  
  2010.            This attribute is derived from other attributes; we will add the 
  2011.            code for this later. You do not want users to set this attribute 
  2012.            directly, so do not include a setContractorID member function. 
  2013.  
  2014.         f. Define the activeStatus and IDvalid attributes as Boolean. Note that 
  2015.            the default get member functions and set member functions follow a 
  2016.            different format than the ones for IString attributes. 
  2017.  
  2018.         g. To define the actions for OAContractor, select the Action page. 
  2019.  
  2020.         h. Type putContractor in the Action name field and the following into 
  2021.            the Action member function field: 
  2022.  
  2023.            OAContractor & putContractor(); 
  2024.  
  2025.         i. Select the Add push button; then select Clear. 
  2026.  
  2027.         j. Repeat for the getContractor, parseName, and refreshID actions. At 
  2028.            this point, the Action page appears as shown in the following 
  2029.            figure: 
  2030.  
  2031.         k. Select Save from the File pull-down menu to save your work. 
  2032.  
  2033.  
  2034. ΓòÉΓòÉΓòÉ 41.3. Add Code to My Part ΓòÉΓòÉΓòÉ
  2035.  
  2036. Once you have specified the part interface for your part, you are ready to add 
  2037. the code to make the part work. Adding code involves the following tasks: 
  2038.  
  2039.    1. Generating feature code. If you already have C++ code for your part and 
  2040.       have imported the part information, this step is not necessary. 
  2041.  
  2042.    2. Modifying the feature code. 
  2043.  
  2044.    3. Adding code created outside Visual Builder if it already exists. 
  2045.  
  2046.  
  2047. ΓòÉΓòÉΓòÉ 41.3.1. Generate feature code ΓòÉΓòÉΓòÉ
  2048.  
  2049. Generating feature code for the OAContractor part 
  2050.  
  2051. To generate feature code for the OAContractor part, follow these steps. 
  2052.  
  2053. Note:  This example is a continuation of the example in the preceding section 
  2054.        using the OAContractor part, which should be open in the Part Interface 
  2055.        Editor. 
  2056.  
  2057.    1. Switch to the Class Editor by selecting the icon in the lower-right 
  2058.       corner of the window. 
  2059.  
  2060.    2. Specify the .hpv and .cpv files for Visual Builder to use for the feature 
  2061.       code for the OAContractor part's attributes and actions by filling in the 
  2062.       following fields: 
  2063.  
  2064.       User .hpv file        contrctr.hpv 
  2065.  
  2066.       User .cpv file        contrctr.cpv 
  2067.  
  2068.    3. Select FileSave and generateFeature source. 
  2069.  
  2070.    4. Generate the feature code using one of the following methods: 
  2071.  
  2072.           Select the Generate all push button to generate feature code for 
  2073.            member functions and data members. 
  2074.  
  2075.           Select the appropriate member functions and data members from the 
  2076.            Member functions, Attribute data members, or Event data members list 
  2077.            boxes. Then, select the Generate selected push button. 
  2078.  
  2079.       For this example, select the Generate all push button. 
  2080.  
  2081.       The generated feature code is stored in the files you specified in the 
  2082.       Class Editor, contrctr.hpv and contrctr.cpv. If these files already 
  2083.       exist, the code you just generated is appended to the ends of these 
  2084.       files. 
  2085.  
  2086.       For most parts, you must modify the code to make your part fully 
  2087.       functional. 
  2088.  
  2089.  
  2090. ΓòÉΓòÉΓòÉ 41.4. Modify the Generated Feature Code ΓòÉΓòÉΓòÉ
  2091.  
  2092. After you have Visual Builder generate the feature code, review it. Does it do 
  2093. what you need it to do? If not, modify the code. The OAContractor part needs 
  2094. the following changes: 
  2095.  
  2096.      Modified code for the getContractor action 
  2097.      Modified code for the putContractor action 
  2098.      Modified code for the parseName action 
  2099.      Modified code for the refreshID action 
  2100.      Added code to set the activeStatus attribute 
  2101.      Added code to set the contractorID attribute 
  2102.  
  2103.  
  2104. ΓòÉΓòÉΓòÉ 41.4.1. Modify Code for the getContractor Action ΓòÉΓòÉΓòÉ
  2105.  
  2106. This version of the contractor application uses an IProfile-based database to 
  2107. store information about the contractors. Before the OAContractor part can use 
  2108. this database, we must complete the getContractor and putContractor actions and 
  2109. modify the activeStatus attribute. The following example shows the code 
  2110. generated for the two actions: 
  2111.  
  2112. OAContractor & OAContractor::getContractor()
  2113. {
  2114.  return *this;
  2115. }
  2116.  
  2117. OAContractor & OAContractor::putContractor()
  2118. {
  2119.  return *this;
  2120. }
  2121.  
  2122. To modify feature code, edit the code files using the syntax text editor 
  2123. provided by VisualAge for C++ or your favorite editor. Code for the 
  2124. getContractor action is found in contrctr.cpv. 
  2125.  
  2126. The getContractor action checks for one possible error condition. If it occurs, 
  2127. the action throws an exception. Otherwise, the action retrieves data by 
  2128. contractor identifier from the contrctr.ini file. 
  2129.  
  2130. In response to these exceptions, the OAContractorView part shows a message box. 
  2131.  
  2132.  
  2133. ΓòÉΓòÉΓòÉ 41.4.2. Modify Code for the putContractor Action ΓòÉΓòÉΓòÉ
  2134.  
  2135. Code for the putContractor action is found in contrctr.cpv. The putContractor 
  2136. action checks for one possible error condition. If it occurs, the action throws 
  2137. an exception. Otherwise, the action stores data by contractor identifier in the 
  2138. contrctr.ini file. 
  2139.  
  2140. In response to this exception, the OAContractorView part shows a message box. 
  2141.  
  2142.  
  2143. ΓòÉΓòÉΓòÉ 41.4.3. Modify Code for the parseName Action ΓòÉΓòÉΓòÉ
  2144.  
  2145. The parseName action parses input text from the Request for Contractor 
  2146. Information window and sets the contractor's firstName, middleInitial, and 
  2147. lastName attributes. The code for this action is found in contrctr.cpv. 
  2148.  
  2149.  
  2150. ΓòÉΓòÉΓòÉ 41.4.4. Modify Code for the refreshID Action ΓòÉΓòÉΓòÉ
  2151.  
  2152. The refreshID action checks the current values of the firstName, middleInitial, 
  2153. and lastName attributes and sets the contractor's contractorID attribute. The 
  2154. code for this action is found in contrctr.cpv. 
  2155.  
  2156.  
  2157. ΓòÉΓòÉΓòÉ 41.4.5. Add Code to Set the activeStatus Attribute ΓòÉΓòÉΓòÉ
  2158.  
  2159. You must add a member function to pass string data to the one Boolean 
  2160. attribute, activeStatus. All data in the simple database is stored as strings, 
  2161. but the set member function for the activeStatus attribute takes a Boolean as a 
  2162. parameter. Because only OAContractor's two actions use this member function, it 
  2163. is not necessary to add this to the part interface for OAContractor. However, 
  2164. you must add the member function prototype to the contrctr.hpv file. 
  2165.  
  2166. The following example shows both the generated feature code and the added code 
  2167. in contrctr.cpv: 
  2168.  
  2169. Boolean OAContractor::isActiveStatus() const
  2170. {
  2171.  return iActiveStatus;
  2172. }
  2173.  
  2174. OAContractor & OAContractor::enableActiveStatus(const Boolean enable)
  2175. {
  2176.  if (iActiveStatus != enable)
  2177.  {
  2178.   iActiveStatus = enable;
  2179.   notifyObservers(INotificationEvent(OAContractor::activeStatusId, *this));
  2180.  } // endif
  2181.  return *this;
  2182. }
  2183.  
  2184. // Start Boolean string enabler
  2185.  
  2186. OAContractor & OAContractor::enableActiveStatus(const IString & status)
  2187. {
  2188.  Boolean tempBoolean = iActiveStatus;
  2189.  if (status = "yes") iActiveStatus = true;
  2190.  if (status = "no") iActiveStatus = false;
  2191.  if (tempBoolean != iActiveStatus)
  2192.  {
  2193.   notifyObservers(INotificationEvent(OAContractor::activeStatusId, *this));
  2194.  }
  2195.  return *this;
  2196. }
  2197.  
  2198. // End Boolean string enabler
  2199.  
  2200. iActiveStatus is the private data member that corresponds to the activeStatus 
  2201. attribute. 
  2202.  
  2203. The notifyObservers function signals that the value of the activeStatus 
  2204. attribute has changed. For more information about notification, see Building 
  2205. VisualAge for C++ Parts for Fun and Profit. 
  2206.  
  2207.  
  2208. ΓòÉΓòÉΓòÉ 41.4.6. Add Code to Set the contractorID Attribute ΓòÉΓòÉΓòÉ
  2209.  
  2210. Now, add code to derive the value of the contractorID attribute. The following 
  2211. example shows the code as modified in contrctr.cpv: 
  2212.  
  2213. OAContractor & OAContractor::setContractorID()
  2214. {
  2215.  IString tempString = iFirstName+iMiddleInitial+iLastName;
  2216.  if (iContractorID != tempString)
  2217.  {
  2218.   iContractorID = tempString;
  2219.   notifyObservers(INotificationEvent(OAContractor::contractorIDId, *this));
  2220.  } // endif
  2221.  
  2222. //  Test for string with nontrivial content ;  needed for clear() call
  2223.   if (iContractorID.length() > 5)
  2224.     enableIDvalid(true);
  2225.  
  2226.  return *this;
  2227. }
  2228.  
  2229. This action sets the IDvalid attribute to true if the resulting value of 
  2230. contractorID is valid. 
  2231.  
  2232.  
  2233. ΓòÉΓòÉΓòÉ 41.5. Add Code Created Outside Visual Builder ΓòÉΓòÉΓòÉ
  2234.  
  2235. To include previously existing member function code with generated class 
  2236. declarations, do the following: 
  2237.  
  2238.    1. Change the file extension of .cpp files to .cpv. 
  2239.  
  2240.    2. Change the file extension of .hpp files to .hpv. 
  2241.  
  2242.    3. Change the file extension of any .rc files to .rcv. 
  2243.  
  2244.    4. Add these files to the Class Editor for the appropriate part. 
  2245.  
  2246.  Developing code outside Visual Builder 
  2247.  
  2248.  If you prefer not to use Visual Builder to develop the code for a nonvisual 
  2249.  part but you want to be able to use it in the Composition Editor, you can do 
  2250.  the following: 
  2251.  
  2252.    1. Write the code. 
  2253.  
  2254.    2. Compile it into a DLL. 
  2255.  
  2256.    3. Define the part interface using a part information file. 
  2257.  
  2258.    4. Import the part information file. 
  2259.  
  2260.  
  2261. ΓòÉΓòÉΓòÉ 42. Work with parts in the Visual Builder window ΓòÉΓòÉΓòÉ
  2262.  
  2263.      Displaying part names 
  2264.  
  2265.      Selecting all parts 
  2266.  
  2267.      Deselecting all parts 
  2268.  
  2269.      Importing part information 
  2270.  
  2271.      Exporting part information 
  2272.  
  2273.      Creating a new part 
  2274.  
  2275.      Opening parts 
  2276.  
  2277.      Copying parts from one part file to another 
  2278.  
  2279.      Moving parts to a different part file 
  2280.  
  2281.      Deleting parts from a part file 
  2282.  
  2283.      Renaming parts in part files 
  2284.  
  2285.  
  2286. ΓòÉΓòÉΓòÉ 42.1. Display part names ΓòÉΓòÉΓòÉ
  2287.  
  2288. To display the names of the parts in a part file, in the Loaded files list box 
  2289. in the Visual Builder window, select the part file whose parts you want to see. 
  2290. The names of the parts contained in the part file that you selected are 
  2291. displayed in the Visual Builder window. Visual parts are displayed in the 
  2292. Visual parts list box; nonvisual parts and class interface parts are displayed 
  2293. in the Nonvisual parts list box. 
  2294.  
  2295.  
  2296. ΓòÉΓòÉΓòÉ 42.2. Select all parts ΓòÉΓòÉΓòÉ
  2297.  
  2298. To select all of the parts in the selected part files, select EditSelect all 
  2299. parts. 
  2300.  
  2301. At this point, you can review the list to see if you want to deselect any of 
  2302. the parts. You can do so by pressing the Ctrl key and clicking on the part name 
  2303. with mouse button 1. 
  2304.  
  2305.  
  2306. ΓòÉΓòÉΓòÉ 42.3. Deselect all parts ΓòÉΓòÉΓòÉ
  2307.  
  2308. To deselect all of the parts in the selected part files, select EditDeselect 
  2309. all parts. 
  2310.  
  2311.  
  2312. ΓòÉΓòÉΓòÉ 42.4. Import part information ΓòÉΓòÉΓòÉ
  2313.  
  2314. To import part information, do the following: 
  2315.  
  2316.    1. Select FileImport part information. 
  2317.  
  2318.    2. Select the part information file that you want to import. 
  2319.  
  2320.    3. Select the OK push button. The part information in the part information 
  2321.       file is imported. Any visual parts that the part information file 
  2322.       contains are displayed in the Visual parts list box, and any nonvisual 
  2323.       parts and class interface parts it contains are displayed in the 
  2324.       Nonvisual parts list box. In addition, one or more part files might be 
  2325.       created. 
  2326.  
  2327.  
  2328. ΓòÉΓòÉΓòÉ 42.5. Export part information ΓòÉΓòÉΓòÉ
  2329.  
  2330. To export part information, do the following: 
  2331.  
  2332.    1. Select the part or parts whose information you want to export in either 
  2333.       the Visual parts list box, the Nonvisual parts list box, or both. 
  2334.  
  2335.    2. Select PartExport interface. The following window is displayed: 
  2336.  
  2337.    3. Type the name of the .vbe file in which you want the part information to 
  2338.       be stored in the Open file name field. If you do not enter a file name, 
  2339.       Visual Builder uses exported.vbe as the default file name. 
  2340.  
  2341.    4. Select the OK push button. The part information maintained by Visual 
  2342.       Builder is exported to the file name you specified in the Open file name 
  2343.       field. 
  2344.  
  2345.  
  2346. ΓòÉΓòÉΓòÉ 42.6. Create a new part ΓòÉΓòÉΓòÉ
  2347.  
  2348. To create a new part, do the following: 
  2349.  
  2350.    1. Select PartNew. 
  2351.  
  2352.    2. Enter the name that you want to give to your part in the Class name 
  2353.       field. 
  2354.  
  2355.    3. Enter a description of your part in the Description field. 
  2356.  
  2357.    4. Enter the name of the part file in which you want Visual Builder to store 
  2358.       the part in the File name field. 
  2359.  
  2360.    5. Select the type of part that you want to create in the Part type field. 
  2361.       You can select one of the following: 
  2362.  
  2363.           Visual part 
  2364.           Nonvisual part 
  2365.           Class interface part 
  2366.  
  2367.    6. Either keep the default class name provided by Visual Builder in the Base 
  2368.       class field, change it, or delete it. 
  2369.  
  2370.    7. Select Open. One of the following occurs: 
  2371.  
  2372.           If you are creating a visual part, the Composition Editor is 
  2373.            displayed. 
  2374.  
  2375.           If you are creating a nonvisual part or a class interface part, the 
  2376.            Part Interface Editor is displayed. 
  2377.  
  2378.    8. Use the displayed editor to create your part. 
  2379.  
  2380.  
  2381. ΓòÉΓòÉΓòÉ 42.7. Open parts ΓòÉΓòÉΓòÉ
  2382.  
  2383. If you want to add a bitmap to the folder, see Specifying a Unique Icon for 
  2384. Your Part 
  2385.  
  2386. The following instructions tell you how to open one part at a time or multiple 
  2387. parts simultaneously. 
  2388.  
  2389. Opening one part 
  2390.  
  2391. To open one part, do the following: 
  2392.  
  2393.    1. Find the name of the part that you want to open by scrolling through the 
  2394.       appropriate list box in the Visual Builder window. 
  2395.  
  2396.       Note:  If the list boxes in the Visual Builder window are empty or if you 
  2397.              cannot find the part, the part file that contains the part you 
  2398.              want to open is not selected or not loaded. See Loading Part Files 
  2399.              if you need help loading part files. 
  2400.  
  2401.    2. Select the part you want to open. 
  2402.  
  2403.    3. Select Part on the menu bar. 
  2404.  
  2405.    4. Select Open in the pull-down menu. One of the following occurs: 
  2406.  
  2407.           If you are opening a visual part, Visual Builder displays the 
  2408.            Composition Editor. 
  2409.  
  2410.           If you are opening a nonvisual part, Visual Builder displays the 
  2411.            Part Interface Editor. 
  2412.  
  2413.            A quicker way to open an existing part is to double-click on the 
  2414.            part name within the Visual parts or Nonvisual parts list box. 
  2415.  
  2416.  Opening multiple parts 
  2417.  
  2418.  To open multiple parts, do the following: 
  2419.  
  2420.    1. Find the name of the first part that you want to open by scrolling 
  2421.       through the Nonvisual parts and Visual parts list boxes shown in the 
  2422.       Visual Builder window. 
  2423.  
  2424.       Note:  If the list boxes in the Visual Builder window are empty, see 
  2425.              Loading Part Files if you need help loading part files. 
  2426.  
  2427.    2. Select the first part you want to open. 
  2428.  
  2429.    3. Do one of the following, depending on how the other parts appear in the 
  2430.       list: 
  2431.  
  2432.           If the other parts are adjacent in the list to the part previously 
  2433.            selected, hold down the Shift key and click on the last part in the 
  2434.            group you want to select. All parts between the first and last parts 
  2435.            selected are now highlighted. 
  2436.  
  2437.           If the parts are not adjacent in the list, hold down the Ctrl key 
  2438.            while selecting each part. 
  2439.  
  2440.    4. Select Part on the menu bar. 
  2441.  
  2442.    5. Select Open in the pull-down menu. Visual Builder displays a separate 
  2443.       window for each part that you selected. The window displayed is the 
  2444.       Composition Editor for visual parts or the Part Interface Editor for 
  2445.       nonvisual parts. 
  2446.  
  2447.  
  2448. ΓòÉΓòÉΓòÉ 42.8. Copy parts from one part file to another ΓòÉΓòÉΓòÉ
  2449.  
  2450. To copy a part, do the following: 
  2451.  
  2452.    1. Select the part that you want to copy in the Visual Parts or Nonvisual 
  2453.       parts list box. If you select more than one part or if you do not select 
  2454.       a part, the Copy function is not available. 
  2455.  
  2456.    2. Select PartCopy. 
  2457.  
  2458.       The Source part name field shows the name of the part that you selected 
  2459.       to copy. 
  2460.  
  2461.    3. In the Target part name field, enter the name you want the part to have 
  2462.       when you copy it. 
  2463.  
  2464.    4. In the Target file name field, enter the name of the part file to which 
  2465.       you want to copy the part. If you leave this field blank, the part's 
  2466.       current file name is used. 
  2467.  
  2468.    5. Select the Copy push button. The part is copied under the new name and 
  2469.       stored in the designated part file. 
  2470.  
  2471.  
  2472. ΓòÉΓòÉΓòÉ 42.9. Move parts to a different part file ΓòÉΓòÉΓòÉ
  2473.  
  2474. To move one or more parts from one part file to another, do the following: 
  2475.  
  2476.    1. Select the part or parts that you want to move. If you do not select at 
  2477.       least one part, the Move function is not available. 
  2478.  
  2479.    2. Select PartMove. 
  2480.  
  2481.    3. Use the following instructions for moving one part or multiple parts: 
  2482.  
  2483.       Moving one part 
  2484.  
  2485.       If you selected one part, the following window is displayed: 
  2486.  
  2487.       The Part name field of this window shows the name of the part that you 
  2488.       selected to move. The File name field displays the complete path of the 
  2489.       part file that contains the part you want to move. 
  2490.  
  2491.       Do the following: 
  2492.  
  2493.         a. In the New file name field, enter the path and name of the part file 
  2494.            to which you want to move the part. 
  2495.  
  2496.         b. Select the Move push button. 
  2497.  
  2498.            The part is moved to the part file specified in the New file name 
  2499.            field. 
  2500.  
  2501.       Moving multiple parts 
  2502.  
  2503.       If you selected more than one part, the following window is displayed: 
  2504.  
  2505.       The text in the window specifies the names of the parts you selected. Do 
  2506.       the following: 
  2507.  
  2508.         a. In the entry field, enter the name of the part file to which you 
  2509.            want to move the parts. If the part file is not in your current 
  2510.            directory, specify the complete path for the part file. 
  2511.  
  2512.         b. Select the OK push button. The parts are moved to the part file 
  2513.            specified in the entry field. 
  2514.  
  2515.  
  2516. ΓòÉΓòÉΓòÉ 42.10. Delete parts from a part file ΓòÉΓòÉΓòÉ
  2517.  
  2518. To delete a part, do the following: 
  2519.  
  2520.    1. Select the part or parts that you want to delete in the Visual parts list 
  2521.       box, Nonvisual parts list box, or both. 
  2522.  
  2523.       If you do not select at least one part, the Delete function is not 
  2524.       available. 
  2525.  
  2526.    2. Select PartDelete. 
  2527.  
  2528.       Deselect any parts that you do not want to delete. Once you delete a part 
  2529.       from a part file, you cannot recover it unless you have another copy 
  2530.       stored in another part file. 
  2531.  
  2532.    3. Select the Delete push button. 
  2533.  
  2534.       The selected parts are deleted. 
  2535.  
  2536.  
  2537. ΓòÉΓòÉΓòÉ 42.11. Rename parts in part files ΓòÉΓòÉΓòÉ
  2538.  
  2539. To rename a part in a part file, do the following: 
  2540.  
  2541.    1. Select the part that you want to rename in the Visual parts or Nonvisual 
  2542.       parts list box. If you select more than one part or if you do not select 
  2543.       a part, the Rename function is not available. 
  2544.  
  2545.    2. Select PartRename. 
  2546.  
  2547.       The Part name field shows the name of the part that you selected to 
  2548.       rename. 
  2549.  
  2550.    3. In the New part name field, enter the new name that you want to give the 
  2551.       part. 
  2552.  
  2553.    4. Select the Rename push button. The part is renamed under the new name. 
  2554.  
  2555.  
  2556. ΓòÉΓòÉΓòÉ 43. Work with parts on the free-form surface ΓòÉΓòÉΓòÉ
  2557.  
  2558.      Placing parts on the free-form surface 
  2559.  
  2560.      Selecting and deselecting parts 
  2561.  
  2562.      Manipulating parts, which includes: 
  2563.  
  2564.         -  Displaying pop-up menus 
  2565.         -  Copying parts 
  2566.         -  Deleting parts 
  2567.         -  Editing text strings 
  2568.         -  Renaming parts 
  2569.  
  2570.      Arranging parts, which includes: 
  2571.  
  2572.         -  Moving parts 
  2573.         -  Positioning parts on the grid 
  2574.         -  Sizing parts 
  2575.         -  Matching part sizes 
  2576.         -  Aligning parts 
  2577.         -  Spacing parts within Composer parts 
  2578.         -  Spacing parts within a bounding box 
  2579.  
  2580.      Changing settings for a part 
  2581.  
  2582.      Listing parts within a composite part 
  2583.  
  2584.      Changing depth order within a composite part 
  2585.  
  2586.      Setting the tabbing order 
  2587.  
  2588.      Tearing off an attribute 
  2589.  
  2590.  
  2591. ΓòÉΓòÉΓòÉ 43.1. Place parts on the free-form surface ΓòÉΓòÉΓòÉ
  2592.  
  2593. In the Composition Editor, you place visual, nonvisual, and class interface 
  2594. parts on the free-form surface. This section explains how to place parts there 
  2595. that appear on the parts palette, as well as parts that do not appear on the 
  2596. parts palette. 
  2597.  
  2598. Placing a part that appears on the parts palette 
  2599.  
  2600.    1. From the left column of the parts palette, select the appropriate 
  2601.       category. Then, from the right column, select the part you want to add. 
  2602.       When the mouse pointer is moved over a place where the part can be 
  2603.       placed, it changes to a crosshair, indicating that it is loaded with the 
  2604.       part. 
  2605.  
  2606.    2. Move the mouse pointer to where you want to add the part. 
  2607.  
  2608.    3. Click mouse button 1. If you hold down mouse button 1 instead of clicking 
  2609.       it, an outline of the part is displayed under the pointer to help you 
  2610.       position the part. After the part is in position, release mouse button 1. 
  2611.  
  2612.  To unload the mouse pointer at any time, do either of the following: 
  2613.  
  2614.      Select , the Selection tool, on the tool bar. 
  2615.  
  2616.      Select ToolsSelection tool on the menu bar. 
  2617.  
  2618.            To add several copies of the same part, select Sticky on the parts 
  2619.            palette. When Sticky is selected, the mouse pointer remains loaded 
  2620.            with the part you last selected. When Sticky is not selected, the 
  2621.            mouse pointer becomes unloaded after you add a part. 
  2622.  
  2623.  Placing a part that is not on the parts palette 
  2624.  
  2625.  You can place on the free-form surface any part whose .vbb file is loaded by 
  2626.  doing the following: 
  2627.  
  2628.    1. Select Add part from the Options pull-down menu. 
  2629.  
  2630.    2. Type the part's class name in the Part class field. 
  2631.  
  2632.    3. Type a name for the part in the Name field. 
  2633.  
  2634.    4. Select the Add push button to add the part. 
  2635.  
  2636.    5. Move the crosshairs to the place where you want to add the part and click 
  2637.       mouse button 1. 
  2638.  
  2639.  
  2640. ΓòÉΓòÉΓòÉ 43.2. Select and deselect parts ΓòÉΓòÉΓòÉ
  2641.  
  2642. The following sections describe how to select and deselect a single part and 
  2643. multiple parts. 
  2644.  
  2645. Selecting a single part 
  2646.  
  2647. To select a part that you have placed on the free-form surface, click on the 
  2648. part with mouse button 1. If other parts are already selected, they are 
  2649. deselected automatically. 
  2650.  
  2651. Selecting multiple parts 
  2652.  
  2653. Selecting multiple parts lets you perform the same operation on several parts 
  2654. at once. To select multiple parts, do one of the following: 
  2655.  
  2656.      Hold down the Ctrl key in OS/2 or the Shift key in Windows and click 
  2657.       mouse button 1 on each additional part you want to select. 
  2658.  
  2659.      Hold down mouse button 1 instead of clicking it. Then move the mouse 
  2660.       pointer over each additional part you want to select. After you select 
  2661.       the parts, release mouse button 1. (This method works only in OS/2.) 
  2662.  
  2663.  Note:  Depending on the operation you want to perform, remember to consider 
  2664.         which part you want to be the anchor part because that is the part you 
  2665.         want to select last. For example, if you select two parts because you 
  2666.         want to match the width of one part to the width of the other, the part 
  2667.         you select last is the anchor part, the part whose width is used for 
  2668.         the operation. 
  2669.  
  2670.  Deselecting parts 
  2671.  
  2672.  To deselect a part after you have selected it, do one of the following: 
  2673.  
  2674.      Hold down the Ctrl key in OS/2 or the Shift key in Windows and click on 
  2675.       the selected part with mouse button 1. 
  2676.  
  2677.      Click mouse button 1 in a clear spot on the free-form surface. 
  2678.  
  2679.  When the selection handles disappear, you know that the part is no longer 
  2680.  selected. 
  2681.  
  2682.  To deselect multiple parts, do the following: 
  2683.  
  2684.    1. Hold down the Ctrl key in OS/2 or the Shift key in Windows. 
  2685.  
  2686.    2. Click and release mouse button 1 one or more selected parts. 
  2687.  
  2688.    3. Repeat the previous step until all parts you want to deselect have been 
  2689.       deselected. 
  2690.  
  2691.  
  2692. ΓòÉΓòÉΓòÉ 43.3. Manipulate parts ΓòÉΓòÉΓòÉ
  2693.  
  2694. Once a part is added to the free-form surface, you can manipulate it in a 
  2695. number of different ways. The following sections explain each of those ways. 
  2696.  
  2697.      Displaying pop-up menus 
  2698.  
  2699.      Copying parts 
  2700.  
  2701.      Deleting parts 
  2702.  
  2703.      Editing text strings 
  2704.  
  2705.      Renaming parts on the free-form surface 
  2706.  
  2707.  
  2708. ΓòÉΓòÉΓòÉ 43.3.1. Display pop-up menus ΓòÉΓòÉΓòÉ
  2709.  
  2710. To display the pop-up menu of a part, click on the part with mouse button 2. 
  2711. The pop-up menu displays the operations you can perform on that part. 
  2712.  
  2713. A part does not have to be selected for you to display its pop-up menu. The 
  2714. pop-up menu that is displayed is for the part the mouse pointer is over when 
  2715. mouse button 2 is clicked, even if another part is selected. 
  2716.  
  2717.  
  2718. ΓòÉΓòÉΓòÉ 43.3.2. Copy parts ΓòÉΓòÉΓòÉ
  2719.  
  2720. To copy parts by dragging them, do the following: 
  2721.  
  2722.    1. Select all the parts you want to copy. If you only want to copy one part, 
  2723.       you do not have to select it. 
  2724.  
  2725.    2. Move the mouse pointer over the part you want to copy or one of the 
  2726.       selected parts. 
  2727.  
  2728.    3. Hold down the Ctrl key and mouse button 2 in OS/2 or the Ctrl key and 
  2729.       mouse button 1 in Windows. 
  2730.  
  2731.    4. Drag a copy of the part or parts by moving the mouse pointer to a new 
  2732.       position. An outline of the part or parts is displayed to help you with 
  2733.       positioning. When you are copying multiple parts, the outlines of each 
  2734.       part move together as a group. 
  2735.  
  2736.    5. Release the Ctrl key and mouse button when the part or parts are where 
  2737.       you want them to be. A copy of the part or parts appears where you 
  2738.       positioned the outline or outlines. 
  2739.  
  2740.  Copying parts using the clipboard 
  2741.  
  2742.  To copy parts by using the clipboard, do the following: 
  2743.  
  2744.    1. Select all the parts you want to copy. 
  2745.  
  2746.    2. From the Edit pull-down menu, select Copy. A copy of each selected part 
  2747.       is placed on the clipboard. 
  2748.  
  2749.    3. Select Paste from the Edit pull-down menu when you are ready to use the 
  2750.       parts. The mouse pointer turns to crosshairs to show that it is loaded 
  2751.       with the copied parts. 
  2752.  
  2753.    4. Position the mouse pointer where you want the parts to be copied. 
  2754.  
  2755.    5. Click mouse button 1. Copies of the parts are pasted at the position of 
  2756.       the mouse pointer. 
  2757.  
  2758.            Parts that you copy remain on the clipboard until you copy something 
  2759.            else. Therefore, you can continue to paste copies of those parts by 
  2760.            selecting Paste, positioning the mouse pointer, and clicking mouse 
  2761.            button 1. 
  2762.  
  2763.            If you select Paste and then decide against pasting the parts, you 
  2764.            can unload the mouse pointer by either selecting the Selection tool 
  2765.            on the tool bar or by selecting ToolsSelection tool on the menu bar. 
  2766.  
  2767.  
  2768. ΓòÉΓòÉΓòÉ 43.3.3. Delete parts ΓòÉΓòÉΓòÉ
  2769.  
  2770. To delete one or more parts, do the following: 
  2771.  
  2772.    1. Select all of the parts you want to delete. If you are deleting just one 
  2773.       part, you do not have to select it. 
  2774.  
  2775.    2. Position the mouse pointer over the part you want to delete or one of the 
  2776.       selected parts. 
  2777.  
  2778.    3. Click mouse button 2. 
  2779.  
  2780.    4. From the part pop-up menu, select Delete, The part or parts are deleted. 
  2781.  
  2782.  You can also delete a part by pressing the Delete key after selecting the 
  2783.  part. 
  2784.  
  2785.            Any connections between the part that you are deleting and other 
  2786.            parts are also deleted. Visual Builder displays a message to alert 
  2787.            you of this. However, the EditUndo function also restores any 
  2788.            connections that were removed when you deleted the part. 
  2789.  
  2790.  
  2791. ΓòÉΓòÉΓòÉ 43.3.4. Edit text strings ΓòÉΓòÉΓòÉ
  2792.  
  2793. Some visual parts, such as push buttons and menus, have text strings. To 
  2794. directly edit a part's text string, do the following: 
  2795.  
  2796.    1. Hold down the Alt key. 
  2797.  
  2798.    2. Click mouse button 1 on the text string. 
  2799.  
  2800.    3. Edit the text string. 
  2801.  
  2802.    4. When you have finished, do either of the following: 
  2803.  
  2804.           Click mouse button 1 anywhere outside of the text string. 
  2805.           Press Shift+Enter. 
  2806.  
  2807.            You can also use this direct editing technique to edit the names of 
  2808.            nonvisual parts. The name of a nonvisual part is displayed directly 
  2809.            below its icon. 
  2810.  
  2811.  
  2812. ΓòÉΓòÉΓòÉ 43.3.5. Rename parts on the free-form surface ΓòÉΓòÉΓòÉ
  2813.  
  2814. If you want to give parts names that are more descriptive or meaningful to your 
  2815. application, you can do so as follows: 
  2816.  
  2817.    1. Move the mouse pointer over the part whose name you want to change. 
  2818.  
  2819.    2. Click mouse button 2 to display the pop-up menu for the part. 
  2820.  
  2821.    3. Select Change name. A Name Change Request window is displayed. 
  2822.  
  2823.    4. Type a new name in the entry field. 
  2824.  
  2825.    5. Select OK. Visual Builder changes the name of the part to the name that 
  2826.       you typed in the entry field. 
  2827.  
  2828.  You can also change a part's name by opening the part's settings notebook and 
  2829.  changing the name in the Subpart name field. 
  2830.  
  2831.  
  2832. ΓòÉΓòÉΓòÉ 43.4. Arrange parts ΓòÉΓòÉΓòÉ
  2833.  
  2834. You can arrange parts on the free-form surface in a number of different ways. 
  2835. The following sections explain each of those ways. 
  2836.  
  2837.      Moving parts 
  2838.  
  2839.      Positioning parts on the grid 
  2840.  
  2841.      Specifying grid spacing 
  2842.  
  2843.      Showing and hiding the grid 
  2844.  
  2845.      Sizing parts 
  2846.  
  2847.      Matching part sizes 
  2848.  
  2849.      Aligning parts 
  2850.  
  2851.      Spacing subparts within Composers parts 
  2852.  
  2853.  
  2854. ΓòÉΓòÉΓòÉ 43.4.1. Move parts ΓòÉΓòÉΓòÉ
  2855.  
  2856. To move a part, move the mouse pointer over the part, hold down mouse button 2 
  2857. in OS/2 or mouse button 1 in Windows, and move the mouse pointer to drag the 
  2858. part to the new position. 
  2859.  
  2860.            You can move several parts at once by first selecting all the parts 
  2861.            you want to move and then dragging one of the parts as described. 
  2862.            All of the selected parts will move together, maintaining their 
  2863.            position relative to each other. 
  2864.  
  2865.  
  2866. ΓòÉΓòÉΓòÉ 43.4.2. Position parts on the grid ΓòÉΓòÉΓòÉ
  2867.  
  2868. To position the upper-left corner of parts to the nearest grid coordinate, do 
  2869. the following: 
  2870.  
  2871.    1. Select all the parts you want to position to the grid. 
  2872.  
  2873.       Note:  If the parts you select are subparts, they are positioned to the 
  2874.              grid set up inside the Composers part, not the grid for the 
  2875.              free-form surface. 
  2876.  
  2877.    2. Select , the Snap To Grid tool. 
  2878.  
  2879.            You can automatically position a part to the nearest grid coordinate 
  2880.            when it is added to the free-form surface or a Composers part by 
  2881.            selecting Snap on drop from the Options pull-down menu. 
  2882.  
  2883.  
  2884. ΓòÉΓòÉΓòÉ 43.4.3. Specify grid spacing ΓòÉΓòÉΓòÉ
  2885.  
  2886. To specify the grid spacing, do the following: 
  2887.  
  2888.    1. From the pop-up menu of a Composers part or the free-form surface, select 
  2889.       Set grid spacing. 
  2890.  
  2891.    2. Specify the horizontal and vertical distance between the lines of the 
  2892.       grid in pixels. 
  2893.  
  2894.  
  2895. ΓòÉΓòÉΓòÉ 43.4.4. Show and hide the grid ΓòÉΓòÉΓòÉ
  2896.  
  2897. To toggle between showing and hiding the grid for the free-form surface, do one 
  2898. of the following: 
  2899.  
  2900.      If no parts are selected, you can select , the Toggle Grid tool to toggle 
  2901.       the grid for the free-form surface. 
  2902.  
  2903.      If a Composers part is selected, selecting the Toggle Grid tool toggles 
  2904.       the grid for the Composers part instead of the free-form surface. 
  2905.  
  2906.  Toggling between showing and hiding the grid for a Composers part 
  2907.  
  2908.  To toggle between showing and hiding the grid for a Composers part, do one of 
  2909.  the following: 
  2910.  
  2911.      Select the Composers part and the select , the Toggle Grid tool. 
  2912.  
  2913.      From the Composers part's pop-up menu, select Toggle Grid. 
  2914.  
  2915.  
  2916. ΓòÉΓòÉΓòÉ 43.4.5. Size parts ΓòÉΓòÉΓòÉ
  2917.  
  2918. To change the size of a part, select it and use mouse button 1 to drag one of 
  2919. the selection handles to the new position. An outline of the part is displayed 
  2920. under the mouse pointer to show you the new size of the part. 
  2921.  
  2922.            You can size several parts at once by first selecting all the parts 
  2923.            you want to size. 
  2924.  
  2925.            To size a part in only one direction, press and hold the Shift key 
  2926.            while using mouse button 1 to size the part. Holding down the Shift 
  2927.            key prevents one dimension of the part from changing while you 
  2928.            resize the other dimension. For example, to change the width of a 
  2929.            part but prevent its height from changing, hold down the Shift key 
  2930.            while changing the width. 
  2931.  
  2932.            You can also size a part to the grid coordinates by selecting Snap 
  2933.            on size from the Options pull-down menu. 
  2934.  
  2935.  
  2936. ΓòÉΓòÉΓòÉ 43.4.6. Match part sizes ΓòÉΓòÉΓòÉ
  2937.  
  2938. To size parts to the same width or height of another part, do the following: 
  2939.  
  2940.    1. Select all the parts you want to size, making sure the last part you 
  2941.       select is the part whose size you want the others to match. 
  2942.  
  2943.    2. Select one of the following sizing tools from the tool bar: 
  2944.  
  2945.         Match Width                        Match Height 
  2946.  
  2947.       The size of all the parts you selected, with the exception of the last 
  2948.       part, changes to match the size of the last part selected. 
  2949.  
  2950.  
  2951. ΓòÉΓòÉΓòÉ 43.4.7. Align parts ΓòÉΓòÉΓòÉ
  2952.  
  2953. To align parts to the same position as another part, do the following: 
  2954.  
  2955.    1. Select all the parts you want to align, and then select the part you want 
  2956.       the others to be aligned with. 
  2957.  
  2958.    2. Select one of the following alignment tools from the tool bar: 
  2959.  
  2960.         Align Left                         Align Top 
  2961.         Align Center                       Align Middle 
  2962.         Align Right                        Align Bottom 
  2963.  
  2964.  
  2965. ΓòÉΓòÉΓòÉ 43.4.8. Space subparts within Composers parts ΓòÉΓòÉΓòÉ
  2966.  
  2967. To evenly space subparts within their Composers part, do the following: 
  2968.  
  2969.    1. Select all the parts you want to evenly space. 
  2970.  
  2971.    2. Select one the following spacing tools from the tool bar: 
  2972.  
  2973.         Distribute Horizontally 
  2974.         Distribute Vertically 
  2975.  
  2976.  
  2977. ΓòÉΓòÉΓòÉ 43.4.9. Space parts within a bounding box ΓòÉΓòÉΓòÉ
  2978.  
  2979. To evenly space parts within the unseen bounding box that contains the selected 
  2980. parts, do the following: 
  2981.  
  2982.    1. Select all the parts you want to evenly space. You must select a minimum 
  2983.       of three parts. 
  2984.  
  2985.    2. From the pop-up menu of one of the selected parts, select 
  2986.       LayoutDistribute, and then one of the following: 
  2987.  
  2988.       Horizontally in bounding box Evenly distributes the selected parts within 
  2989.              the region bounded by the leftmost edge and rightmost edge of the 
  2990.              selected parts. 
  2991.  
  2992.       Vertically in bounding box Evenly distributes the selected parts within 
  2993.              the region bounded by the topmost edge and bottommost edge of the 
  2994.              selected parts. 
  2995.  
  2996.  
  2997. ΓòÉΓòÉΓòÉ 43.5. Change settings for a part ΓòÉΓòÉΓòÉ
  2998.  
  2999. The settings notebook of a part provides a way to display and set attributes 
  3000. and options for the part. 
  3001.  
  3002. Opening the settings notebook for one part 
  3003.  
  3004. To open the settings notebook for a part, move the mouse pointer over the part 
  3005. and do one of the following: 
  3006.  
  3007.      Double-click mouse button 1. 
  3008.      Click mouse button 2 and select Open settings from the part's pop-up 
  3009.       menu. 
  3010.  
  3011.  Opening settings notebooks for multiple parts 
  3012.  
  3013.  You can open the settings notebooks for multiple parts by doing the following: 
  3014.  
  3015.    1. Select the parts whose settings you want to change. 
  3016.    2. Move the mouse pointer over one of the selected parts. 
  3017.    3. Click mouse button 2. 
  3018.    4. Select Open settings from the pop-up menu. 
  3019.  
  3020.       Visual Builder opens a settings notebook for each of the selected parts. 
  3021.  
  3022.  Navigating through a settings notebook 
  3023.  
  3024.  You can navigate through the notebook pages in the following ways: 
  3025.  
  3026.      To turn the pages of a notebook, use the small left- and right-arrow push 
  3027.       buttons at the lower-right corner of each page. 
  3028.  
  3029.      To move to a different settings category, select one of the tabs to the 
  3030.       right of the pages. 
  3031.  
  3032.       Note:  When a category has more than one page, the page number and total 
  3033.              number of pages within the category are displayed at the bottom of 
  3034.              the page. 
  3035.  
  3036.      If all of the category tabs do not appear on the pages of the notebook, 
  3037.       small left- and right-arrow push buttons are displayed to the left of the 
  3038.       category tabs, and small up- and down-arrow push buttons are displayed 
  3039.       above and below the category tabs, Use these buttons to move through the 
  3040.       available category tabs. 
  3041.  
  3042.  Adding a handler 
  3043.  
  3044.  To add a handler, do the following: 
  3045.  
  3046.    1. Enter the name of the handler class in the Handler name field, along with 
  3047.       the list of parameters that you want to send to the handler's 
  3048.       constructor. If you use any part names as parameters, be sure to use the 
  3049.       default name that Visual Builder has assigned unless you have changed the 
  3050.       name. Also, put a lowercase "i" before those parameters because Visual 
  3051.       Builder prefixes the part name with an "i" when it generates the code 
  3052.       files. For example, if you are using the first entry field that you 
  3053.       placed in a frame window as a parameter and have not changed the default 
  3054.       name that Visual Builder assigns, the parameter name would be 
  3055.       iEntryField1. 
  3056.  
  3057.    2. If the Handler list list box contains other handlers, select the handler 
  3058.       that you want your new handler to either precede or follow. 
  3059.  
  3060.    3. Select either the Add after or Add before push button. If you did not 
  3061.       import the handler class from a .vbe file, Visual Builder displays a 
  3062.       message saying that the name you entered is not a valid part and asks if 
  3063.       you want to continue. 
  3064.  
  3065.    4. Select the Yes push button. The message disappears and the handler is 
  3066.       added either after or before the handler that is selected in the Handler 
  3067.       list list box, depending on which push button you select. 
  3068.  
  3069.    5. Select the OK push button to save the new handler in the handler list and 
  3070.       close the settings notebook. 
  3071.  
  3072.            We recommend that you put your handler class declaration and code in 
  3073.            separate user .hpv and .cpv files rather than modifying the files 
  3074.            that Visual Builder generates. This way, if you need to regenerate 
  3075.            the files, you do not have to recreate your handler code. 
  3076.  
  3077.            Be sure to include the names of the files that contain the handler 
  3078.            code in the User .hpv file and User .cpv file fields in the Class 
  3079.            Editor. 
  3080.  
  3081.            For information about implementing handlers, refer to the IBM Open 
  3082.            Class Library User's Guide and the IBM Open Class Library Reference. 
  3083.  
  3084.  Moving a handler 
  3085.  
  3086.  To move a handler to a different position in the list, do the following: 
  3087.  
  3088.    1. Select the handler that you want to move. 
  3089.  
  3090.    2. Select the Move push button. 
  3091.  
  3092.    3. In the window that is displayed, select the handler that is to precede or 
  3093.       follow the handler being moved. 
  3094.  
  3095.    4. Select the Move after push button to move the handler after the selected 
  3096.       handler, or select the Move before push button to move the handler before 
  3097.       the selected handler. The window disappears and the handler is moved. 
  3098.  
  3099.  Removing a handler 
  3100.  
  3101.  To remove a handler from the list, do the following: 
  3102.  
  3103.    1. Select the handler you want to remove from the list. 
  3104.  
  3105.    2. Select the Remove push button. The selected handler is removed from the 
  3106.       list. 
  3107.  
  3108.  Changing the color 
  3109.  
  3110.  To change the color, do the following: 
  3111.  
  3112.    1. In the Color area group box, select the area, such as foreground or 
  3113.       background, whose color you want to change. 
  3114.  
  3115.    2. Do one of the following: 
  3116.  
  3117.           If you want to specify red-green-blue values, select the RGB check 
  3118.            box and specify values in the fields in the RGB values group box. 
  3119.  
  3120.           If you want to select a color by its name, deselect the RGB check 
  3121.            box and select a color from the Colors drop-down list box. 
  3122.  
  3123.    3. Select either the Apply push button to see how this color looks for your 
  3124.       part without saving the change or the OK push button to close the 
  3125.       settings notebook and save the color change. 
  3126.  
  3127.  Specifying the size and position of a part 
  3128.  
  3129.  To specify the size and position of a part, do the following: 
  3130.  
  3131.    1. In the x and y fields, specify the initial X and Y coordinates for the 
  3132.       part. These coordinates determine the position of the part's upper-left 
  3133.       corner. 
  3134.  
  3135.    2. In the width and height fields, specify the number of pixels for the 
  3136.       width and height of the part. 
  3137.  
  3138.    3. Optionally, you can also specify the smallest size the part can have by 
  3139.       using the Minimum size group box to do either of the following: 
  3140.  
  3141.           If you want the minimum size to be calculated for you, select the 
  3142.            Calculate at execution time radio button. 
  3143.  
  3144.           If you want to specify the minimum size for the part, select the Set 
  3145.            value here radio button and then enter the width and height in 
  3146.            pixels in the corresponding fields. 
  3147.  
  3148.  Changing the font for a part 
  3149.  
  3150.  To change the font for a part, do one of the following: 
  3151.  
  3152.      If you know the name and size of the font you want to use, you can enter 
  3153.       them in their respective fields. 
  3154.  
  3155.      If you do not know the name and size of the font you want to use or if 
  3156.       you want to change the style or emphasis, select the Edit push button. 
  3157.       Visual Builder displays a standard font dialog from which you can select 
  3158.       the name, size, style, and emphasis you want to use for the part's font. 
  3159.  
  3160.  Using code strings to supply initial field values 
  3161.  
  3162.  Many settings pages provide fields in which you can specify initial values for 
  3163.  part settings. For example, the General page of the IEntryField* settings 
  3164.  notebook contains a Text field and a Limit field. In the Text field, you can 
  3165.  enter a text string that you want Visual Builder to initially display in the 
  3166.  entry field. The Limit field contains a default value of 32, which represents 
  3167.  the maximum number of characters a user can type in the entry field, and you 
  3168.  can change this number. 
  3169.  
  3170.  To facilitate national language support (NLS) translation and code changes in 
  3171.  providing settings values, you can enter a code string to provide those 
  3172.  values. You must precede the code string with a number sign (#). If the first 
  3173.  character of your code string is a #, be sure to enter two #s-the first one to 
  3174.  signify that a code string follows and the second one to begin your code 
  3175.  string. 
  3176.  
  3177.  For example, suppose you want the initial text in an entry field to be Enter a 
  3178.  name here. Further, suppose that you want the limit for this entry field to be 
  3179.  18 characters. In a user header file (.hpv or .h), you could insert the 
  3180.  following #define statements: 
  3181.  
  3182.   #define NAME_PROMPT  "Enter a name here"
  3183.   #define NAME_LENGTH 18
  3184.  
  3185.            Be sure to enter the name of the file that contains these #define 
  3186.            statements in the Required include files field in the Class Editor. 
  3187.            Otherwise, this file is not included when you generate the code for 
  3188.            this part. 
  3189.  
  3190.  Then, on the General page of the IEntryField* settings notebook you could 
  3191.  enter the following in the Text and Limit fields, respectively: 
  3192.  
  3193.   #NAME_PROMPT
  3194.   #NAME_LENGTH
  3195.  
  3196.  By doing this, the values that you defined for NAME_PROMPT and NAME_LENGTH are 
  3197.  used when you generate the source code for the part being edited. 
  3198.  
  3199.  For an example that uses a code string to specify an icon to represent items 
  3200.  in a container, see the subsection titled "Specifying the container type and 
  3201.  layout" in Adding Container Parts. 
  3202.  
  3203.  Activating settings changes 
  3204.  
  3205.  After you make changes to the settings, you can activate them in the following 
  3206.  ways: 
  3207.  
  3208.      Select the OK push button to immediately activate and save the settings 
  3209.       changes you made and to close the settings notebook. 
  3210.  
  3211.      Select the Apply push button to apply the settings changes you have made 
  3212.       and keep the settings notebook open. 
  3213.  
  3214.       This allows you to see whether you need to modify any of the changes you 
  3215.       have made. The changes remain applied until you change them again. 
  3216.  
  3217.  Select the Cancel push button to close the settings notebook. If you made 
  3218.  changes and selected the Apply push button, the changes are saved. 
  3219.  
  3220.  Select the Help push button for more help with using the settings notebook. 
  3221.  
  3222.  For information about the settings of a particular part, refer to the settings 
  3223.  section of the part in the Visual Builder Parts Reference. 
  3224.  
  3225.  
  3226. ΓòÉΓòÉΓòÉ 43.6. Use the generic settings notebook ΓòÉΓòÉΓòÉ
  3227.  
  3228. To view the settings notebook for your part, do one of the following: 
  3229.  
  3230.      To set values for an instance of your part that you are using in a 
  3231.       composite part, do the following: 
  3232.  
  3233.         1. Place the part in the Composition Editor. 
  3234.  
  3235.         2. Move the mouse pointer over the part and click mouse button 2. 
  3236.  
  3237.         3. Select Open settings from the pop-up menu. 
  3238.  
  3239.            Visual Builder displays the settings notebook for the part. 
  3240.  
  3241.      To set attribute values for your part that will be available each time 
  3242.       your part is used, do the following: 
  3243.  
  3244.         1. Open the part. 
  3245.  
  3246.         2. If the part is a nonvisual or class interface part, switch to the 
  3247.            Composition Editor. You will already be in the Composition Editor if 
  3248.            your part is a visual part. 
  3249.  
  3250.         3. Move the mouse pointer over the free-form surface and click mouse 
  3251.            button 2. 
  3252.  
  3253.         4. Select Open settings from the pop-up menu. 
  3254.  
  3255.                           A quicker way to open the generic settings notebook 
  3256.                           is to double-click on the part. 
  3257.  
  3258.            Visual Builder displays the settings notebook for the part. 
  3259.  
  3260.  
  3261. ΓòÉΓòÉΓòÉ 43.7. List parts within a composite part ΓòÉΓòÉΓòÉ
  3262.  
  3263. Note:  In Windows, make sure your system palette is set to 256 colors or fewer 
  3264.        before trying to list parts. 
  3265.  
  3266.  To list parts within a composite part, do the following: 
  3267.  
  3268.    1. Open the composite part. 
  3269.  
  3270.    2. Click on the free-form surface with mouse button 2. The part's contextual 
  3271.       menu appears. 
  3272.  
  3273.    3. Select View parts list. The Parts List window opens. At first, the Parts 
  3274.       List window displays only the immediate subparts of the selected part. An 
  3275.       expansion icon appears next to each part that contains subparts of its 
  3276.       own. To see those parts, select the expansion icon. 
  3277.  
  3278.  
  3279. ΓòÉΓòÉΓòÉ 43.8. Change depth order within a composite part ΓòÉΓòÉΓòÉ
  3280.  
  3281. You can change the depth order within a single parent part by dragging items in 
  3282. the parts list. To change the depth order, do the following: 
  3283.  
  3284.    1. Open a parts list in the composite part by selecting View parts list from 
  3285.       the part's contextual menu. 
  3286.  
  3287.    2. To move more than one part, do one of the following, depending on how the 
  3288.       other parts appear in the list: 
  3289.  
  3290.           If the parts are adjacent in the list, select the first part in the 
  3291.            group to be moved. Then hold down the Shift key and click on the 
  3292.            last part in the group to be moved. All parts between the first and 
  3293.            last parts selected are now highlighted. 
  3294.  
  3295.           If the parts are not adjacent in the list, select the first part. 
  3296.            Then hold down the Ctrl key while selecting the other parts. 
  3297.  
  3298.       If you want to move only one part, you do not need to select it first. 
  3299.  
  3300.    3. Using mouse button 2, drag the selected parts to their new location in 
  3301.       the depth order. 
  3302.  
  3303.  If tabbing has been set for any of the parts moved, this also changes the 
  3304.  tabbing order. 
  3305.  
  3306.  
  3307. ΓòÉΓòÉΓòÉ 43.9. Perform other operations on parts in the Parts List window ΓòÉΓòÉΓòÉ
  3308.  
  3309. To perform an operation on a part in the parts list, do the following: 
  3310.  
  3311.    1. Move the mouse pointer over the part. 
  3312.    2. Click mouse button 2 to open the part's contextual menu. 
  3313.    3. Select the operation you want to perform. 
  3314.  
  3315.  
  3316. ΓòÉΓòÉΓòÉ 43.10. Set the tabbing order ΓòÉΓòÉΓòÉ
  3317.  
  3318. To display the tabbing order, open a parts list for the Composers part that 
  3319. contains the push buttons. Within the parts list, you can change the positions 
  3320. of parts in the tabbing order. 
  3321.  
  3322.  
  3323. ΓòÉΓòÉΓòÉ 43.10.1. Change the tabbing order ΓòÉΓòÉΓòÉ
  3324.  
  3325. To change the position of a part within the tabbing order, do the following: 
  3326.  
  3327.    1. Open a parts list for the ICanvas* part that contains the push buttons. 
  3328.  
  3329.    2. Move the mouse pointer to the part in the list whose position you want to 
  3330.       change. 
  3331.  
  3332.    3. Press and hold mouse button 2. 
  3333.  
  3334.    4. Drag the part icon to its new position. 
  3335.  
  3336.    5. Release mouse button 2. 
  3337.  
  3338.  
  3339. ΓòÉΓòÉΓòÉ 43.10.2. Set tab stops and groups ΓòÉΓòÉΓòÉ
  3340.  
  3341. If you want the user to be able to move the input focus to a part using the Tab 
  3342. and backtab keys, do the following: 
  3343.  
  3344.    1. Select the part. 
  3345.    2. Open the part's contextual menu. 
  3346.    3. Select Set tabbingTab stop. 
  3347.  
  3348.  If you want the user to be able to move the input focus to a part with the 
  3349.  keyboard arrow keys, do the following: 
  3350.  
  3351.    1. Select the part. 
  3352.    2. Open the part's contextual menu. 
  3353.    3. Select Set tabbingGroup. 
  3354.  
  3355.  All parts in the tabbing order below the part that has Group selected are 
  3356.  included in the group. 
  3357.  
  3358.  To start another group, select Set tabbingGroup for the part that you want to 
  3359.  be the first part in that group. If a part has both Group and Tab stop 
  3360.  selected, a user can tab to the first part in the group and then use the arrow 
  3361.  keys to move to the other parts in the group. 
  3362.  
  3363.  When you put radio buttons in groups, they become mutually exclusive within 
  3364.  their group. For example, suppose you have four consecutive radio buttons in 
  3365.  your list and you select Group for RadioButton1 and RadioButton3. In this 
  3366.  case, RadioButton1 and RadioButton2 become mutually exclusive in their group, 
  3367.  with RadioButton3 and RadioButton4 mutually exclusive in their group, as well. 
  3368.  Tab stops are also set so a user can tab between the two groups. 
  3369.  
  3370.  Consider setting a tab stop on each entry field that a user can type in to 
  3371.  allow the user to move the input focus from one entry field to another. 
  3372.  Read-only entry fields do not need a tab stop, and arrow keys only move the 
  3373.  cursor within an entry field; only the Tab key, backtab key, and mouse can 
  3374.  change the input focus from one entry field to another. 
  3375.  
  3376.  Style guidelines for setting groups and tab stops 
  3377.  
  3378.  The following are some typical style guidelines for setting groups and tab 
  3379.  stops: 
  3380.  
  3381.      The position of the parts in the tabbing order should be the same as the 
  3382.       order in which they are displayed in the window, from left to right and 
  3383.       then top to bottom. 
  3384.  
  3385.      Parts that are not in groups, such as entry fields and list boxes, should 
  3386.       have Group and Tab stop selected. 
  3387.  
  3388.      Each group of related parts, such as check boxes and radio buttons, 
  3389.       should be put within an outline box or a group box. If there is only one 
  3390.       group of related parts, such as push buttons, you do not need to put them 
  3391.       within an outline box or group box. Select only Tab stop for these parts. 
  3392.  
  3393.      Parts that should not receive input focus, such as static text parts, 
  3394.       should not have either Group or Tab stop selected. 
  3395.  
  3396.  
  3397. ΓòÉΓòÉΓòÉ 43.11. Edit parts placed on the free-form surface ΓòÉΓòÉΓòÉ
  3398.  
  3399. If you need to edit a part that was added to the part you are currently 
  3400. editing, do the following: 
  3401.  
  3402.    1. If you have not already done so, load the part file that contains the 
  3403.       part you want to edit. 
  3404.  
  3405.    2. Move the mouse pointer over the part you want to edit. 
  3406.  
  3407.    3. Click mouse button 2. The part's pop-up menu appears. 
  3408.  
  3409.    4. Select Edit part. 
  3410.  
  3411.       Visual Builder displays the appropriate editor for the part, as follows: 
  3412.  
  3413.           If you are editing a visual part, Visual Builder displays the 
  3414.            Composition Editor 
  3415.  
  3416.           If you are editing a nonvisual or class interface part, Visual 
  3417.            Builder displays the Part Interface Editor. 
  3418.  
  3419.    5. Edit the part. 
  3420.  
  3421.                      If you want to promote any of the features of the parts 
  3422.                      used to create the composite part you are editing, doing 
  3423.                      so now keeps you from having to edit this part again 
  3424.                      later. See Promoting a Part's Features if you need more 
  3425.                      information about doing this. 
  3426.  
  3427.    6. Select FileSave to save the part. 
  3428.  
  3429.    7. Close the editor by doing one of the following: 
  3430.  
  3431.           Double-click on the system menu icon. 
  3432.           Select FileExit. 
  3433.  
  3434.       The editor you are using disappears and you are returned to the 
  3435.       Composition Editor you were using previously. However, Visual Builder has 
  3436.       not applied the changes you made to the part you just edited, so those 
  3437.       changes are not visible yet. 
  3438.  
  3439.    8. Select FileSave to save the original part. 
  3440.  
  3441.    9. Close the Composition Editor for the original part that you were editing, 
  3442.       as described previously. 
  3443.  
  3444.   10. Reopen the original part you were editing by double-clicking on the 
  3445.       part's name in the Visual Builder window. 
  3446.  
  3447.       You should now be able to see the changes you made to the part that you 
  3448.       edited. 
  3449.  
  3450.  
  3451. ΓòÉΓòÉΓòÉ 43.12. Promote a part's features ΓòÉΓòÉΓòÉ
  3452.  
  3453. Promoting a part's features from the Composition Editor 
  3454.  
  3455.            To promote features of several subparts, we recommend using the 
  3456.            Promote page of the Part Interface Editor. 
  3457.  
  3458.    1. If you have not already done so, load the part file that contains the 
  3459.       composite part whose features you want to promote. 
  3460.  
  3461.    2. If you have not already done so, open the composite part or edit the 
  3462.       subpart, whichever is necessary. 
  3463.  
  3464.       Visual Builder displays the Composition Editor with the part that you are 
  3465.       opening or the subpart that you are editing on the free-form surface. 
  3466.  
  3467.    3. Move the mouse pointer over a part whose features you want to promote. 
  3468.  
  3469.    4. Click mouse button 2 to display the part's pop-up menu. 
  3470.  
  3471.    5. Select Promote Part Feature. 
  3472.  
  3473.    6. Select a feature. The name of the feature you selected is displayed in 
  3474.       the Promote feature name entry field prefixed with the name of the part. 
  3475.       This is how the feature name will appear in the connections menu unless 
  3476.       you change it before performing the next step. 
  3477.  
  3478.    7. Select the Promote push button. The feature name is added to the 
  3479.       Previously promoted list box, as shown in the following figure: 
  3480.  
  3481.    8. Repeat the previous two steps until you have promoted all of the features 
  3482.       you need to make the necessary connections. 
  3483.  
  3484.    9. Close the window for promoting features. 
  3485.  
  3486.   10. Select FileSave to save the features you just promoted. 
  3487.  
  3488.   11. Close the Composition Editor. 
  3489.  
  3490.       You can now use the feature or features that you promoted to make 
  3491.       connections. 
  3492.  
  3493.  
  3494. ΓòÉΓòÉΓòÉ 43.13. Tear off an attribute ΓòÉΓòÉΓòÉ
  3495.  
  3496. Select Tear-off attribute from a part's pop-up menu to work with an attribute 
  3497. as if it were a stand-alone part. The torn-off attribute is not actually a 
  3498. separate part but a variable that either represents the attribute itself or 
  3499. points to it. 
  3500.  
  3501. When you select Tear-off attribute, Visual Builder displays the list of 
  3502. attributes for the part that you are tearing from. After you select an 
  3503. attribute from the list, you can drop the torn-off attribute on the free-form 
  3504. surface. 
  3505.  
  3506.  
  3507. ΓòÉΓòÉΓòÉ 43.14. Undo and redo changes in the Composition Editor ΓòÉΓòÉΓòÉ
  3508.  
  3509. If you change something in the Composition Editor and then decide that you 
  3510. should have left things as they were, select Undo from the Edit pull-down menu 
  3511. to restore the part to its previous state. You can undo as many operations as 
  3512. you want, up to when you opened the Composition Editor. 
  3513.  
  3514. If you undo an operation and then decide that you did the right thing in the 
  3515. first place, select Redo from the Edit pull-down menu. Redo restores the part 
  3516. to the state it was in before the last Undo, including any connections that 
  3517. were deleted. 
  3518.  
  3519. If you are not sure which operations you want to undo or redo, select Undo/Redo 
  3520. list from the Edit pull-down menu to display two lists of operations, one for 
  3521. undoing and one for redoing. From these lists, you can select an operation and 
  3522. then select the Undo or Redo push button. The operation that you select and all 
  3523. of the operations listed below it are undone or redone. 
  3524.  
  3525. Note:  Undo, Redo, and Undo/Redo list only affect operations you perform on the 
  3526.        free-form surface and parts palette in the Composition Editor. They have 
  3527.        no affect on any of the functions in the File pull-down menu, such as 
  3528.        Save, Save as, and Save and generate, which you cannot undo. 
  3529.  
  3530.  
  3531. ΓòÉΓòÉΓòÉ 44. Construct a GUI using the OASearch application ΓòÉΓòÉΓòÉ
  3532.  
  3533.      Adding basic visual parts 
  3534.  
  3535.         -  Adding the parts 
  3536.  
  3537.         -  Changing the settings 
  3538.  
  3539.      Adding a variable to a composite part 
  3540.  
  3541.         -  Changing the variable's type 
  3542.  
  3543.         -  Adding the variable to the part interface 
  3544.  
  3545.  
  3546. ΓòÉΓòÉΓòÉ 44.1. Add basic visual parts ΓòÉΓòÉΓòÉ
  3547.  
  3548. The purpose of this section is to guide you through constructing a version of 
  3549. the Opportunities Abound Contract Information window for the OASearch sample 
  3550. application. You construct this part (ContractView) in the Composition Editor 
  3551. using the basic visual parts. When you are finished, the Opportunities Abound 
  3552. Contract Information window looks like the following figure: 
  3553.  
  3554. To see the finished part, open contract.vbb. Begin with adding the parts. 
  3555.  
  3556.  
  3557. ΓòÉΓòÉΓòÉ 44.1.1. Add the parts ΓòÉΓòÉΓòÉ
  3558.  
  3559. Before starting this new visual part, make sure that oanonvis.vbb is loaded 
  3560. into Visual Builder. 
  3561.  
  3562. Adding the parts 
  3563.  
  3564.    1. Because you are constructing a new user interface, begin by creating a 
  3565.       visual part. Name it ContractView. 
  3566.  
  3567.       When you create a visual part, the Composition Editor opens a part that 
  3568.       inherits from IFrameWindow*. By default, the client area of the 
  3569.       IFrameWindow* appears as a canvas. 
  3570.  
  3571.    2. Change the title of the window. 
  3572.  
  3573.    3. Add the following parts to the window part: 
  3574.  
  3575.           Static text and entry field parts for Account Number, Company Name, 
  3576.            Project Manager, and Department. 
  3577.  
  3578.           A group-box part for the Position Details group. Resize the group 
  3579.            box. 
  3580.  
  3581.           Static-text and entry-field parts for the items inside the group 
  3582.            box. 
  3583.  
  3584.           Push-button parts. 
  3585.  
  3586.       See the figure below to see how the window should look after you add the 
  3587.       parts. 
  3588.  
  3589.  Changing the Labels 
  3590.  
  3591.  Directly edit the static text so that the text matches the previous figure. 
  3592.  
  3593.  Arranging the Parts 
  3594.  
  3595.  Arrange the parts on the frame window part so they are aligned and positioned 
  3596.  as shown the previous figure. 
  3597.  
  3598.  Now that all parts have been added, continue on with changing the settings. 
  3599.  
  3600.  
  3601. ΓòÉΓòÉΓòÉ 44.1.2. Change the settings ΓòÉΓòÉΓòÉ
  3602.  
  3603. Now that the parts have been added for the user interface, customize the parts 
  3604. by modifying their settings. 
  3605.  
  3606. Specifying a push button label with mnemonic 
  3607.  
  3608. In the Text field on the General settings page for the second push button, type 
  3609. ~Save. Select the OK push button. 
  3610.  
  3611. The second push button of your window now reads Save, with a mnemonic of S. 
  3612. This means the user can select the push button by pressing Alt+S. 
  3613.  
  3614. Note:  The tilde is the mnemonic character in OS/2. In Windows, this character 
  3615.        resolves at generation time to an ampersand (&), which is the mnemonic 
  3616.        character in Windows. You can enter the ampersand directly instead of 
  3617.        using the tilde, but your mnemonics will not be portable between OS/2 
  3618.        and Windows. 
  3619.  
  3620.  Repeat this procedure for the push button to the right of the Save push 
  3621.  button, specifying Cl~ear as the push button label. This push button now reads 
  3622.  Clear, with a mnemonic of E. 
  3623.  
  3624.  For the rightmost push button, specify ~Cancel as the label. This push button 
  3625.  now reads Cancel, with a mnemonic of C. 
  3626.  
  3627.  Specifying the default push button 
  3628.  
  3629.  In the Text field on the General settings page for the leftmost push button, 
  3630.  type ~Refresh. Select the Apply push button. The leftmost push button of your 
  3631.  window now reads Refresh, with a mnemonic of R. 
  3632.  
  3633.  On the Styles settings page, select the On radio button for the defaultButton 
  3634.  style. Select the OK push button. The Refresh push button is now the default 
  3635.  button for the window. This means the user can select the push button by 
  3636.  pressing the Enter key. 
  3637.  
  3638.  For details on the settings of a particular part, refer to the Visual Builder 
  3639.  Parts Reference. For more information on how to perform these operations, see 
  3640.  Changing Settings. 
  3641.  
  3642.  Now that the settings have been specified, the next step is making connections 
  3643.  between the parts. 
  3644.  
  3645.  
  3646. ΓòÉΓòÉΓòÉ 44.2. Add a variable to a composite part ΓòÉΓòÉΓòÉ
  3647.  
  3648. Begin by opening the ContractView part (found in contract.vbb) in the 
  3649. Composition Editor. If you prefer to use the OAContractView part, you can find 
  3650. this part in oawin.vbb. At this point, the ContractView part appears as shown 
  3651. in the following figure: 
  3652.  
  3653. We are using a variable instead of an OAContract* part because the contract 
  3654. data varies with the information entered from the OAQueryContract* part. 
  3655.  
  3656. To add a variable to the free-form surface, select , the Models category, from 
  3657. the parts palette; then add , an IVBVariable* part, to the free-form surface. 
  3658. Change its name to Contract. The ContractView with a variable added appears as 
  3659. shown in the following figure: 
  3660.  
  3661.            Notice the square bracket symbols around the variable part. You can 
  3662.            always identify a variable by these symbols. Also note that tear-off 
  3663.            attributes also have square brackets and are in fact variables with 
  3664.            a special connection. 
  3665.  
  3666.  The next step is changing the variable's type. 
  3667.  
  3668.  
  3669. ΓòÉΓòÉΓòÉ 44.2.1. Change the variable's type ΓòÉΓòÉΓòÉ
  3670.  
  3671.    1. First, make sure that the part file holding the OAContract part 
  3672.       (oanonvis.vbb) is loaded into Visual Builder. 
  3673.  
  3674.    2. Select Change type on the variable's pop-up menu; then type OAContract* 
  3675.       in the field. 
  3676.  
  3677.  The next step is adding the variable to the part interface. 
  3678.  
  3679.  
  3680. ΓòÉΓòÉΓòÉ 44.2.2. Add the variable to the Part Interface ΓòÉΓòÉΓòÉ
  3681.  
  3682. So far, the Contract variable is empty. To make the variable available for 
  3683. passing values from the main view (or any part outside ContractView), we must 
  3684. add the variable to the part interface of ContractView). Do this by selecting 
  3685. Promote part feature from the variable's pop-up menu. See Promoting a Part's 
  3686. Features if you need information about doing this. 
  3687.  
  3688. The next step is connecting the variable. 
  3689.  
  3690.  
  3691. ΓòÉΓòÉΓòÉ 45. Learn to use connections ΓòÉΓòÉΓòÉ
  3692.  
  3693.      Making the connections 
  3694.  
  3695.      Connecting features to member functions 
  3696.  
  3697.      Connecting exception events to actions and member functions 
  3698.  
  3699.      Manipulating connections 
  3700.  
  3701.      Rearranging connections 
  3702.  
  3703.      Making connections for the OASearch application 
  3704.  
  3705.  
  3706. ΓòÉΓòÉΓòÉ 45.1. Make the connections ΓòÉΓòÉΓòÉ
  3707.  
  3708. In this section, you learn how to make attribute-to-attribute, 
  3709. event-to-attribute, event-to-action, and attribute-to-action connections. This 
  3710. section provides the following information: 
  3711.  
  3712.      Determining the source and target 
  3713.  
  3714.      Browsing a part's features 
  3715.  
  3716.      Connecting features to features 
  3717.  
  3718.      Supplying parameter values for incomplete connections 
  3719.  
  3720.  Member function connections are discussed in Connecting Features to Member 
  3721.  Functions. Custom logic connections are discussed in Adding a Custom Logic 
  3722.  Connection. 
  3723.  
  3724.  
  3725. ΓòÉΓòÉΓòÉ 45.1.1. Determine the source and target ΓòÉΓòÉΓòÉ
  3726.  
  3727. A connection is directional; it has a source and a target. The direction in 
  3728. which you draw the connection determines the source and target. The part on 
  3729. which the connection begins is the source and the part on which it ends is the 
  3730. target. 
  3731.  
  3732. When you make an event connection, Visual Builder draws an arrow on the 
  3733. connection line between the two parts. The arrow points from the source to the 
  3734. target. If information can pass through the connection in both directions, as 
  3735. it can in an attribute-to-attribute connection, a hollow circle indicates the 
  3736. source and a solid circle indicates the target. 
  3737.  
  3738. Often, it does not matter which part you choose as the source or target, but 
  3739. there are connections where direction is important. 
  3740.  
  3741. Here are the source and target rules: 
  3742.  
  3743.      With an attribute-to-action, event-to-action, or event-to-attribute 
  3744.       connection, the event is always the source and the action or attribute is 
  3745.       always the target. In the case of an attribute-to-action connection, the 
  3746.       source event is signaled when the attribute changes value. If you try to 
  3747.       make an action-to-attribute, action-to-event, or attribute-to-event 
  3748.       connection, Visual Builder automatically reverses it for you. 
  3749.  
  3750.      For attribute-to-attribute connections, if only one of the attributes has 
  3751.       a set member function, Visual Builder makes that attribute the target. 
  3752.       This is done so that the attribute that has the set member function can 
  3753.       be initialized when the application starts. 
  3754.  
  3755.      When you make attribute-to-attribute connections, the order in which you 
  3756.       choose the source and target is important. The source and target 
  3757.       attribute values are probably different when your view is first 
  3758.       initialized. If they are, Visual Builder resolves the difference by 
  3759.       changing the value of the target attribute to match that of the source 
  3760.       attribute. Thereafter, if both attributes have set member functions, the 
  3761.       connection updates either attribute if the other changes. 
  3762.  
  3763.  Refer to the attributes, actions, and events sections of the particular part 
  3764.  in the Visual Builder Parts Reference for information that is specific to a 
  3765.  part's features. 
  3766.  
  3767.  
  3768. ΓòÉΓòÉΓòÉ 45.1.2. Browse a part's features ΓòÉΓòÉΓòÉ
  3769.  
  3770. Sometimes it is useful to browse a part's features before using them in a 
  3771. connection. For example, you might want to look at an attribute to see if it 
  3772. has a set member function so that it can update itself when it receives new 
  3773. data from another attribute. 
  3774.  
  3775. By using Browse part features, you can see all of a part's features in one 
  3776. window and browse, but not change, the information about each feature. To 
  3777. modify a feature, use the Part Interface Editor. 
  3778.  
  3779. There is an important distinction between browsing a part's features and 
  3780. displaying its features for making a connection. When you browse a part's 
  3781. features, you see all of its features, even if some of them are not available 
  3782. for connections. (This includes inherited features if the base parts are loaded 
  3783. into Visual Builder.) When you display a part's connection menu, however, you 
  3784. see only those features that are available for connections. 
  3785.  
  3786. To browse the features of a part, do the following: 
  3787.  
  3788.    1. Move the mouse pointer over the part and click mouse button 2. Visual 
  3789.       Builder displays the part's pop-up menu. 
  3790.  
  3791.    2. Select Browse part features. 
  3792.  
  3793.       Visual Builder displays a browse window that contains three columns: one 
  3794.       for actions, one for attributes, and one for events. 
  3795.  
  3796.    3. Select the feature you want to browse. 
  3797.  
  3798.       Visual Builder displays information about the feature that you select in 
  3799.       the entry fields below the feature columns. 
  3800.  
  3801.    4. If the information about a part's features should change, you can select 
  3802.       the Refresh push button to see those changes reflected in the browse 
  3803.       window. 
  3804.  
  3805.    5. To read more information about the part you are browsing, select the 
  3806.       Reference push button. 
  3807.  
  3808.    6. When you have finished browsing the features, select the Close push 
  3809.       button to close the browse window. 
  3810.  
  3811.  
  3812. ΓòÉΓòÉΓòÉ 45.1.3. Connect features to features ΓòÉΓòÉΓòÉ
  3813.  
  3814. Follow these steps to connect features: 
  3815.  
  3816.    1. Position the mouse pointer over the source, the part or connection that 
  3817.       you want to connect from, click mouse button 2, and select Connect from 
  3818.       its pop-up menu. 
  3819.  
  3820.                      To display the connection pop-up menu more quickly, hold 
  3821.                      down the Alt key while clicking mouse button 2. On 
  3822.                      Windows, be sure to release the Alt key as soon as you 
  3823.                      have clicked the mouse. 
  3824.  
  3825.       A menu appears showing the names of the most commonly used attributes, 
  3826.       actions, and events, called the preferred features. If the source is a 
  3827.       part, there is usually a More selection at the bottom of the list. 
  3828.  
  3829.       If the More selection is not there, this means the list contains all of 
  3830.       the available features, not just the preferred ones, and there are no 
  3831.       more from which to select. 
  3832.  
  3833.    2. Do one of the following: 
  3834.  
  3835.           If the feature you want appears in the list, select it. 
  3836.  
  3837.           If the feature you want does not appear in the list, but the More 
  3838.            selection is available, select More and then select the feature you 
  3839.            want from the complete list of features. 
  3840.  
  3841.           If the feature you want does not appear in either the preferred list 
  3842.            or the expanded list that is displayed when you select More, you can 
  3843.            edit the part to add the feature you need. For more information 
  3844.            about this, see Editing Parts Placed on the Free-Form Surface. 
  3845.  
  3846.                           If, at this point, you decide not to complete the 
  3847.                           connection, do one of the following: 
  3848.                             -  If a pop-up menu is displayed, move the mouse 
  3849.                                pointer away from the connection menu and click 
  3850.                                mouse button 1. 
  3851.  
  3852.                             -  If a window showing all of the features is 
  3853.                                displayed, select the Cancel push button at the 
  3854.                                bottom of the window. 
  3855.  
  3856.                           The menu or window disappears and the connection is 
  3857.                           not completed. 
  3858.  
  3859.    3. Position the mouse pointer over the part or connection that you want to 
  3860.       connect to. 
  3861.  
  3862.       While moving the mouse, notice that a dashed line trails from the mouse 
  3863.       pointer to the source of the connection. 
  3864.  
  3865.    4. Click mouse button 1 and a pop-up menu appears, again showing a list of 
  3866.       features. 
  3867.  
  3868.    5. Select a name from the pop-up menu or from the More list. The same 
  3869.       instructions regarding the presence of More apply as described 
  3870.       previously. 
  3871.  
  3872.  
  3873. ΓòÉΓòÉΓòÉ 45.1.4. Supply parameter values for incomplete connections ΓòÉΓòÉΓòÉ
  3874.  
  3875. Supplying a parameter value using a connection 
  3876.  
  3877. To supply a parameter value, do the following: 
  3878.  
  3879.    1. Start a new connection using the dashed connection line that requires the 
  3880.       parameter as the source. 
  3881.  
  3882.    2. For the target, select the attribute, action, member function, or custom 
  3883.       logic that is to provide the value that the parameter needs. 
  3884.  
  3885.            When you make a connection, Visual Builder provides a visual cue to 
  3886.            help you position the pointer correctly. When you have the pointer 
  3887.            directly over the connection line, a small hollow box appears. 
  3888.  
  3889.  Supplying a parameter value using a constant value 
  3890.  
  3891.  When connections need parameters whose input values are constant, you provide 
  3892.  these values by using the settings window of the incomplete connection, as 
  3893.  follows: 
  3894.  
  3895.    1. Select Open settings from the incomplete (dashed) connection's pop-up 
  3896.       menu. 
  3897.  
  3898.                      A quicker way to open the settings window is to 
  3899.                      double-click on the connection line. 
  3900.  
  3901.       The settings window of the incomplete connection is displayed. 
  3902.  
  3903.    2. Select the Set parameters push button. The Constant Parameter Value 
  3904.       Settings window is displayed showing the parameters for which you can set 
  3905.       constant values. 
  3906.  
  3907.    3. Enter the constant parameter values you want to use. 
  3908.  
  3909.    4. Do one of the following: 
  3910.  
  3911.           Select the OK push button to apply the values and save them. 
  3912.  
  3913.           Select the Apply push button if you want to see what effect these 
  3914.            values have before saving them. 
  3915.  
  3916.           Select the Cancel push button to remove the notebook without saving 
  3917.            any of the parameter values you entered. 
  3918.  
  3919.       You can select Help for additional information about entering parameter 
  3920.       values. 
  3921.  
  3922.  Specifying defaults for parameters 
  3923.  
  3924.  There are two places in Visual Builder in which you can specify defaults for 
  3925.  the parameters of actions in the declaration of the action's member function: 
  3926.  
  3927.      In the part's .vbe file 
  3928.      On the Action page of the Part Interface Editor 
  3929.  
  3930.  Either of these enables a default value to be passed in an event-to-action 
  3931.  connection, thus avoiding the need to supply a parameter value. 
  3932.  
  3933.  Preventing parameters that are missing or not valid 
  3934.  
  3935.  When an action connection requires arguments, be sure that you make the 
  3936.  correct number of parameter connections. Also, be sure that you make the 
  3937.  parameter connections before you generate code for your part. If you use the 
  3938.  return value of one connection as input to another, make sure the connections 
  3939.  appear in the correct order. See Manipulating Connections to learn how to 
  3940.  reorder connections. 
  3941.  
  3942.  
  3943. ΓòÉΓòÉΓòÉ 45.2. Connect features to member function connections ΓòÉΓòÉΓòÉ
  3944.  
  3945.      Adding an event-to-member function connection 
  3946.  
  3947.      Using Browser information 
  3948.  
  3949.  
  3950. ΓòÉΓòÉΓòÉ 45.2.1. Add an event-to-member function connection ΓòÉΓòÉΓòÉ
  3951.  
  3952. The following figure shows the OAContractorView part used in the OASearch 
  3953. sample application in this book. The steps for adding an event-to-member 
  3954. function connection, which follow the figure, are based on this part. For 
  3955. information about how to construct this part, see Adding Notebook Parts. 
  3956.  
  3957.    1. Open the connection menu for the Clear push button. 
  3958.  
  3959.    2. From this menu, select the buttonClickEvent choice, an event. 
  3960.  
  3961.    3. Move the mouse pointer to a point on the free-form surface outside the 
  3962.       OAContractorView part and click mouse button 1. 
  3963.  
  3964.    4. Select More. 
  3965.  
  3966.       Visual Builder displays a window that contains three list boxes. 
  3967.  
  3968.       For this example, the For class field contains OAContractorView, the part 
  3969.       that you are editing. 
  3970.  
  3971.       For this example, the Access field contains public. 
  3972.  
  3973.    5. Type the member function to which the buttonClickEvent feature is to be 
  3974.       connected in the entry field below the Access field. Be sure to type the 
  3975.       full declaration of the member function, including return type and 
  3976.       parameters. 
  3977.  
  3978.       For this example, enter the following member function to clear all of the 
  3979.       fields in OAContractorView: 
  3980.  
  3981.       void resetFields(); 
  3982.  
  3983.       You must also create an .hpv file that contains this member function 
  3984.       declaration and a .cpv file that contains the code for this member 
  3985.       function. The member function declaration that you enter in this field 
  3986.       must be identical to the declaration that you put in the .hpv file. For 
  3987.       information about .hpv and .cpv files, see Specifying Files for Visual 
  3988.       Builder to Include When You Build Your Application 
  3989.  
  3990.       In addition, before you generate the code for your part, you must switch 
  3991.       to the Class Editor and enter the names of these files so that Visual 
  3992.       Builder will include them in the code for your part. For more information 
  3993.       about including these files, see Specifying Files for Visual Builder to 
  3994.       Include When You Build Your Application. 
  3995.  
  3996.    6. Select the OK push button. 
  3997.  
  3998.       The connection window disappears and a light green connection arrow is 
  3999.       drawn from the Clear push button toward the edge of the free-form 
  4000.       surface. It looks like this: 
  4001.  
  4002.  
  4003. ΓòÉΓòÉΓòÉ 45.2.2. Use Browser information ΓòÉΓòÉΓòÉ
  4004.  
  4005. The cascaded menu that Visual Builder displays when you select FileBrowser 
  4006. contains the following selections: 
  4007.  
  4008.  Quick browse 
  4009.    Causes Visual Builder to retrieve a list of the classes that the part you 
  4010.    are editing inherits from, as well as a list of the member functions that 
  4011.    your part and the part it inherits from contains. This list appears in the 
  4012.    For class list box when you open the connection window. If you select one of 
  4013.    the classes in the list, Visual Builder retrieves a list of the member 
  4014.    functions that the class contains. 
  4015.  
  4016.    This function is available only if you start Visual Builder from a WorkFrame 
  4017.    project. It gives you access to browser information before you compile your 
  4018.    application. 
  4019.  
  4020.  Open browser data 
  4021.    Works the same as Quick browse except you must compile your application with 
  4022.    the -Fb+ option before using this function. Also, you do not have to start 
  4023.    Visual Builder from a WorkFrame project to use this function. 
  4024.  
  4025.  Refresh browser data 
  4026.    Refreshes the list that is displayed in the member function list box for the 
  4027.    current class. If you recompile your application, use this function 
  4028.    afterwards to ensure the data in the list boxes is current. 
  4029.  
  4030.  Close browser data 
  4031.    Removes the list of the classes that the part you are editing inherits from, 
  4032.    as well as the member functions those classes contain. 
  4033.  
  4034.  
  4035. ΓòÉΓòÉΓòÉ 45.3. Add a custom logic connection ΓòÉΓòÉΓòÉ
  4036.  
  4037. The requirements for connecting an event or attribute to custom logic are a 
  4038. visual part that has at least one event or attribute specified for it. 
  4039. Following are the steps to follow for adding a custom logic connection. The 
  4040. following figure shows the History page of the OAContractorView part used in 
  4041. the OASearch sample application in this book. The example used in the following 
  4042. steps is based on this part. 
  4043.  
  4044.    1. Select the right arrow in the lower-right corner of the notebook to 
  4045.       display the History page. 
  4046.  
  4047.    2. With the mouse pointer over the Clear push button, hold down the Alt key 
  4048.       and click mouse button 2. 
  4049.  
  4050.       Visual Builder displays the connection menu for the Clear push button. 
  4051.  
  4052.    3. From this menu, select the buttonClickEvent choice, an event. 
  4053.  
  4054.    4. Move the mouse pointer to a point on the free-form surface outside the 
  4055.       OAContractorView part and click mouse button 1. Doing this indicates to 
  4056.       Visual Builder that you want to connect the event to the OAContractorView 
  4057.       part instead of one of its subparts. 
  4058.  
  4059.       Visual Builder displays the connection menu with the preferred features 
  4060.       that have been defined for the OAContractorView part. 
  4061.  
  4062.    5. Select Custom logic. 
  4063.  
  4064.       Visual Builder displays the following window: 
  4065.  
  4066.    6. Enter the following in the Description field: 
  4067.  
  4068.       Sample to clear entry fields 
  4069.  
  4070.    7. The buttonClickEvent feature is the event you want to connect to your 
  4071.       custom logic, so do not change the Event name field for this example. 
  4072.  
  4073.    8. The default return type of void is the return type you want to use, so do 
  4074.       not change the Return type field for this example. 
  4075.  
  4076.    9. Select the Target push button. 
  4077.  
  4078.       Visual Builder inserts target-> in the Custom logic field. 
  4079.  
  4080.       In the generated code for the edited part, the entry fields that we want 
  4081.       to clear are created using the new operator. For the StartEF part, the 
  4082.       resulting pointer is called iStartEF. 
  4083.  
  4084.   10. Type the following to the right of target->: 
  4085.  
  4086.       iStartEF->removeAll(); 
  4087.  
  4088.       This code calls the removeAll member function for the StartEF part, the 
  4089.       entry field labeled OA Start Date. 
  4090.  
  4091.   11. Press the Enter key to move the cursor to a new line. 
  4092.  
  4093.   12. Select the Target push button again. 
  4094.  
  4095.   13. Type the following to the right of target->: 
  4096.  
  4097.       iEndEF->removeAll(); 
  4098.  
  4099.       This code calls the removeAll member function for the EndEF part, the 
  4100.       entry field labeled OA End Date. 
  4101.  
  4102.   14. Press the Enter key to move the cursor to a new line. 
  4103.  
  4104.   15. Select the Target push button again. 
  4105.  
  4106.   16. Type the following to the right of target->: 
  4107.  
  4108.       iContractEF->removeAll(); 
  4109.  
  4110.       This code calls the removeAll member function for the ContractEF part, 
  4111.       the entry field labeled Current Contract. 
  4112.  
  4113.       The connection window should now look like the following figure: 
  4114.  
  4115.   17. Select the Add push button. 
  4116.  
  4117.       The connection window disappears and a blue connection arrow is drawn 
  4118.       from the Clear push button toward the edge of the free-form surface. It 
  4119.       should look like this: 
  4120.  
  4121.  
  4122. ΓòÉΓòÉΓòÉ 45.4. Connect exception events to actions and member functions ΓòÉΓòÉΓòÉ
  4123.  
  4124. To connect an exception event, do the following: 
  4125.  
  4126.    1. Use your favorite text editor to create an action or member function that 
  4127.       throws an exception. 
  4128.  
  4129.       The easiest way to do this is to include the following in your action or 
  4130.       member function source code: 
  4131.  
  4132.          throw IException("Error message."); 
  4133.  
  4134.       where the text of the error message that you want to display in the 
  4135.       message box is the only parameter given for the IException constructor. 
  4136.  
  4137.    2. Connect an event to the action or member function you just created. 
  4138.  
  4139.    3. Drop an IMessageBox* part on the free-form surface. 
  4140.  
  4141.       This message box is used to display the error message. 
  4142.  
  4143.    4. Move the mouse pointer to the connection you just made. 
  4144.  
  4145.    5. While holding down the Alt key, press mouse button 2. 
  4146.  
  4147.    6. Select the exceptionOccurred event from the connection menu. 
  4148.  
  4149.    7. Move the mouse pointer to the IMessageBox* part. 
  4150.  
  4151.    8. Click mouse button 1. 
  4152.  
  4153.    9. Select the showException action from the connection menu. 
  4154.  
  4155.       This connection causes the application to show a message box that 
  4156.       contains the exception error message whenever the exception is thrown. 
  4157.  
  4158.  For an example using the OAContractorView part from the OASearch application, 
  4159.  see Passing Exceptions to Message Boxes. 
  4160.  
  4161.  
  4162. ΓòÉΓòÉΓòÉ 45.5. Manipulate connections ΓòÉΓòÉΓòÉ
  4163.  
  4164. Once a connection is made, you can manipulate it by doing the following: 
  4165.  
  4166.      Changing settings for a connection 
  4167.  
  4168.      Reordering connections 
  4169.  
  4170.      Deleting connections 
  4171.  
  4172.      Showing and hiding connections 
  4173.  
  4174.  
  4175. ΓòÉΓòÉΓòÉ 45.5.1. Change settings for a connection ΓòÉΓòÉΓòÉ
  4176.  
  4177. To open the settings window for a connection, move the mouse pointer over the 
  4178. connection and do one of the following: 
  4179.  
  4180.      Double-click mouse button 1. 
  4181.  
  4182.      Click mouse button 2 and select Open settings from the connection's 
  4183.       pop-up menu. 
  4184.  
  4185.  Visual Builder displays different connection settings windows depending on 
  4186.  whether the target of the connection is an attribute, action, or member 
  4187.  function. 
  4188.  
  4189.  
  4190. ΓòÉΓòÉΓòÉ 45.5.2. Reorder connections ΓòÉΓòÉΓòÉ
  4191.  
  4192. If you make several connections from the same part, they run in the order in 
  4193. which you made the connections. To ensure the correct flow of control when you 
  4194. generate the source code, you may need to reorder the connections. If so, do 
  4195. the following: 
  4196.  
  4197.    1. Select the source part. 
  4198.  
  4199.    2. From the source part's pop-up menu, select Reorder connections from. 
  4200.  
  4201.       Visual Builder displays the Reorder Connections window showing a list of 
  4202.       your connections. 
  4203.  
  4204.    3. With the mouse pointer over the connection you want to reorder, press and 
  4205.       hold as follows: 
  4206.  
  4207.           mouse button 1 in Windows. 
  4208.           mouse button 2 in OS/2. 
  4209.  
  4210.    4. Drag the connection to the place in the list where you want the 
  4211.       connection to occur. 
  4212.  
  4213.    5. Release the mouse button. 
  4214.  
  4215.    6. Repeat these steps until the connections are listed in the order in which 
  4216.       you want them to occur. 
  4217.  
  4218.    7. Close the window. 
  4219.  
  4220.  
  4221. ΓòÉΓòÉΓòÉ 45.5.3. Delete connections ΓòÉΓòÉΓòÉ
  4222.  
  4223. You can delete a connection in either of the following ways: 
  4224.  
  4225.      From the connection's pop-up menu. 
  4226.  
  4227.       Note:  You do not have to select a connection to delete it using this 
  4228.              method. 
  4229.  
  4230.       To delete a connection from its pop-up menu, do the following: 
  4231.  
  4232.         1. Click on the connection with mouse button 2 to display its pop-up 
  4233.            menu. 
  4234.  
  4235.         2. Select Delete. 
  4236.  
  4237.      From the connection's settings window 
  4238.  
  4239.       To delete a connection from its settings window, do the following: 
  4240.  
  4241.         1. Open the settings window for the connection by doing one of the 
  4242.            following: 
  4243.  
  4244.              -  Double-clicking on the connection 
  4245.  
  4246.              -  Clicking on the connection with mouse button 2 to display its 
  4247.                 pop-up menu and selecting Open settings 
  4248.  
  4249.         2. Select the Delete push button. 
  4250.  
  4251.  
  4252. ΓòÉΓòÉΓòÉ 45.5.4. Show and hide connections ΓòÉΓòÉΓòÉ
  4253.  
  4254. You can show and hide connections by using , the Show Connections tool, and , 
  4255. the Hide Connections tool on the Tool bar. These tools show or hide all 
  4256. connections that have the selected part or parts as their source or target. 
  4257.  
  4258.            If you hide connections, the Composition Editor free-form surface is 
  4259.            drawn faster and is less cluttered, making it easier for you to 
  4260.            work. 
  4261.  
  4262.  If no parts are selected, these tools show and hide all of the connections on 
  4263.  the free-form surface. If at least one part is selected, these tools show and 
  4264.  hide the connections from or to the selected parts. 
  4265.  
  4266.  Another way to show and hide connections is to move the mouse pointer over a 
  4267.  part, click mouse button 2, and select the Browse connections choice from the 
  4268.  part's pop-up menu, which displays a cascaded menu. The choices in the menu 
  4269.  affect only connections going to and from the part the mouse pointer was over 
  4270.  when you displayed the pop-up menu. 
  4271.  
  4272.  
  4273. ΓòÉΓòÉΓòÉ 45.6. Rearrange connections ΓòÉΓòÉΓòÉ
  4274.  
  4275. You can rearrange a connection by doing the following: 
  4276.  
  4277.      Selecting connections 
  4278.  
  4279.      Deselecting connections 
  4280.  
  4281.      Changing the source and target of connections 
  4282.  
  4283.  
  4284. ΓòÉΓòÉΓòÉ 45.6.1. Select connections ΓòÉΓòÉΓòÉ
  4285.  
  4286. You select connections in the same way that you select parts. When you select a 
  4287. connection, three boxes called selection handles appear on it to show that it 
  4288. is selected: one at each end and one in the middle. You can use these boxes to 
  4289. change either of the following: 
  4290.  
  4291.      The end points of the connection, as described in Changing the Source and 
  4292.       Target of Connections. 
  4293.  
  4294.      The shape of the connection line by dragging the middle box to another 
  4295.       location. This helps you distinguish among several connection lines that 
  4296.       are close together. 
  4297.  
  4298.  Selecting a single connection 
  4299.  
  4300.    1. Move the mouse pointer over the connection you want to select. 
  4301.  
  4302.    2. Click mouse button 1 to select the connection. The connection is 
  4303.       selected. 
  4304.  
  4305.  Selecting multiple connections in OS/2 
  4306.  
  4307.  If you want to select several connections, do one of the following: 
  4308.  
  4309.      To select multiple connections using just the mouse, do the following: 
  4310.  
  4311.         1. Move the mouse pointer over one of the connections you want to 
  4312.            select. 
  4313.  
  4314.         2. Hold down mouse button 1 instead of clicking it. 
  4315.  
  4316.         3. Move the mouse pointer over each connection that you want to select. 
  4317.  
  4318.            The selection boxes appear on each connection that the mouse pointer 
  4319.            passes over to show they are selected. 
  4320.  
  4321.         4. After the connections are selected, release mouse button 1. 
  4322.  
  4323.      To select multiple connections using both the mouse and the keyboard, do 
  4324.       the following: 
  4325.  
  4326.         1. Hold down the Ctrl key. 
  4327.  
  4328.         2. Move the mouse pointer over a connection. 
  4329.  
  4330.         3. Click mouse button 1 while the mouse pointer is over the connection 
  4331.            line. 
  4332.  
  4333.         4. Without releasing the Ctrl key, repeat the preceding steps until all 
  4334.            connections that you want to select are selected. 
  4335.  
  4336.  Selecting multiple connections in Windows 
  4337.  
  4338.  To select several connections, do the following: 
  4339.  
  4340.    1. Hold down the Shift key. 
  4341.  
  4342.    2. Move the mouse pointer over a connection. 
  4343.  
  4344.    3. Click mouse button 1 while the mouse pointer is over the connection line. 
  4345.  
  4346.    4. Without releasing the Shift key, repeat the preceding steps until all 
  4347.       connections that you want to select are selected. 
  4348.  
  4349.  
  4350. ΓòÉΓòÉΓòÉ 45.6.2. Deselect connections ΓòÉΓòÉΓòÉ
  4351.  
  4352. If you want to deselect a connection without selecting another part or 
  4353. connection, do the following: 
  4354.  
  4355.    1. Move the mouse pointer over the connection line. 
  4356.  
  4357.    2. Hold down one of the following keys: 
  4358.  
  4359.           In OS/2, hold down the Ctrl key. 
  4360.           In Windows, hold down the Shift key. 
  4361.  
  4362.    3. Click mouse button 1. 
  4363.  
  4364.  
  4365. ΓòÉΓòÉΓòÉ 45.6.3. Change the source and target of connections ΓòÉΓòÉΓòÉ
  4366.  
  4367. Visual Builder gives you the ability to change what a connection is pointing to 
  4368. (the target) or pointing from (the source). Of course, you could always just 
  4369. delete the connection and create a new one. However, the following steps show 
  4370. you a quicker way to do this. 
  4371.  
  4372. Moving either end of a connection 
  4373.  
  4374.    1. Select the connection. 
  4375.  
  4376.    2. Move the mouse pointer over either selection handle that appears on the 
  4377.       ends of the connection. 
  4378.  
  4379.    3. Press and hold mouse button 2. 
  4380.  
  4381.    4. Move the mouse pointer to the new part or connection. 
  4382.  
  4383.    5. Release the mouse button. 
  4384.  
  4385.  Depending on the connection type, you may get a pop-up menu asking you for new 
  4386.  information for the connection. 
  4387.  
  4388.  What you can change 
  4389.  
  4390.  You can change the source end of any connection. In most cases, you can also 
  4391.  change the target end. However, depending on the feature that you connect to 
  4392.  when you make the change, you might get a different type of connection than 
  4393.  the one you started with. If you change the target part of a feature-to-action 
  4394.  connection to a part that does not support the target action, the connection 
  4395.  menu appears, and you can select a new action or custom logic. 
  4396.  
  4397.  The following table gives you a closer look at the connection types and what 
  4398.  you can change without changing the connection type: 
  4399.  
  4400.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4401.   ΓöéConnection type               ΓöéMove either end  ΓöéMove source end  Γöé
  4402.   Γöé                              Γöé                 Γöéonly             Γöé
  4403.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4404.   Γöéattribute-to-attribute        Γöéx                Γöé                 Γöé
  4405.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4406.   Γöéattribute-to-member function  Γöé                 Γöéx                Γöé
  4407.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4408.   Γöéattribute-to-action           Γöéx                Γöé                 Γöé
  4409.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4410.   Γöéevent-to-action               Γöéx                Γöé                 Γöé
  4411.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4412.   Γöéevent-to-attribute            Γöéx                Γöé                 Γöé
  4413.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4414.   Γöéevent-to-member function      Γöé                 Γöéx                Γöé
  4415.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4416.   Γöécustom logic                  Γöéx                Γöé                 Γöé
  4417.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4418.   Γöéparameter connection          Γöéx                Γöé                 Γöé
  4419.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4420.  
  4421.  
  4422. ΓòÉΓòÉΓòÉ 45.7. Make the connections for the OASearch application ΓòÉΓòÉΓòÉ
  4423.  
  4424. The following sections show you how to connect the parts that were used to 
  4425. create a GUI for the OAContractView part in Constructing a GUI: the OASearch 
  4426. Application 
  4427.  
  4428.      Connecting the variable part 
  4429.  
  4430.      Enabling push buttons when an entry field contains a value 
  4431.  
  4432.      Passing exceptions to message boxes 
  4433.  
  4434.      Enabling a window to be cleared of all entry values 
  4435.  
  4436.  
  4437. ΓòÉΓòÉΓòÉ 45.7.1. Connect the variable part ΓòÉΓòÉΓòÉ
  4438.  
  4439. The Contract variable part was added in Adding a Variable to a Composite Part. 
  4440. Once you have added the variable to the free-form surface and set its name and 
  4441. type, you need to connect it to the OAContractView composite part. 
  4442.  
  4443. Making the attribute-to-attribute connections 
  4444.  
  4445. So that recruiters can display and update contract information held by the 
  4446. Contract variable, you must make attribute-to-attribute connections between the 
  4447. composite visual part and the Contract variable part as follows: 
  4448.  
  4449.  From part, feature            To part, feature 
  4450.  
  4451.  Contract,#accountNum          AcctNumEF,#text 
  4452.  
  4453.  Contract,#companyName         CompanyEF,#text 
  4454.  
  4455.  Contract,#projectMgr          ProjMgrEF,#text 
  4456.  
  4457.  Contract,#deptName            DeptEF,#text 
  4458.  
  4459.  Contract,#positionTitle       TitleEF,#text 
  4460.  
  4461.  Contract,#startDate           StartEF,#text 
  4462.  
  4463.  Contract,#endDate             EndEF,#text 
  4464.  
  4465.  Contract,#currContractor      ContractorEF,#text 
  4466.  
  4467.  So far, the connections appear as shown in the following figure: 
  4468.  
  4469.  
  4470. ΓòÉΓòÉΓòÉ 45.7.2. Enable push buttons when an entry field contains a value ΓòÉΓòÉΓòÉ
  4471.  
  4472. This section shows you how to make the connections that enable the Refresh and 
  4473. Save push buttons in the OAContractView window. When you have made these 
  4474. connections, the window appears as shown in the following figure: 
  4475.  
  4476. Enabling the push buttons 
  4477.  
  4478.    1. From the AcctNumEF part's pop-up menu, select Connect. 
  4479.  
  4480.    2. Select textLength from the list. 
  4481.  
  4482.    3. Click on the Refresh push button. 
  4483.  
  4484.    4. Select enabled from the pop-up menu. 
  4485.  
  4486.    5. Follow the same procedure to connect the text attribute of the AcctNumEF 
  4487.       part to the enabled action of the Save push button part. 
  4488.  
  4489.  Making the event-to-action connections 
  4490.  
  4491.  To enable push buttons on the composite visual part, you must make 
  4492.  event-to-action connections. This is a two-step process, because you specified 
  4493.  an input parameter for each of the data access actions. First, connect each 
  4494.  push button to the Contract variable. The connection line appears dashed, 
  4495.  indicating an incomplete connection. Next, connect the attribute that 
  4496.  represents the input parameter to the event-to-action connection itself. 
  4497.  
  4498.  For this example, make the following connections: 
  4499.  
  4500.  From part, feature                        To part, feature 
  4501.  
  4502.  RefreshPB,#buttonClickEvent               Contract,#getContract 
  4503.  
  4504.  AcctNumEF,#text                           The anAccountNum parameter of the 
  4505.                                            RefreshPB,#buttonClickEvent--> 
  4506.                                            Contract,#getContract connection. 
  4507.                                            Visual Builder draws the parameter 
  4508.                                            connection in the opposite 
  4509.                                            direction. 
  4510.  
  4511.  SavePB,#buttonClickEvent                  Contract,#putContract 
  4512.  
  4513.  AcctNumEF,#text                           The anAccountNum parameter of the 
  4514.                                            SavePB,#buttonClickEvent--> 
  4515.                                            Contract,#putContract connection. 
  4516.                                            Visual Builder draws the parameter 
  4517.                                            connection in the opposite 
  4518.                                            direction. 
  4519.  
  4520.  The connections now appear as shown in the following figure: 
  4521.  
  4522.  The putContract and getContract actions throw exceptions when the account 
  4523.  number is not found in the database. 
  4524.  
  4525.  The next step is passing the exceptions to a message box. 
  4526.  
  4527.  
  4528. ΓòÉΓòÉΓòÉ 45.7.3. Pass exceptions to message boxes ΓòÉΓòÉΓòÉ
  4529.  
  4530. You can trigger the display of a message box when an exception is thrown. 
  4531. Although a message box is a user-interface element, Visual Builder treats 
  4532. message boxes as nonvisual parts. 
  4533.  
  4534. Adding the message box 
  4535.  
  4536. To add a message box to the free-form surface, select , the Other category, 
  4537. from the parts palette; then add , an IMessageBox* part, to the free-form 
  4538. surface. 
  4539.  
  4540. Making the connections 
  4541.  
  4542. Now, connect the exceptionOccurred event of each event-to-action connection to 
  4543. the showException action of the message box. 
  4544.  
  4545. The connections appear as shown in the following figure. Save and close your 
  4546. visual part. 
  4547.  
  4548.  
  4549. ΓòÉΓòÉΓòÉ 45.7.4. Enable a window to be cleared of all entry values ΓòÉΓòÉΓòÉ
  4550.  
  4551. You can enable the Clear push button to empty all entry fields of their 
  4552. contents using more than one method. 
  4553.  
  4554. For this example, assume that the member function has been written. Make the 
  4555. connection as follows: 
  4556.  
  4557.    1. From the Composition Editor, use Alt+mouse button 2 to select the 
  4558.       buttonClickEvent of the Clear push button. 
  4559.  
  4560.       The connection spider appears. 
  4561.  
  4562.    2. Use Alt+mouse button 2 to select an empty section of the free-form 
  4563.       surface. 
  4564.  
  4565.    3. Select More from the pop-up menu. 
  4566.  
  4567.    4. Enter the member function declaration in the entry field as shown in the 
  4568.       following figure: 
  4569.  
  4570.    5. Select the OK push button. 
  4571.  
  4572.    6. Switch to the Class Editor. 
  4573.  
  4574.       Include the files containing the member function code. For this example, 
  4575.       the file names are oafwclr.cpv and oafwclr.hpv. 
  4576.  
  4577.         a. In the User .hpv file field, type the name of the header file, 
  4578.            oafwclr.hpv 
  4579.  
  4580.         b. In the User .cpv file field, type the name of the code file, 
  4581.            oafwclr.cpv 
  4582.  
  4583.  For details on the attributes, actions, or events of a particular Visual 
  4584.  Builder part, refer to the Visual Builder Parts Reference. For more 
  4585.  information on how to perform these operations, see Making the Connections. 
  4586.  
  4587.  
  4588. ΓòÉΓòÉΓòÉ 46. Display objects in a list box ΓòÉΓòÉΓòÉ
  4589.  
  4590. The following steps show you how to modify the original To-Do List application 
  4591. to use objects instead of text strings. If you have not already done so, 
  4592. complete the original application, shown in Creating a Simple Visual Builder 
  4593. Application, before continuing with this example. 
  4594.  
  4595.      Copying the ToDoList part 
  4596.  
  4597.      Creating the ToDoItem nonvisual part 
  4598.  
  4599.      Replacing and modifying the list box 
  4600.  
  4601.      Placing and modifying an IVBFactory* part 
  4602.  
  4603.      Placing and modifying an IVSequence* part 
  4604.  
  4605.      Making the new connections 
  4606.  
  4607.      Generating the source code for your visual part and main() procedure 
  4608.  
  4609.      Building and running the modified application 
  4610.  
  4611.  
  4612. ΓòÉΓòÉΓòÉ 46.1. Copy the ToDoList part ΓòÉΓòÉΓòÉ
  4613.  
  4614. First, you must copy the ToDoList part, as follows: 
  4615.  
  4616.    1. Select ToDoList.vbb. Visual Builder displays the name of the ToDoList 
  4617.       part in the Visual Parts list box. 
  4618.  
  4619.    2. Select the ToDoList part. 
  4620.  
  4621.    3. Select PartCopy. Visual Builder displays the Copy Part window. 
  4622.  
  4623.    4. Enter ToDoLst2 in the Target part name field. 
  4624.  
  4625.    5. Enter todolst2.vbb in the Target file name field. 
  4626.  
  4627.    6. Select the Copy push button. Visual Builder creates a copy of the 
  4628.       ToDoList part, gives it the name todolst2, and stores it in the 
  4629.       todolst2.vbb file. 
  4630.  
  4631.  
  4632. ΓòÉΓòÉΓòÉ 46.2. Create the ToDoItem nonvisual part ΓòÉΓòÉΓòÉ
  4633.  
  4634. The next step is to create a nonvisual part called ToDoItem, as follows: 
  4635.  
  4636.    1. Open a new nonvisual part by doing the following: 
  4637.  
  4638.         a. In the Visual Builder window, select PartNew. Visual Builder 
  4639.            displays the Part - New window. 
  4640.  
  4641.         b. Fill in the fields in this window as follows. 
  4642.  
  4643.            Class name         ToDoItem 
  4644.            Description        Type of objects in To-Do List 
  4645.            File name          todolst2.vbb 
  4646.            Part type          Nonvisual part 
  4647.            Base class         IStandardNotifier 
  4648.  
  4649.         c. Select the Open push button. Visual Builder displays the Part 
  4650.            Interface Editor. 
  4651.  
  4652.    2. Create a new attribute called toDoItemName by doing the following: 
  4653.  
  4654.         a. On the Attribute page, fill in the following fields: 
  4655.  
  4656.            Attribute name        toDoItemName 
  4657.            Attribute type        IString 
  4658.  
  4659.         b. Select the Add with defaults push button. Visual Builder adds the 
  4660.            toDoItemName attribute to the ToDoItem part. 
  4661.  
  4662.                      You can add the toDoItemName attribute to the preferred 
  4663.                      features list so that it will be readily available for 
  4664.                      making connections by doing the following: 
  4665.                        a. Switch to the Part Interface Editor, if you are not 
  4666.                           already there. 
  4667.  
  4668.                        b. Select the Preferred page. 
  4669.  
  4670.                        c. Scroll down the list of attributes until you find the 
  4671.                           toDoItemName attribute and select it. 
  4672.  
  4673.                        d. Select the Add>> push button. Visual Builder adds the 
  4674.                           toDoItemName attribute to the list of preferred 
  4675.                           features so that it will appear in the pop-up 
  4676.                           connection menu. 
  4677.  
  4678.    3. Specify the .hpv and .cpv files for Visual Builder to use for the default 
  4679.       feature code for the toDoItemName attribute by doing the following: 
  4680.  
  4681.         a. Switch to the Class Editor if you followed the steps in the 
  4682.            preceding hint. 
  4683.  
  4684.         b. Fill in the following fields: 
  4685.  
  4686.            User .hpv file        ToDoItem.hpv 
  4687.            User .cpv file        ToDoItem.cpv 
  4688.  
  4689.    4. Generate the default source and feature code for the ToDoItem part by 
  4690.       doing the following: 
  4691.  
  4692.         a. Select FileSave and generatePart source. 
  4693.  
  4694.            Visual Builder generates the code for the ToDoItem part and stores 
  4695.            it in files named ToDoItem.hpp and ToDoItem.cpp. These files contain 
  4696.            the appropriate include statements for the ToDoItem.hpv and 
  4697.            ToDoItem.cpv files. Visual Builder also creates a header file for 
  4698.            the declarations (ToDoItem.h) and a resource include file for the 
  4699.            class (ToDoItem.rci). 
  4700.  
  4701.         b. Select FileSave and generateFeature source. Visual Builder displays 
  4702.            the ToDoItem - Generate Feature Source Code window, as shown in the 
  4703.            following figure. 
  4704.  
  4705.         c. Select the Generate all push button. Visual Builder generates the 
  4706.            default code for the toDoItemName attribute and displays a message 
  4707.            telling you where the files containing feature source code are 
  4708.            stored. Click on OK to continue. 
  4709.  
  4710.    5. Override the asString member function in the IVBase* part by doing the 
  4711.       following: 
  4712.  
  4713.         a. Using your favorite text editor, edit the ToDoItem.hpv file and 
  4714.            insert the following at the bottom of the public section: 
  4715.  
  4716.             IString ToDoItem :: asString () const; 
  4717.  
  4718.         b. Save the file. 
  4719.  
  4720.         c. Edit the ToDoItem.cpv file and insert the following at the bottom of 
  4721.            the file: 
  4722.  
  4723.            IString ToDoItem :: asString () const {  return toDoItemName(); } 
  4724.  
  4725.         d. Save the file and close the text editor. 
  4726.  
  4727.    6. Close the open Visual Builder editor (Class Editor or Part Interface 
  4728.       Editor). 
  4729.  
  4730.  The ToDoItem part is now completed. 
  4731.  
  4732.  
  4733. ΓòÉΓòÉΓòÉ 46.3. Replace and modify the list box ΓòÉΓòÉΓòÉ
  4734.  
  4735. You need a list box that can display objects instead of just text strings, so 
  4736. next you must replace the IListBox* part with an ICollectionViewListBox* part, 
  4737. and then modify the ICollectionViewListBox* part to specify the type of objects 
  4738. it can display. 
  4739.  
  4740. Replacing IListBox* with ICollectionViewListBox* 
  4741.  
  4742.    1. Open the ToDoLst2 part. 
  4743.  
  4744.    2. Delete the IListBox* part. 
  4745.  
  4746.       The IListBox* part only accepts strings. You want a part that accepts 
  4747.       objects. 
  4748.  
  4749.       Visual Builder displays a message advising you that it will delete the 
  4750.       connections as well as the list box if you continue. You want to delete 
  4751.       the connections because you need different connections for this example. 
  4752.  
  4753.    3. Select the OK push button. Visual Builder deletes the list box and the 
  4754.       connections. 
  4755.  
  4756.    4. Select , the Lists category, from the row of icons on the left-hand side 
  4757.       of the parts palette. 
  4758.  
  4759.    5. Select , the ICollectionViewListBox* icon, from the row of icons that 
  4760.       Visual Builder displays on the right-hand side of the parts palette. 
  4761.  
  4762.    6. Place the crosshairs below the lower-left corner of the second static 
  4763.       text part and click mouse button 1. 
  4764.  
  4765.       A list box part that displays the items in a collection is placed beneath 
  4766.       the second static text part. 
  4767.  
  4768.  Specifying the type of items the list box can contain 
  4769.  
  4770.    1. Move the mouse pointer to the list box, click mouse button 2, and select 
  4771.       Open settings. Visual Builder displays the settings notebook for the list 
  4772.       box. 
  4773.  
  4774.    2. Enter ToDoItem in the Subpart name field. 
  4775.  
  4776.    3. Enter ToDoItem* in the Item type field. 
  4777.  
  4778.    4. Select the OK push button. 
  4779.  
  4780.       The list box can now accept only ToDoItem* objects. 
  4781.  
  4782.  
  4783. ΓòÉΓòÉΓòÉ 46.4. Place and modify an IVBFactory* part ΓòÉΓòÉΓòÉ
  4784.  
  4785. You need an object factory part to create the objects to be displayed in the 
  4786. list box. In addition, you must specify the type of objects the IVBFactory* 
  4787. part can create. 
  4788.  
  4789. Placing an object factory part on the free-form surface 
  4790.  
  4791.    1. Select , the Models category, from the row of icons on the left-hand side 
  4792.       of the parts palette. 
  4793.  
  4794.    2. Select , the IVBFactory* icon, from the row of icons that Visual Builder 
  4795.       displays on the right-hand side of the parts palette. 
  4796.  
  4797.    3. Place an object factory part on the free-form surface to the right of the 
  4798.       To-Do List window adjacent to the entry field. 
  4799.  
  4800.    4. Change the text beneath the object factory icon to ItemFactory. 
  4801.  
  4802.  Specifying the type of objects the object factory can create 
  4803.  
  4804.    1. Move the mouse pointer to the object factory, click mouse button 2, and 
  4805.       select Change type. Visual Builder displays a window in which you are to 
  4806.       enter the type of objects that the object factory is to create. 
  4807.  
  4808.    2. Enter ToDoItem* in the entry field in this window. 
  4809.  
  4810.    3. Select the OK push button. 
  4811.  
  4812.       The object factory can now create only ToDoItem objects. 
  4813.  
  4814.  
  4815. ΓòÉΓòÉΓòÉ 46.5. Place and modify an IVSequence* part ΓòÉΓòÉΓòÉ
  4816.  
  4817. You also need to place an IVSequence* part to put the objects that the 
  4818. IVBFactory* part creates into a sequence; you must also specify the type of 
  4819. objects the sequence can contain. 
  4820.  
  4821. Placing an IVSequence* part on the free-form surface 
  4822.  
  4823.    1. Select OptionsAdd part. Visual Builder displays the Add Part window. 
  4824.  
  4825.    2. Enter IVSequence* in the Part class field. 
  4826.  
  4827.    3. Enter ItemSequence in the Name field. 
  4828.  
  4829.    4. Select the Add push button. 
  4830.  
  4831.    5. Place an IVSequence* part on the free-form surface to the right of the 
  4832.       To-Do List window adjacent to the list box. 
  4833.  
  4834.  Specifying the type of objects in the sequence 
  4835.  
  4836.    1. Move the mouse pointer to the sequence, click mouse button 2, and select 
  4837.       Open settings. Visual Builder displays the settings notebook for the 
  4838.       sequence. 
  4839.  
  4840.    2. Enter ToDoItem in the Subpart name field. 
  4841.  
  4842.    3. Enter ToDoItem* in the Item type field. 
  4843.  
  4844.    4. Select the OK push button. 
  4845.  
  4846.       The sequence can now accept only ToDoItem objects. 
  4847.  
  4848.  
  4849. ΓòÉΓòÉΓòÉ 46.6. Make the new connections ΓòÉΓòÉΓòÉ
  4850.  
  4851. The following steps describe the connections that this example requires to add 
  4852. objects to and remove objects from the list box. To review the instructions for 
  4853. connecting features, see Making the Connections. 
  4854.  
  4855.    1. Connect the buttonClickEvent feature of the Add push button to the new 
  4856.       action of the object factory. 
  4857.  
  4858.       This connection causes the object factory to create a new ToDoItem object 
  4859.       whenever a user clicks the Add push button. 
  4860.  
  4861.    2. Connect the toDoItemName attribute of the object factory to the text 
  4862.       attribute of the entry field. 
  4863.  
  4864.       This connection causes text in the entry field to be used as the name of 
  4865.       ToDoItem objects that the object factory creates. Notice that the 
  4866.       connection line is violet, the color of a parameter connection, instead 
  4867.       of cyan, which is the color of an attribute-to-attribute connection. The 
  4868.       connection line is violet because the text attribute of the entry field 
  4869.       supplies a value for the toDoItemName attribute only when the object 
  4870.       factory creates a new object, just as if it were satisfying a parameter 
  4871.       of the new action. 
  4872.  
  4873.    3. Connect the newEvent attribute of the object factory to the addAsLast 
  4874.       action of the sequence. 
  4875.  
  4876.       This connection causes each new ToDoItem object to be added as the last 
  4877.       object in the sequence. 
  4878.  
  4879.    4. Connect the this attribute of the sequence to the items attribute of the 
  4880.       list box. 
  4881.  
  4882.       This connection causes the list box to display all of the ToDoItem 
  4883.       objects that the sequence contains. 
  4884.  
  4885.    5. Connect the buttonClickEvent feature of the Remove push button to the 
  4886.       removeAtPosition action of the sequence. 
  4887.  
  4888.       This connection causes the object at a specified position in the sequence 
  4889.       to be removed. This connection is incomplete because the removeAtPosition 
  4890.       action's position parameter must be satisfied. 
  4891.  
  4892.    6. Connect the position parameter of the previous connection to the 
  4893.       selectedCollectionPosition attribute of the list box. 
  4894.  
  4895.       This connection provides the position of the selected item in the 
  4896.       collection of objects, which is required by the previous connection in 
  4897.       order to remove an object. 
  4898.  
  4899.  
  4900. ΓòÉΓòÉΓòÉ 46.7. Generate the source code for your visual part and main() procedure ΓòÉΓòÉΓòÉ
  4901.  
  4902. To generate the C++ source code for your visual part, select FileSave and 
  4903. generatePart source. Visual Builder generates the following files in the 
  4904. working directory: 
  4905.  
  4906.  todolst2.cpp   The C++ code for your todolst2 part. 
  4907.  todolst2.hpp   The C++ header file for your todolst2 part. 
  4908.  todolst2.h     The resource header file for your todolst2.cpp file. 
  4909.  todolst2.rci   The resource file for your todolst2.rcx file, which will be 
  4910.                 created when you generate source code for your main() function. 
  4911.  
  4912.  Generating the source code for your main() procedure 
  4913.  
  4914.  To generate the source code for your main() procedure, select FileSave and 
  4915.  generatemain() for part. Visual Builder generates the following files in the 
  4916.  working directory: 
  4917.  
  4918.  todolst2.app   The main function for your application. 
  4919.  
  4920.                 Note:  If you start Visual Builder from a WorkFrame project, 
  4921.                        the name of this file is vbmain.cpp. 
  4922.  
  4923.  todolst2.mak   The make file that you specify when you build your application. 
  4924.  
  4925.                 Note:  You must select OptionsGenerate make files in the Visual 
  4926.                        Builder window to generate this file. 
  4927.  
  4928.  todolst2.rcx   The main resource file. It includes a resource (.rci) file for 
  4929.                 each part that you generated part source for. In this example, 
  4930.                 there is only one, todolst2.rci, because you only needed to 
  4931.                 generate part source for one part. 
  4932.  
  4933.  
  4934. ΓòÉΓòÉΓòÉ 46.8. Build and run the modified application ΓòÉΓòÉΓòÉ
  4935.  
  4936. You should now be ready to build and run your modified To-Do List application, 
  4937. as follows: 
  4938.  
  4939. Building the new To-Do List application 
  4940.  
  4941.    1. Open a command window. 
  4942.  
  4943.    2. Change to your Visual Builder working directory. 
  4944.  
  4945.    3. Enter the following command: 
  4946.  
  4947.       nmake todolst2.mak 
  4948.  
  4949.       This command produces the following files: 
  4950.  
  4951.       todolst2.exe        The executable file for your application. 
  4952.  
  4953.       todolst2.map        The application configuration map. 
  4954.  
  4955.       todolst2.o          The object file for your application. 
  4956.  
  4957.                           Note:  If you start Visual Builder from a WorkFrame 
  4958.                                  project, the name of this file is vbmain.obj. 
  4959.  
  4960.       todolst2.rc         The preprocessed resource file for your application. 
  4961.                           Visual Builder concatenates and places all resource 
  4962.                           files into this file. 
  4963.  
  4964.       todolst2.obj        The object file for your part. Visual Builder 
  4965.                           provides a separate object module for your part that 
  4966.                           is used when compiling this part with other parts. 
  4967.  
  4968.       todolst2.res        The binary resource file that is bound to 
  4969.                           todolst2.exe. 
  4970.  
  4971.  Running the new To-Do List application 
  4972.  
  4973.  To run your application from the same command prompt from which you entered 
  4974.  the nmake command, enter the following: 
  4975.  
  4976.  todolst2 
  4977.  
  4978.  Once your application is running, experiment with it to make sure it works as 
  4979.  you designed it. 
  4980.  
  4981.  You can add a finishing touch to your application by creating a program object 
  4982.  in OS/2 or a shortcut in Windows. Once you have done this, you can run your 
  4983.  application by simply double-clicking on the program object or shortcut you 
  4984.  just created. 
  4985.  
  4986.  
  4987. ΓòÉΓòÉΓòÉ 47. Create resizable windows ΓòÉΓòÉΓòÉ
  4988.  
  4989.      Adding a multicell canvas 
  4990.  
  4991.      Adding parts to the multicell canvas 
  4992.  
  4993.      Changing the multicell canvas grid 
  4994.  
  4995.      Extending a part to span more than one cell 
  4996.  
  4997.      Adding a group box 
  4998.  
  4999.      Changing the settings for a multicell canvas 
  5000.  
  5001.  
  5002. ΓòÉΓòÉΓòÉ 47.1. Add a multicell canvas ΓòÉΓòÉΓòÉ
  5003.  
  5004. This example is based on OAContractView, found in oawin.vbb. 
  5005.  
  5006.    1. Because you are constructing a new user interface, begin by creating a 
  5007.       visual part. Name it contractView. 
  5008.  
  5009.       When you create a visual part, the Composition Editor opens and an 
  5010.       IFrameWindow* part is automatically added for you. By default, the client 
  5011.       area of the IFrameWindow* part appears as a canvas. 
  5012.  
  5013.    2. Delete the default canvas client. 
  5014.  
  5015.    3. Select , the Composers category, from the left side of the parts palette. 
  5016.  
  5017.    4. Select , the IMultiCellCanvas* part, from the right side of the parts 
  5018.       palette and drop it on the IFrameWindow* part. 
  5019.  
  5020.  Your visual part now looks like the following figure: 
  5021.  
  5022.  The next step is adding parts to the multicell canvas. 
  5023.  
  5024.  
  5025. ΓòÉΓòÉΓòÉ 47.2. Add parts to the multicell canvas ΓòÉΓòÉΓòÉ
  5026.  
  5027. When you first drop a multicell canvas, the cell grid appears at its default 
  5028. size in the upper-left corner of the client area. You can now drop parts into 
  5029. the canvas. For the contractView example, do the following: 
  5030.  
  5031.    1. Select , the Data Entry category, from the left side of the parts 
  5032.       palette. 
  5033.  
  5034.    2. Select , the IStaticText* part, from the right side of the parts palette. 
  5035.       When you move the mouse pointer over the free-form surface, the pointer 
  5036.       changes to crosshairs. 
  5037.  
  5038.    3. Drop the part at cell (2,2) of the multicell canvas. 
  5039.  
  5040.       Row 1 was left as a spacer between the top of the multicell canvas and 
  5041.       the window border. When you drop the IStaticText* part, cell (2,2) 
  5042.       expands to contain the dropped part. The multicell canvas now looks like 
  5043.       the following figure: 
  5044.  
  5045.    4. Drop another IStaticText* part at cell (4,2), leaving row 3 as a spacer. 
  5046.       The multicell canvas now looks like the following figure: 
  5047.  
  5048.    5. Drop two more IStaticText* parts into the expansion area below the 
  5049.       StaticText2 part. 
  5050.  
  5051.       Each time you drop a part into the expansion area, a new row is created 
  5052.       for you. 
  5053.  
  5054.    6. Drop three more IStaticText* parts in column 3 as shown in the following 
  5055.       figure: 
  5056.  
  5057.       No spacer rows exist yet between these new rows. We will add these in 
  5058.       Adding Rows or Columns. Now add some IEntryField* parts. 
  5059.  
  5060.    7. Select , the Data Entry category, from the left side of the parts 
  5061.       palette. 
  5062.  
  5063.    8. Select , the IEntryField* part, from the right side of the parts palette. 
  5064.  
  5065.    9. Drop IEntryField* parts in the expansion area to the right of the 
  5066.       IStaticText* parts, starting at row 2. A new column 6 is created, as 
  5067.       shown in the following figure: 
  5068.  
  5069.  
  5070. ΓòÉΓòÉΓòÉ 47.3. Change the multicell canvas grid ΓòÉΓòÉΓòÉ
  5071.  
  5072. You can add or delete rows or columns from a multicell canvas as follows: 
  5073.  
  5074.      To add rows or columns from the expansion area, you can just drop parts 
  5075.       into it, as discussed in Adding Parts to the Multicell Canvas. 
  5076.  
  5077.      To add several rows or columns at a time, you might find it easiest to 
  5078.       change the grid using the multicell canvas's settings notebook. This 
  5079.       method is discussed in Changing the Multicell Canvas Grid Using the 
  5080.       Settings Notebook. 
  5081.  
  5082.      With the multicell canvas selected, you can press mouse button 2 and use 
  5083.       the contextual menu. For more information on this method, see the 
  5084.       following: 
  5085.  
  5086.         -  Adding Rows or Columns Using the Contextual Menu 
  5087.  
  5088.         -  Deleting Rows or Columns Using the Contextual Menu 
  5089.  
  5090.  
  5091. ΓòÉΓòÉΓòÉ 47.3.1. Add rows or columns using the contextual menu ΓòÉΓòÉΓòÉ
  5092.  
  5093. You can add rows or columns anywhere on the multicell canvas as follows: 
  5094.  
  5095.    1. Select a cell next to where you want to add the row or column. 
  5096.  
  5097.       Note:  No selection handles are shown on the cell if it is empty. Also, 
  5098.              you can only open the contextual menu for an empty cell. 
  5099.  
  5100.    2. Press mouse button 2 to open the contextual menu. 
  5101.  
  5102.    3. To add a row, select Rows. To add a column, select Columns. 
  5103.  
  5104.       A cascade menu appears. 
  5105.  
  5106.    4. If you want to insert the row above the cell you selected, select Add row 
  5107.       before from the cascade menu. 
  5108.  
  5109.       If you want to insert the row below the cell you selected, select Add row 
  5110.       after from the cascade menu. 
  5111.  
  5112.       For columns, Add column before inserts a column to the left of the 
  5113.       selected cell. Add column after inserts a column to the right of the 
  5114.       selected cell. 
  5115.  
  5116.  For practice, add spacer rows to the contractView example as follows: 
  5117.  
  5118.    1. Select the empty cell to the left of StaticText3.  Add a row after it. 
  5119.  
  5120.    2. Add one row each after StaticText4 through StaticText7. 
  5121.  
  5122.  At this point, the contractView window looks like the following figure: 
  5123.  
  5124.  
  5125. ΓòÉΓòÉΓòÉ 47.3.2. Delete rows or columns using the contextual menu ΓòÉΓòÉΓòÉ
  5126.  
  5127. You can delete rows or columns from anywhere on the multicell canvas as 
  5128. follows: 
  5129.  
  5130.    1. Select an empty cell in the row or column you want to delete. 
  5131.  
  5132.    2. Press mouse button 2 to open the contextual menu. 
  5133.  
  5134.    3. To delete the row, select Rows. Then select Delete row. 
  5135.  
  5136.       To delete the column, select Columns. Then select Delete column. 
  5137.  
  5138.  
  5139. ΓòÉΓòÉΓòÉ 47.4. Extend a part to span more than one cell ΓòÉΓòÉΓòÉ
  5140.  
  5141. Build a deck of push buttons using an ISetCanvas* part as a base, as follows: 
  5142.  
  5143.    1. Drop an ISetCanvas* part in the bottom expansion area of column 2. 
  5144.  
  5145.    2. Extend the span of the ISetCanvas* as follows: 
  5146.  
  5147.         a. Select the ISetCanvas* part. 
  5148.  
  5149.         b. Holding the Alt key with one hand, drag either right-hand part 
  5150.            handle over to the column that contains the IEntryField* parts. 
  5151.  
  5152.         c. Release the mouse. 
  5153.  
  5154.    3. Add three IPushButton* parts to the ISetCanvas* part. 
  5155.  
  5156.       The ISetCanvas* and multicell canvas parts expand to contain the newly 
  5157.       dropped IPushButton* parts. 
  5158.  
  5159.                      To change the way minimum size is calculated for the 
  5160.                      IPushButton* parts, edit Pack Type settings for the 
  5161.                      ISetCanvas* part. 
  5162.  
  5163.    4. Edit the IStaticText* parts so that they appear as shown in the following 
  5164.       figure: Extend each column 2 IStaticText* part into column 3. 
  5165.  
  5166.  
  5167. ΓòÉΓòÉΓòÉ 47.5. Add a group box ΓòÉΓòÉΓòÉ
  5168.  
  5169. In the contractView sample, the column 3 IStaticText* parts and their entry 
  5170. fields belong to the Position Details group shown in the following figure: 
  5171.  
  5172. The group box will extend from cell (10,2) to cell (18,8). 
  5173.  
  5174. Adding the extra rows and columns to hold the group box 
  5175.  
  5176. Extra cells are necessary to hold the group box and provide space between the 
  5177. group box and the parts within it. 
  5178.  
  5179.    1. Add 2 rows above Title. 
  5180.  
  5181.    2. Add 2 rows after Contractor. 
  5182.  
  5183.    3. Add 2 columns after the corresponding IEntryField* parts. 
  5184.  
  5185.  The sample window now looks like the following figure: 
  5186.  
  5187.  Dropping and extending the group box 
  5188.  
  5189.    1. Select , the Data Entry category, from the left side of the parts 
  5190.       palette. 
  5191.  
  5192.    2. Select , the IGroupBox* part, from the right side of the parts palette. 
  5193.  
  5194.    3. Drop the IGroupBox* part into cell (10,2). 
  5195.  
  5196.       This temporarily distorts the multicell canvas. Resize the IFrameWindow* 
  5197.       part to see the extra columns on the right. 
  5198.  
  5199.    4. Select the IGroupBox* part. Holding the Alt key with one hand, drag the 
  5200.       lower-right part handle to cell (18,8) as shown in the following figure: 
  5201.  
  5202.       If necessary, press Alt+Backspace to undo and retry. Edit the IGroupBox* 
  5203.       text to read Position Details. Remember to move the IGroupBox* part up in 
  5204.       the depth order. 
  5205.  
  5206.  
  5207. ΓòÉΓòÉΓòÉ 47.6. Change the settings for a multicell canvas ΓòÉΓòÉΓòÉ
  5208.  
  5209. You can use the General page of the multicell canvas settings notebook to do 
  5210. the following: 
  5211.  
  5212.      Move a dropped part 
  5213.  
  5214.      Change the default minimum size for rows or columns 
  5215.  
  5216.      Add rows or columns 
  5217.  
  5218.      Delete rows or columns 
  5219.  
  5220.      Make fixed rows and columns expandable 
  5221.  
  5222.  This page consists of a series of directly editable tables. 
  5223.  
  5224.  
  5225. ΓòÉΓòÉΓòÉ 47.6.1. Move dropped parts ΓòÉΓòÉΓòÉ
  5226.  
  5227. From the free-form surface, you can move dropped parts by selecting and 
  5228. dragging them to their new locations. You can also move dropped parts between 
  5229. cells in a multicell canvas using the settings notebook as follows: 
  5230.  
  5231.    1. Open settings for the multicell canvas. 
  5232.  
  5233.    2. At the top of the General page is a scrollable list of all parts 
  5234.       contained in the multicell canvas as shown in the following figure: 
  5235.  
  5236.    3. Select the table entry you want to change and edit the highlighted value. 
  5237.       Row and column numbering starts from (1,1) in the upper-left corner of 
  5238.       the multicell canvas. 
  5239.  
  5240.    4. Select the OK push button to close settings. 
  5241.  
  5242.  Use this table for reference whenever you edit row and column settings. 
  5243.  
  5244.  
  5245. ΓòÉΓòÉΓòÉ 47.6.2. Change default minimum size for rows or columns ΓòÉΓòÉΓòÉ
  5246.  
  5247. You can change the minimum size of a row or column when it is empty. The 
  5248. default minimum size is 10 pixels wide (columns) and 10 pixels high (rows), but 
  5249. you can change the default minimum size for individual rows and columns as 
  5250. follows: 
  5251.  
  5252.    1. Open settings for the multicell canvas. 
  5253.  
  5254.    2. The second table on the General settings page is called Rows, as shown in 
  5255.       the following figure: 
  5256.  
  5257.    3. The default height appears as default, To change the minimum height for 
  5258.       row 1, select the Row 1 table entry under Height. Change this to the new 
  5259.       default value in pixels. For example, the minimum height of row 1 in most 
  5260.       views of the OASearch sample application is 20. 
  5261.  
  5262.    4. Scroll down the General page a little more to see the third table on the 
  5263.       page, called Columns. You can edit values in this table in the same way 
  5264.       you edited the Rows table. 
  5265.  
  5266.    5. Select the OK push button to close settings. 
  5267.  
  5268.  
  5269. ΓòÉΓòÉΓòÉ 47.6.3. Add rows or columns using the settings notebook ΓòÉΓòÉΓòÉ
  5270.  
  5271. To save time when adding more than one row or column at a time, use the 
  5272. settings notebook. The methods for adding rows and columns are similar, as 
  5273. follows: 
  5274.  
  5275.    1. Open settings for the multicell canvas. The tables on the General page 
  5276.       are described in Moving Dropped Parts and Changing Default Minimum Size 
  5277.       for Rows or Columns 
  5278.  
  5279.    2. If necessary, scroll down to the Rows table. For a complex layout, 
  5280.       consider resizing the window so that the Controls table is also 
  5281.       displayed. 
  5282.  
  5283.    3. Select the number of a row next to the insertion point. Select the Add 
  5284.       push button. 
  5285.  
  5286.    4. Select either Add before or Add after. 
  5287.  
  5288.           Add before inserts the new row above the selected row. 
  5289.           Add after inserts the new row below the selected row. 
  5290.  
  5291.    5. Select the OK push button to close settings. 
  5292.  
  5293.  
  5294. ΓòÉΓòÉΓòÉ 47.6.4. Delete rows or columns using the settings notebook ΓòÉΓòÉΓòÉ
  5295.  
  5296. To save time when deleting more than one row or column at a time, use the 
  5297. settings notebook. The methods for deleting rows and columns are similar, as 
  5298. follows: 
  5299.  
  5300.    1. Open settings for the multicell canvas. The tables on the General page 
  5301.       are described in Moving Dropped Parts and Changing Default Minimum Size 
  5302.       for Rows or Columns 
  5303.  
  5304.    2. If necessary, scroll down to the Rows table. For a complex layout, 
  5305.       consider resizing the window so that the Controls table is also 
  5306.       displayed. 
  5307.  
  5308.    3. Select the number of the row you want deleted. Select the Delete push 
  5309.       button. 
  5310.  
  5311.    4. Select the OK push button to close settings. 
  5312.  
  5313.  
  5314. ΓòÉΓòÉΓòÉ 47.6.5. Make rows or columns expandable ΓòÉΓòÉΓòÉ
  5315.  
  5316. The methods for making rows and columns expandable are similar, as follows: 
  5317.  
  5318.    1. Open settings for the multicell canvas. The tables on the General page 
  5319.       are described in Moving Dropped Parts and Changing Default Minimum Size 
  5320.       for Rows or Columns 
  5321.  
  5322.    2. If necessary, scroll down to the Rows table. For a complex layout, 
  5323.       consider resizing the window so that the Controls table is also 
  5324.       displayed. 
  5325.  
  5326.    3. The default expansion value appears as default. Select the appropriate 
  5327.       entry from the Rows table under Expand. For the contractView example, 
  5328.       select the row 19 entry. 
  5329.  
  5330.    4. The value d is highlighted. Change it to y and select the Apply push 
  5331.       button. 
  5332.  
  5333.    5. Move the settings notebook window over so you can see the result of your 
  5334.       work, as shown in the following figure: 
  5335.  
  5336.       The expansion area is now hidden. All extra vertical space becomes part 
  5337.       of row 19. 
  5338.  
  5339.    6. When you are finished adjusting row and column expansion settings, select 
  5340.       the OK push button. 
  5341.  
  5342.  To make this row fixed later, enter n in the Expand column. 
  5343.  
  5344.  
  5345. ΓòÉΓòÉΓòÉ 48. Construct containers and notebooks ΓòÉΓòÉΓòÉ
  5346.  
  5347.      Adding container parts 
  5348.  
  5349.         -  Setting up the container 
  5350.  
  5351.         -  Adding container columns 
  5352.  
  5353.         -  Filling the container 
  5354.  
  5355.         -  Clearing the container 
  5356.  
  5357.      Adding notebook parts 
  5358.  
  5359.         -  Adding the notebook 
  5360.  
  5361.         -  Adding notebook pages 
  5362.  
  5363.  
  5364. ΓòÉΓòÉΓòÉ 48.1. Add container parts ΓòÉΓòÉΓòÉ
  5365.  
  5366. In this section, you set up a container in the OASkillView part to hold the 
  5367. OASkill* objects returned as a result of a user's skill query. The completed 
  5368. window looks like the following figure: 
  5369.  
  5370. This example is based on the OASkillView* part, found in oawin.vbb. Before 
  5371. constructing this new visual part, make sure that oanonvis.vbb is loaded into 
  5372. Visual Builder. 
  5373.  
  5374. Adding a container part to the OASkillView* part 
  5375.  
  5376. To add a container part to the OASkillView* part, do the following: 
  5377.  
  5378.    1. Create a new visual part and name it OASkillView. 
  5379.  
  5380.       A frame window and default canvas appear. 
  5381.  
  5382.    2. Select , the Lists category, from the left side of the parts palette. 
  5383.  
  5384.    3. Select , the IVBContainerControl* part, from the right side of the parts 
  5385.       palette and drop the part onto the default canvas. 
  5386.  
  5387.    4. Change the container's name to SkillCnr. 
  5388.  
  5389.    5. Resize the container part as needed. 
  5390.  
  5391.  The next step is setting up the container. 
  5392.  
  5393.  
  5394. ΓòÉΓòÉΓòÉ 48.1.1. Set up the container ΓòÉΓòÉΓòÉ
  5395.  
  5396. You set some container values in the container part and some in the container 
  5397. column part. Set the following values in the container part: 
  5398.  
  5399.      Title and title format 
  5400.      View type 
  5401.      Type of contained objects 
  5402.  
  5403.  Set the following values in the container column parts: 
  5404.  
  5405.      Column heading and width 
  5406.      Attribute to appear in the column 
  5407.      Vertical and horizontal separators 
  5408.      Whether contents can be changed by the user 
  5409.  
  5410.  Setting the container titles 
  5411.  
  5412.  To set the container titles, do the following: 
  5413.  
  5414.    1. Open the settings notebook for SkillCnr. 
  5415.  
  5416.    2. Specify the general settings. In the Title attributes group, type 
  5417.       Contractors Holding This Skill into the Title field. 
  5418.  
  5419.    3. Select both Show title and Show title separator. 
  5420.  
  5421.    4. Select the Left radio button for left title alignment. 
  5422.  
  5423.  Specifying the container type and layout 
  5424.  
  5425.  To specify the container type and layout, do the following: 
  5426.  
  5427.    1. Select showDetailsView from the View type list box. 
  5428.  
  5429.    2. Scroll down on the General page. In the Container item attributes group, 
  5430.       type OASkill* into the Item type field. 
  5431.  
  5432.    3. Select contractorID from the Text drop-down combination box. The Text 
  5433.       field specifies which OASkill attribute would appear as text in the 
  5434.       container's icon view. 
  5435.  
  5436.    4. The Icon field specifies the icon to be used for each item in the 
  5437.       container. Type the following into the Icon field: 
  5438.  
  5439.       #IDynamicLinkLibrary("cppwv33r").loadIcon(803) 
  5440.  
  5441.       cppwv33r.dll is the resource DLL containing the icons for this 
  5442.       application, and 803 is the resource ID for the skill icon that would 
  5443.       appear in the container's icon view. 
  5444.  
  5445.    5. Select the Refresh the container after changes check box. 
  5446.  
  5447.    6. On the Styles page, make sure that the pmCompatible style is set the way 
  5448.       you want it, as follows: 
  5449.  
  5450.           If you select the On radio button, you have access only to functions 
  5451.            that are common to OS/2 and Windows. The compiled container looks 
  5452.            like a Common User Access (CUA) container, even in Windows. 
  5453.  
  5454.           If you select the Off radio button, you have access to all functions 
  5455.            in the native container. This function varies between OS/2 and 
  5456.            Windows. In OS/2, the compiled container looks like a CUA container. 
  5457.            In Windows, the compiled container looks like a native Windows 
  5458.            container. 
  5459.  
  5460.       From now on, the term CUA container refers to an OS/2-like container, 
  5461.       regardless of platform. The term Windows container refers to the native 
  5462.       Windows control. 
  5463.  
  5464.    7. Select the OK push button to save and close the settings notebook. 
  5465.  
  5466.  
  5467. ΓòÉΓòÉΓòÉ 48.1.2. Add container columns ΓòÉΓòÉΓòÉ
  5468.  
  5469. Once you have added a container, add container columns. This is a good idea 
  5470. even if you intend for the container to be used mainly as an icon view. 
  5471.  
  5472. To add container columns, do the following: 
  5473.  
  5474.    1. Select , the Lists category, from the parts palette. 
  5475.  
  5476.    2. Select the Sticky check box. 
  5477.  
  5478.    3. Select , the IContainerColumn* part, from the parts palette. 
  5479.  
  5480.    4. Drop three IContainerColumn* parts on the SkillCnr part. 
  5481.  
  5482.  Setting up an icon container column 
  5483.  
  5484.  To set up icon container columns, do the following: 
  5485.  
  5486.    1. Open up the settings notebook for the first container column. 
  5487.  
  5488.    2. On the General settings page, type Icon in the Heading text field. 
  5489.  
  5490.       Note:  In Windows containers, this column title does not appear. 
  5491.  
  5492.    3. Specify the column's width (in pixels) in the Width field. For this 
  5493.       example, enter 0. 
  5494.  
  5495.    4. Specify the OASkill attribute to appear in this column. Select the Use 
  5496.       the icon attribute set in the container radio button because you want to 
  5497.       display the same information in this container column that the container 
  5498.       displays on the icon view. 
  5499.  
  5500.    5. Set the container so that its elements cannot be changed by the user. 
  5501.       Select the following from the Styles settings page: 
  5502.  
  5503.           For the readOnlyHeading style, select the On radio button. 
  5504.           For the readOnly data style, select the On radio button. 
  5505.  
  5506.    6. Set a vertical separator for container. For the verticalSeparator data 
  5507.       style, select the On radio button. 
  5508.  
  5509.       Note:  In Windows containers, this setting is ignored. 
  5510.  
  5511.    7. Select the OK push button to close the settings notebook. 
  5512.  
  5513.  Setting up string container columns 
  5514.  
  5515.  To set up string container columns, do the following: 
  5516.  
  5517.    1. Open up the settings notebook for the second container column. 
  5518.  
  5519.    2. On the General settings page, type Contractor ID in the Heading text 
  5520.       field. 
  5521.  
  5522.    3. Specify the column's width (in pixels) in the Width field. For this 
  5523.       example, enter 200. 
  5524.  
  5525.                      If you specify a container column width of 0, the column 
  5526.                      is sized according to the width of the longest column 
  5527.                      element. 
  5528.  
  5529.    4. Specify the OASkill attribute to appear in this column. Select the Use 
  5530.       the text attribute set in the container radio button because you want to 
  5531.       display the same information in this container column that the container 
  5532.       displays as text on the icon view. 
  5533.  
  5534.    5. Set the container so that its elements cannot be changed by the user. 
  5535.       Select the following from the Styles settings page: 
  5536.  
  5537.           For the readOnlyHeading style, select the On radio button. 
  5538.           For the readOnly data style, select the On radio button. 
  5539.  
  5540.    6. Set a vertical separator for container. For the verticalSeparator data 
  5541.       style, select the On radio button. 
  5542.  
  5543.    7. Select the OK push button to close the settings notebook. 
  5544.  
  5545.  Repeat this procedure for the third container column, adjusting the width of 
  5546.  the column to fit. The second column is supposed to display the number of 
  5547.  years of experience each contractor has for a certain skill, so use the 
  5548.  following settings: 
  5549.  
  5550.      Select the Use an attribute from the part radio button. 
  5551.      Choose yearsExp to populate the container column. 
  5552.  
  5553.  Do not add a vertical separator. 
  5554.  
  5555.  The next step is filling the container. 
  5556.  
  5557.  
  5558. ΓòÉΓòÉΓòÉ 48.1.3. Fill the container ΓòÉΓòÉΓòÉ
  5559.  
  5560. The easiest way to fill the container is to use a collection part. The 
  5561. OASkillView part uses an IVSequence* part named SkillList. 
  5562.  
  5563. Adding the nonvisual parts 
  5564.  
  5565. The OASearch application uses static parts that are actually found in the 
  5566. OAMain part. All nonvisual parts in this view except SkillList are variables 
  5567. that will be connected later to the actual parts. 
  5568.  
  5569. To add the nonvisual parts, do the following: 
  5570.  
  5571.    1. Add an OASkill* part as a variable. Name it Skill. 
  5572.  
  5573.       For help on how to do this, see 
  5574.  
  5575.    2. Add an OASkillBase* part as a variable. Name it SkillBase. 
  5576.  
  5577.    3. Add an IVSequence* part. Name it SkillList. 
  5578.  
  5579.    4. Add an IMessageBox* part to handle exceptions. 
  5580.  
  5581.  Populating the collection 
  5582.  
  5583.  The SkillBase part contains the action (getSkills) needed to populate the 
  5584.  skill list. The getSkills action takes two parameters, a skill description and 
  5585.  a sequence. 
  5586.  
  5587.  Make the following connections to initialize the collection and fill the 
  5588.  container: 
  5589.  
  5590.  From                             To 
  5591.  
  5592.  OASkillView,#ready               SkillBase,#getSkills 
  5593.  
  5594.  Skill,#skillName                 The aSkillName parameter of the 
  5595.                                   OASkillView,#ready--> SkillBase#getSkills 
  5596.                                   connection. Visual Builder draws the 
  5597.                                   parameter connection in the opposite 
  5598.                                   direction. 
  5599.  
  5600.  SkillList,#this                  The aList parameter of the 
  5601.                                   OASkillView,#ready--> SkillBase#getSkills 
  5602.                                   connection. Visual Builder draws the 
  5603.                                   parameter connection in the opposite 
  5604.                                   direction. 
  5605.  
  5606.  SkillList,#this                  SkillCnr,#items 
  5607.  
  5608.  OASkillView,#ready               SkillCnr,#refresh 
  5609.  
  5610.  Make the following connections to enable the push buttons: 
  5611.  
  5612.  From                             To 
  5613.  
  5614.  Skill,#skillName                 EntryField1,#text 
  5615.  
  5616.  EntryField1,#textLength          RefreshPB,#enabled 
  5617.  
  5618.  RefreshPB,#buttonClickEvent      SkillBase,#getSkills 
  5619.  
  5620.  EntryField1,#text                The aSkillName parameter of the 
  5621.                                   RefreshPB,#buttonClickEvent--> 
  5622.                                   SkillBase,#getSkills connection. Visual 
  5623.                                   Builder draws the parameter connection in the 
  5624.                                   opposite direction. 
  5625.  
  5626.  SkillList,#this                  The aList parameter of the 
  5627.                                   RefreshPB,#buttonClickEvent--> 
  5628.                                   SkillBase,#getSkills connection. Visual 
  5629.                                   Builder draws the parameter connection in the 
  5630.                                   opposite direction. 
  5631.  
  5632.  To handle exceptions, connect the exceptionOccurred feature of the getSkills 
  5633.  connections to the showException feature of the message box part. 
  5634.  
  5635.  
  5636. ΓòÉΓòÉΓòÉ 48.1.4. Clear the container ΓòÉΓòÉΓòÉ
  5637.  
  5638. To clear the container, empty the collection part that supports it. For the 
  5639. OASkillView part, make the following connection to enable the Clear push 
  5640. button: 
  5641.  
  5642.  From                             To 
  5643.  
  5644.  ClearPB,#buttonClickEvent        SkillList,#removeAll 
  5645.  
  5646.  
  5647. ΓòÉΓòÉΓòÉ 48.2. Add notebook parts ΓòÉΓòÉΓòÉ
  5648.  
  5649. The purpose of this section is to guide you through using a notebook part to 
  5650. create the OAContractorView part. The completed window looks like the following 
  5651. figure: 
  5652.  
  5653. If you prefer a native notebook on Windows, the completed window looks like the 
  5654. following figure: 
  5655.  
  5656. The steps in creating a notebook are as follows: 
  5657.  
  5658.      Add the notebook and set it up. 
  5659.      Add notebook pages and set them up. 
  5660.  
  5661.  Begin by adding the notebook. 
  5662.  
  5663.  
  5664. ΓòÉΓòÉΓòÉ 48.2.1. Add the notebook ΓòÉΓòÉΓòÉ
  5665.  
  5666. Before constructing this new visual part, make sure that oanonvis.vbb is loaded 
  5667. into Visual Builder. 
  5668.  
  5669. To add the notebook, do the following: 
  5670.  
  5671.    1. Create a new visual part. Call it OAContractorView. 
  5672.  
  5673.       A frame window and default canvas appear. 
  5674.  
  5675.    2. Delete the default canvas part from the frame window and resize the 
  5676.       window as necessary. 
  5677.  
  5678.    3. Select , the Composers category, from the left side of the parts palette. 
  5679.  
  5680.    4. Select , the INotebook* part, from the right side of the parts palette 
  5681.       and drop the part onto the frame window. An IVBNotebookPage* part and an 
  5682.       ICanvas* part are also dropped for you automatically. 
  5683.  
  5684.  Specifying the notebook layout and appearance 
  5685.  
  5686.  Note:  In Windows, the pmCompatible style setting determines whether most of 
  5687.         these settings are used or ignored. Be sure to read through this entire 
  5688.         section. 
  5689.  
  5690.  You change the notebook's appearance using its settings notebook, as follows: 
  5691.  
  5692.    1. Open the settings notebook for the notebook part. 
  5693.  
  5694.    2. On the General settings page, select the icon that represents the 
  5695.       orientation that you want for the notebook. For this example, select from 
  5696.       the Layout group. 
  5697.  
  5698.    3. From the Binding group, select the Spiral radio button. 
  5699.  
  5700.    4. From the Tab shape group, select the Round radio button. 
  5701.  
  5702.    5. From the Justification group, select the two Center radio buttons. 
  5703.  
  5704.    6. Select the OK push button to close the settings notebook. 
  5705.  
  5706.    7. On the Styles page, make sure that the pmCompatible style is set the way 
  5707.       you want it, as follows: 
  5708.  
  5709.           If you select the On radio button, you have access only to functions 
  5710.            that are common to OS/2 and Windows. The compiled notebook looks 
  5711.            like a Common User Access (CUA) notebook, even in Windows. 
  5712.  
  5713.           If you select the Off radio button, you have access to all functions 
  5714.            in the native notebook. This function varies between OS/2 and 
  5715.            Windows. In OS/2, the compiled notebook looks like a CUA notebook. 
  5716.            In Windows, the compiled notebook looks like a native Windows 
  5717.            notebook. 
  5718.  
  5719.       From now on, the term CUA notebook refers to an OS/2-like notebook, 
  5720.       regardless of platform. The term Windows notebook refers to the native 
  5721.       Windows control. 
  5722.  
  5723.  The next step is adding notebook pages. 
  5724.  
  5725.  
  5726. ΓòÉΓòÉΓòÉ 48.2.2. Add notebook pages ΓòÉΓòÉΓòÉ
  5727.  
  5728. The first notebook page was added for you when you dropped the INotebook* part. 
  5729. You can add notebook pages from either the VBNotebookPage part or the 
  5730. INotebook* part. 
  5731.  
  5732. To add notebook pages from the INotebook* part, do the following: 
  5733.  
  5734.    1. In the Composition Editor, open a contextual menu for the part and select 
  5735.       Add page. 
  5736.  
  5737.    2. From the cascade menu that appears, select either Before top page or 
  5738.       After top page. 
  5739.  
  5740.  For this example, add one page after the initial page. 
  5741.  
  5742.  Setting up the notebook page and tab 
  5743.  
  5744.  To set up the notebook page and tab, do the following: 
  5745.  
  5746.    1. Open the settings notebook for the first notebook page. 
  5747.  
  5748.                      The easiest way to open settings for a notebook page is 
  5749.                      through the Parts List window. Select the notebook; select 
  5750.                      View parts list from the notebook's contextual menu. 
  5751.                      Double-click the icon that represents the notebook page 
  5752.                      you want to set. 
  5753.  
  5754.    2. On the General page, type ContactPage into the Subpart name field. 
  5755.  
  5756.    3. Type Contact into the Tab text field. This text is what appears on the 
  5757.       notebook tab. 
  5758.  
  5759.    4. Type Vital statistics into the Status text field. This text is what 
  5760.       appears in the status area at the bottom of the notebook page. 
  5761.  
  5762.    5. On the Styles page, select the On radio button for the following styles: 
  5763.  
  5764.           The autoPageSize style, to enable automatic sizing of the notebook 
  5765.            page 
  5766.  
  5767.           The statusTextOn style, to enable display of the status text that 
  5768.            you entered in the previous step 
  5769.  
  5770.           The majorTab style, to give the notebook page a major tab 
  5771.  
  5772.  Adding parts to a notebook page 
  5773.  
  5774.  Each notebook page initially contains an ICanvas* part. If you want to use a 
  5775.  different part, delete the ICanvas* part and select another part from the 
  5776.  Composers category, such as IMultiCellCanvas*. 
  5777.  
  5778.  Note:  A notebook page allows only one subpart, which should be a part from 
  5779.         the Composers category. You can, of course, add other subparts to the 
  5780.         Composers part. 
  5781.  
  5782.  The ContactPage subpart contains the primitive parts shown in the following 
  5783.  figure: 
  5784.  
  5785.  To see the other notebook pages, open the OAContractorView part in oawin.vbb. 
  5786.  
  5787.  
  5788. ΓòÉΓòÉΓòÉ 49. Add menus to my application ΓòÉΓòÉΓòÉ
  5789.  
  5790.      Adding a menu bar 
  5791.  
  5792.      Connecting the menu bar to the window 
  5793.  
  5794.      Adding menu choices 
  5795.  
  5796.      Adding menu separators 
  5797.  
  5798.      Connecting menu choices to actions 
  5799.  
  5800.  Begin with adding a menu bar to the window. 
  5801.  
  5802.  
  5803. ΓòÉΓòÉΓòÉ 49.1. Add a menu bar ΓòÉΓòÉΓòÉ
  5804.  
  5805. Begin by opening the visual part that contains the OASearch welcome window, the 
  5806. OAMain part. 
  5807.  
  5808.    1. Select , the Frame Extensions category, from the left side of the parts 
  5809.       palette. 
  5810.  
  5811.    2. Select , the IMenu* part, from the right side of the parts palette and 
  5812.       drop it on the free-form surface next to the window. 
  5813.  
  5814.    3. Connect the menu attribute of the IFrameWindow*-based part to the this 
  5815.       attribute of the menu part. Your part should look similar to what is 
  5816.       shown in the following figure: 
  5817.  
  5818.    4. To add two of the menu choices to the menu bar, add two menu parts on top 
  5819.       of the menu part for the menu bar. 
  5820.  
  5821.       As you add each menu part, a cascade button part is added to the menu bar 
  5822.       and a connection is made between the cascade button part and the menu 
  5823.       part you added. This connection causes the menu part to be displayed when 
  5824.       the user selects the cascade button part. See the following figure: 
  5825.  
  5826.    5. Edit the text of the menu choices as shown in the following figure: To do 
  5827.       this, select each one and press Alt+mouse button 1. 
  5828.  
  5829.  
  5830. ΓòÉΓòÉΓòÉ 49.2. Connect the menu bar to the window ΓòÉΓòÉΓòÉ
  5831.  
  5832. To make the menu a menu bar, connect the this attribute of the IMenu* part to 
  5833. the menu attribute of the window part. Although the menu continues to appear 
  5834. vertically on the free-form surface, this connection defines the menu part as a 
  5835. menu bar. 
  5836.  
  5837.            Because the menu bar is shown outside the frame window, be sure to 
  5838.            leave enough space for it below the window title. 
  5839.  
  5840.  Making this same connection to a part other than a window part, such as a list 
  5841.  part, makes the menu part a pop-up menu instead of a menu bar. 
  5842.  
  5843.  Now that the menu bar has been added, the next step is adding the menu 
  5844.  choices. 
  5845.  
  5846.  
  5847. ΓòÉΓòÉΓòÉ 49.3. Add menu choices ΓòÉΓòÉΓòÉ
  5848.  
  5849. Once the menu structure is complete, you need to add menu choices that do 
  5850. something other than open other menus. 
  5851.  
  5852.    1. Select , the Frame Extensions category, from the left side of the parts 
  5853.       palette. 
  5854.  
  5855.    2. Select , the IMenuItem* part, from the right side of the parts palette. 
  5856.  
  5857.    3. The position at which you click the mouse is where the part is added 
  5858.       within the menu. Drop menu items as follows: 
  5859.  
  5860.           One part as the last item in the Menu1 part 
  5861.           Four items in the Menu2 part 
  5862.           Two items in the Menu3 part 
  5863.  
  5864.  You can change the position of a menu choice part within the menu part by 
  5865.  using mouse button 2 to drag each item to a new position. Position these parts 
  5866.  and change their text as shown in the following figure: The next step is 
  5867.  connecting menu choices to actions. 
  5868.  
  5869.  
  5870. ΓòÉΓòÉΓòÉ 49.4. Add menu separators ΓòÉΓòÉΓòÉ
  5871.  
  5872. Once you have added and edited the OAMain menu items, add a separator bar to 
  5873. Menu2 between Skill and General information as follows: 
  5874.  
  5875.    1. Select , the Frame Extensions category, from the left side of the parts 
  5876.       palette. 
  5877.  
  5878.    2. Select , the IMenuSeparator* part, from the right side of the parts 
  5879.       palette. 
  5880.  
  5881.    3. Drag the IMenuSeparator* part and drop it between Skill and General 
  5882.       Information. 
  5883.  
  5884.  
  5885. ΓòÉΓòÉΓòÉ 49.5. Connect menu choices to actions ΓòÉΓòÉΓòÉ
  5886.  
  5887. Once you have added menu choices, you can connect them to actions in this or 
  5888. other parts. As an example, connect the Exit menu bar item so that when the 
  5889. item is selected, the main window closes, as follows: 
  5890.  
  5891.  From part, feature            To part, feature 
  5892.  
  5893.  MenuItem2,#commandEvent       FrameWindow,#close 
  5894.  
  5895.  Command events occur when a user selects a menu item, push button, or 
  5896.  accelerator key. In this case, the user' selection of Exit generates a command 
  5897.  event to perform the close action on the frame window. 
  5898.  
  5899.  Note:  You cannot promote menu item events to the part interface. 
  5900.  
  5901.  The other menu choices, shown in the following figure, connect to other parts 
  5902.  that are not on this free-form surface. These connections are completed in 
  5903.  Completing the Menu Bar. 
  5904.  
  5905.  
  5906. ΓòÉΓòÉΓòÉ 50. Add help to Visual Builder applications ΓòÉΓòÉΓòÉ
  5907.  
  5908.      Creating the help file 
  5909.  
  5910.      Providing context-sensitive help 
  5911.  
  5912.      Providing general help 
  5913.  
  5914.      Providing the application help window 
  5915.  
  5916.      Providing help for factory-generated frame windows 
  5917.  
  5918.      Providing a Help push button 
  5919.  
  5920.      Displaying fly-over help when the mouse pointer is over a part 
  5921.  
  5922.      Displaying help in an information area 
  5923.  
  5924.  
  5925. ΓòÉΓòÉΓòÉ 50.1. Create the help file ΓòÉΓòÉΓòÉ
  5926.  
  5927. Before connecting the help, create the help file. 
  5928.  
  5929.            When creating help files, try using one of the two help projects 
  5930.            shipped with WorkFrame: IPF documenter help or RTF help. These 
  5931.            formats are outlined in the following section. 
  5932.  
  5933.  Writing portable help 
  5934.  
  5935.  If you want your help file to be usable in both OS/2 and Windows, write your 
  5936.  help source code in Information Presentation Facility (IPF) format. For more 
  5937.  information about creating help source code in IPF format, refer to the IPF 
  5938.  User's Guide. 
  5939.  
  5940.  If portability is not a concern for your Windows application, you can write 
  5941.  your help source code in Rich Text Format (RTF). For information about 
  5942.  creating help source code in RTF, see your Windows documentation. 
  5943.  
  5944.  For your convenience, the OASearch IPF help source appears here, so you do not 
  5945.  need to type it yourself. Select Copy from the Services pull-down menu to copy 
  5946.  the panel text to the system clipboard. Using your favorite editor, create a 
  5947.  new file and paste this text into the file. 
  5948.  
  5949.  Building an IPF help file 
  5950.  
  5951.  Ensure that you have the Information Presentation Facility (IPF) compiler 
  5952.  installed on your system and that your environment variables are set up to run 
  5953.  the IPF compiler. The IPF compiler comes with VisualAge for C++. 
  5954.  
  5955.  To build the help file, simply run the IPF compiler. For example, if you saved 
  5956.  your help file with the name cppwv33.ipf, you would enter the following 
  5957.  command in the directory where you saved your file: 
  5958.  
  5959.  ipfc cppwv33.ipf 
  5960.  
  5961.  This command generates a file called cppwv33.hlp. 
  5962.  
  5963.  You have now built your help file. The next step is to provide 
  5964.  context-sensitive help in your application. 
  5965.  
  5966.  
  5967. ΓòÉΓòÉΓòÉ 50.2. Sample Help Source Code ΓòÉΓòÉΓòÉ
  5968.  
  5969. :userdoc.
  5970. :title.Opportunities Abound Databases Help
  5971. :docprof toc=1 ctrlarea=page.
  5972. :ctrl ctrlid=buttons controls='ESC SEARCH PRINT' page.
  5973. :h1 res=9998.
  5974. General Help for the Opportunities Abound Databases
  5975. :i1.general help
  5976. :p.Text goes here.
  5977. :h1 res=9999.
  5978. Request for Skill Information Help
  5979. :i1.requesting skill information, help for
  5980. :p.Text goes here.
  5981. :h1 id=10000.
  5982. Skill Information Help
  5983. :i1.skill information, help for
  5984. :p.Text goes here.
  5985. :h1 res=10001.
  5986. Request for Contract Information Help
  5987. :i1.requesting contract information, help for
  5988. :p.Text goes here.
  5989. :h1 res=10002.
  5990. Contract Information Help
  5991. :i1.contract information, help for
  5992. :p.Text goes here.
  5993. :h1 res=10003.
  5994. Request for Contractor Information Help
  5995. :i1.requesting contractor information, help for
  5996. :p.Text goes here.
  5997. :h1 res=10004.
  5998. Contractor Information Help
  5999. :i1.contractor information, help for
  6000. :p.Text goes here.
  6001. :euserdoc.
  6002.  
  6003.  
  6004. ΓòÉΓòÉΓòÉ 50.3. Provide context-sensitive help ΓòÉΓòÉΓòÉ
  6005.  
  6006. To provide context-sensitive help, do the following: 
  6007.  
  6008.    1. Open the settings notebook for the part. 
  6009.  
  6010.    2. Select the Control page. 
  6011.  
  6012.    3. Enter the resource ID for the appropriate help panel in the Help panel ID 
  6013.       field. 
  6014.  
  6015.       When you generate the code for your part, Visual Builder creates a help 
  6016.       table in the resource (.rci) file that it generates and inserts this 
  6017.       number into the help table. 
  6018.  
  6019.    4. If the Enable check box is not checked, select it. 
  6020.  
  6021.    5. Select the OK push button. 
  6022.  
  6023.  The next step is to provide general help in your application. 
  6024.  
  6025.  
  6026. ΓòÉΓòÉΓòÉ 50.4. Provide general help ΓòÉΓòÉΓòÉ
  6027.  
  6028. To provide general help, do the following: 
  6029.  
  6030.    1. Open the settings notebook for the IFrameWindow*-based part. 
  6031.  
  6032.    2. Select the Control page. 
  6033.  
  6034.    3. Enter the resource ID for the general information help panel in the Help 
  6035.       panel ID field. 
  6036.  
  6037.       When you generate the code for your part, Visual Builder creates a help 
  6038.       table in the resource (.rci) file that it generates and inserts this 
  6039.       number into the help table. 
  6040.  
  6041.    4. If the Enable check box is not checked, select it. 
  6042.  
  6043.    5. Select the OK push button. 
  6044.  
  6045.  The next step is to provide a help window to display the help panels in. 
  6046.  
  6047.  
  6048. ΓòÉΓòÉΓòÉ 50.5. Provide the application help window ΓòÉΓòÉΓòÉ
  6049.  
  6050. Once you have added the context-sensitive help and the general help for the 
  6051. main window, you need a help window to display the help panels in. You must 
  6052. place an IHelpWindow* part on the free-form surface to give Visual Builder a 
  6053. window in which to display the help information. 
  6054.  
  6055. The default owner of the IHelpWindow* part is the primary part for your 
  6056. application. If all parts with help enabled are subparts of the primary part, 
  6057. no connections are required. For a more complex implementation where 
  6058. connections are required, see the OAMain part in oawin.vbb. 
  6059.  
  6060. To add a help window to your application, do the following: 
  6061.  
  6062.    1. Select , the Other category, on the parts palette. 
  6063.  
  6064.    2. Select , the IHelpWindow* part, and place it on the free-form surface. 
  6065.  
  6066.    3. Open the settings notebook for the IHelpWindow* part. It looks like the 
  6067.       following figure: 
  6068.  
  6069.    4. In the Title field, enter the title of the help window. 
  6070.  
  6071.       This must be the same title that you entered on the :title tag in your 
  6072.       help source file. 
  6073.  
  6074.    5. In the Help libraries field, enter the name of the help file that you 
  6075.       compiled, such as cppwv33.hlp. 
  6076.  
  6077.       If you had created multiple help files for your application, you would 
  6078.       enter all of their names in this field. 
  6079.  
  6080.    6. We recommend that you leave the Help table ID field empty and let Visual 
  6081.       Builder generate it for you unless you need a specific help table ID. 
  6082.       Otherwise, you could have conflicts in your resource (.rci) file. 
  6083.  
  6084.    7. To use IPF help in Windows, do the following: 
  6085.  
  6086.         a. Select the Styles notebook tab. 
  6087.         b. Next to the ipfCompatible style, select the On radio button. 
  6088.  
  6089.    8. Select the OK push button. 
  6090.  
  6091.  
  6092. ΓòÉΓòÉΓòÉ 50.6. Provide help for factory-generated frame windows ΓòÉΓòÉΓòÉ
  6093.  
  6094. You can associate a help window with a part that is generated by an object 
  6095. factory if the base class of that part is IFrameWindow*. To do this, you can do 
  6096. either of the following: 
  6097.  
  6098.      Edit the part that the object factory generates, place an IHelpWindow* 
  6099.       part on the free-form surface next to it, and do all the things described 
  6100.       in the preceding sections to use the help window properly. Repeat this 
  6101.       step for each IFrameWindow*-based part that is generated by an object 
  6102.       factory. 
  6103.  
  6104.       Use this method if you have created multiple help library (.hlp) files 
  6105.       for your library instead of putting all of your help panels in one 
  6106.       library file. 
  6107.  
  6108.      Place an IHelpWindow* part on the free-form surface in the same view with 
  6109.       the object factory if you have created only one help library file for all 
  6110.       of your help panels. Then, do the following: 
  6111.  
  6112.         1. Open the settings notebook for the IHelpWindow* part. 
  6113.  
  6114.         2. Enter the help window title and the name of the library (.hlp) file. 
  6115.  
  6116.         3. Close the settings notebook by selecting the OK push button. 
  6117.  
  6118.         4. Connect the newEvent feature of the object factory to the 
  6119.            setAssociatedWindow action of the help window. If the object factory 
  6120.            represents a modal window, this connection must occur before the 
  6121.            object factory's showModally connection. For an example, see the 
  6122.            OAMain part in oawin.vbb. 
  6123.  
  6124.         5. Repeat step 4 for each object factory in the view. 
  6125.  
  6126.         6. Edit each IFrameWindow*-based part that an object factory generates 
  6127.            and specify the appropriate help panel IDs for the subparts that you 
  6128.            want to provide help for. Each help panel ID must be a resource ID 
  6129.            in the library file that you specified in step 2. 
  6130.  
  6131.       For an example using one help file, see the OAMain part in oawin.vbb. 
  6132.  
  6133.  
  6134. ΓòÉΓòÉΓòÉ 50.7. Provide a Help push button ΓòÉΓòÉΓòÉ
  6135.  
  6136. To provide a Help push button in your application, do the following: 
  6137.  
  6138.    1. Select , the Buttons category, in the left-hand column on the parts 
  6139.       palette. 
  6140.  
  6141.    2. Select , the IPushButton* part, and place it where you want it to be. 
  6142.  
  6143.    3. Change the text on the push button to Help. 
  6144.  
  6145.    4. Open the settings notebook for the push button. 
  6146.  
  6147.    5. Select the Styles tab. 
  6148.  
  6149.    6. Find help on the Styles page and select the On radio button. This style 
  6150.       turns a regular push button into a help push button. 
  6151.  
  6152.    7. On the same page, find noPointerFocus and select the On radio button. 
  6153.  
  6154.    8. Select the OK push button to close the settings notebook. 
  6155.  
  6156.  You now have a Help push button. If you have followed the steps in the 
  6157.  preceding sections, clicking this button causes the contextual help panel for 
  6158.  the part that currently has the input focus to be displayed. If no part has 
  6159.  the focus, the main help panel for the window is displayed. The behavior of 
  6160.  the Help push button is identical to that of the F1 key. 
  6161.  
  6162.  To provide a help panel for the Help push button itself, follow the 
  6163.  instructions in 
  6164.  
  6165.  
  6166. ΓòÉΓòÉΓòÉ 50.8. Display fly-over help when the mouse pointer is over a part ΓòÉΓòÉΓòÉ
  6167.  
  6168. Your application can provide the following types of fly-over help: 
  6169.  
  6170.      A short text string that your application displays next to the subpart 
  6171.       that the mouse pointer is over 
  6172.  
  6173.      A longer text string that your application displays in a text control 
  6174.  
  6175.  Note:  You cannot use fly-over help for the following controls: 
  6176.  
  6177.      Group box 
  6178.      Outline box 
  6179.      Viewport 
  6180.  
  6181.  Providing fly-over help for a subpart 
  6182.  
  6183.  To provide fly-over help for a subpart, do the following: 
  6184.  
  6185.    1. Place an IVBFlyText* part on the free-form surface by doing the 
  6186.       following: 
  6187.  
  6188.         a. Select , the Other category, on the parts palette. 
  6189.  
  6190.         b. Select , the IVBFlyText* part, and place it on the free-form 
  6191.            surface. 
  6192.  
  6193.    2. Add fly-over help text to one or more subparts by doing the following: 
  6194.  
  6195.         a. Open the settings notebook for a subpart, such as an entry field or 
  6196.            push button. 
  6197.  
  6198.         b. Select the Control notebook tab. 
  6199.  
  6200.         c. Enter fly-over text strings in the Fly-over short text field, the 
  6201.            Fly-over long text field, or both. 
  6202.  
  6203.         d. Select the OK push button to save the text strings that you just 
  6204.            entered. 
  6205.  
  6206.  That is all you need to do. There are no connections to make. 
  6207.  
  6208.  
  6209. ΓòÉΓòÉΓòÉ 50.9. Display help in an information area ΓòÉΓòÉΓòÉ
  6210.  
  6211. The following sections provide specific information about displaying help in an 
  6212. information area: 
  6213.  
  6214.      Adding an information area to a frame window 
  6215.  
  6216.      Displaying help for menu choices in an information area 
  6217.  
  6218.      Displaying information about successful actions 
  6219.  
  6220.  
  6221. ΓòÉΓòÉΓòÉ 50.9.1. Add an information area to a frame window ΓòÉΓòÉΓòÉ
  6222.  
  6223. To add an information area to a frame window, do the following: 
  6224.  
  6225.    1. Select , the Frame Extensions category, on the parts palette. 
  6226.  
  6227.    2. Select , the IVBInfoArea* part. 
  6228.  
  6229.    3. Move the mouse pointer over the title bar or window border of the frame 
  6230.       window and click mouse button 1. 
  6231.  
  6232.       Visual Builder places an information area at the bottom of the frame 
  6233.       window. 
  6234.  
  6235.    4. Open the settings notebook for the information area. 
  6236.  
  6237.    5. Enter text that you want your application to display in the following 
  6238.       fields: 
  6239.  
  6240.       Disabled text 
  6241.              Text to display when the selected menu choice is disabled. 
  6242.  
  6243.       Inactive text 
  6244.              Text to display when no menu choice is selected. 
  6245.  
  6246.       Missing text 
  6247.              Text to display when the information area cannot find and display 
  6248.              specific help for a menu choice. 
  6249.  
  6250.  
  6251. ΓòÉΓòÉΓòÉ 50.9.2. Display help for menu choices in an information area ΓòÉΓòÉΓòÉ
  6252.  
  6253. To display help text for menu choices in an information area, do the following: 
  6254.  
  6255.    1. Create the menu bar and pull-down menus for your application. 
  6256.  
  6257.    2. Open the settings notebook for each menu choice. 
  6258.  
  6259.    3. Enter a description of the menu choice in the Info area text field. 
  6260.  
  6261.    4. Select the OK push button to save the description you just entered. 
  6262.  
  6263.  
  6264. ΓòÉΓòÉΓòÉ 50.9.3. Display long fly-over text in an information area ΓòÉΓòÉΓòÉ
  6265.  
  6266. To display a long fly-over text string in an information area, do the 
  6267. following. 
  6268.  
  6269. Note:  The following steps assume that you have already added an IVBFlyText* 
  6270.        part and an IVBInfoArea* part to a frame window. If you have not, you 
  6271.        should complete the steps in the following sections and then return 
  6272.        here: 
  6273.  
  6274.      Displaying Fly-Over Help When the Mouse Pointer Is Over a Part 
  6275.  
  6276.       When following these steps, make sure you enter a text string in the 
  6277.       Fly-over long text field in the settings notebook for a subpart, such as 
  6278.       an entry field or push button. 
  6279.  
  6280.      Adding an Information Area to a Frame Window 
  6281.  
  6282.    1. Display the connection menu for the information area. 
  6283.  
  6284.    2. Select the this attribute. 
  6285.  
  6286.    3. Display the connection menu for the fly-over text part. 
  6287.  
  6288.    4. Select the longTextControl attribute. 
  6289.  
  6290.  
  6291. ΓòÉΓòÉΓòÉ 50.9.4. Display information about successful actions ΓòÉΓòÉΓòÉ
  6292.  
  6293. To display information in an information area when an action or member function 
  6294. completes successfully, do the following: 
  6295.  
  6296.    1. Create an event-to-attribute connection using the text attribute of the 
  6297.       IVBInfoArea* part as the target. The source event can be one of the 
  6298.       following: 
  6299.  
  6300.           The same event that triggered the action or member function 
  6301.  
  6302.           The actionResult event of the connection that triggered the action 
  6303.            or member function 
  6304.  
  6305.    2. Double-click on the connection you just made to open the settings window 
  6306.       for the connection. 
  6307.  
  6308.    3. Select the Set parameters push button to open the Constant Parameter 
  6309.       Value Settings window. 
  6310.  
  6311.    4. In the text field, enter the text string that you want to assign to the 
  6312.       text attribute. 
  6313.  
  6314.       Your application will display this text string in the information area 
  6315.       each time the action or member function completes successfully. 
  6316.  
  6317.    5. Select the OK push button to close the Constant Parameter Value Settings 
  6318.       window. 
  6319.  
  6320.    6. Select the Cancel push button to close the connection settings window. 
  6321.  
  6322.  
  6323. ΓòÉΓòÉΓòÉ 51. Integrate visual parts into a single application ΓòÉΓòÉΓòÉ
  6324.  
  6325.      Adding nonvisual support parts to the primary part 
  6326.  
  6327.      Adding static visual parts 
  6328.  
  6329.      Adding visual parts as dynamic instances 
  6330.  
  6331.         -  Adding and setting object factory parts 
  6332.  
  6333.         -  Adding variable parts 
  6334.  
  6335.         -  Connecting to the object factory parts 
  6336.  
  6337.         -  Connecting the nonvisual parts to the variables that represent them 
  6338.  
  6339.         -  Connecting the object factory parts to their corresponding variable 
  6340.            parts 
  6341.  
  6342.      Completing the menu bar 
  6343.  
  6344.      Resetting your application's main resource library 
  6345.  
  6346.  
  6347. ΓòÉΓòÉΓòÉ 51.1. Add nonvisual support parts to the primary part ΓòÉΓòÉΓòÉ
  6348.  
  6349. For this example, refer to the primary view, OAMain, in oawin.vbb, shown in the 
  6350. following figure: 
  6351.  
  6352.    1. Begin by building the primary part as you would any IFrameWindow*-based 
  6353.       part. For information about building the menu bar, see Adding Menus to 
  6354.       Your Application. 
  6355.  
  6356.    2. The OASearch application starts up with a small number of static 
  6357.       nonvisual instances to support the visual parts. Add the following parts: 
  6358.  
  6359.           OAContractor*.  Name it Contractor. 
  6360.           OAContract*.  Name it Contract. 
  6361.           OASkill*.  Name it Skill. 
  6362.           OASkillBase*.  Name it SkillBase. 
  6363.  
  6364.       You must connect these part instances to the variables that represent 
  6365.       them in the other visual parts. First, you must add the visual parts. 
  6366.  
  6367.  
  6368. ΓòÉΓòÉΓòÉ 51.2. Add static parts ΓòÉΓòÉΓòÉ
  6369.  
  6370. One visual part, OAGenInfo, exists statically in the OASearch application. The 
  6371. disadvantage of using static visual parts is that once the user closes the 
  6372. window, the part is destroyed and cannot be instantiated again in the same 
  6373. session. 
  6374.  
  6375. Add the OAGenInfo* part. Name it VBDevelopment. You must also connect 
  6376. OAGenInfo* to the menu item that causes it to display. For details, see 
  6377. Completing the Menu Bar. 
  6378.  
  6379.  
  6380. ΓòÉΓòÉΓòÉ 51.3. Add visual parts as dynamic instances ΓòÉΓòÉΓòÉ
  6381.  
  6382. Implementing dynamic parts involves the following tasks: 
  6383.  
  6384.      Adding and setting object factory parts 
  6385.      Adding variable parts 
  6386.      Connecting to the object factory parts 
  6387.      Connecting the object factory parts to the corresponding variable parts 
  6388.  
  6389.  The first step is adding and setting object factory parts. 
  6390.  
  6391.  
  6392. ΓòÉΓòÉΓòÉ 51.3.1. Add and set object factory parts ΓòÉΓòÉΓòÉ
  6393.  
  6394. Before you can use object factory parts, you must have created the part classes 
  6395. to be represented. Before you start, be sure to load the .vbb files that 
  6396. contain those parts into Visual Builder. 
  6397.  
  6398. Adding the object factory parts 
  6399.  
  6400.    1. Select , the Models category, from the left side of the parts palette. 
  6401.  
  6402.    2. Select the Sticky check box. 
  6403.  
  6404.    3. Select , the IVBFactory* part, from the right side of the parts palette. 
  6405.  
  6406.    4. Drop six IVBFactory* parts on the free-form surface. 
  6407.  
  6408.    5. Unload the mouse pointer by selecting , the Selection tool, from the 
  6409.       Visual Builder tool bar. 
  6410.  
  6411.  Setting an object factory part 
  6412.  
  6413.    1. Change the part name using the Composition Editor contextual menu. 
  6414.  
  6415.       In the OASearch example, the IVBFactory* parts are named as follows: 
  6416.  
  6417.       ConQFac             Request for Contract Information window 
  6418.       ConVFac             Contract Information window 
  6419.       CtrQFac             Request for Contractor Information window 
  6420.       CtrVFac             Contractor Information window 
  6421.       SklQFac             Request for Skill Information window 
  6422.       SklVFac             Skill Information window 
  6423.  
  6424.    2. Change the part type from the default (IStandardNotifier*) using the 
  6425.       Composition Editor contextual menu. 
  6426.  
  6427.       In the OASearch example, the IVBFactory* parts have the following types: 
  6428.  
  6429.       ConQFac             OAQueryContract* 
  6430.       ConVFac             OAContractView* 
  6431.       CtrQFac             OAQueryContractor* 
  6432.       CtrVFac             OAContractorView* 
  6433.       SklQFac             OAQuerySkill* 
  6434.       SklVFac             OASkillView* 
  6435.  
  6436.    3. Set each IVBFactory* part to automatically delete each instance. 
  6437.  
  6438.       Set modeless windows as follows. In the OASearch sample, VBDevelopment 
  6439.       and the xVFac parts are modeless. 
  6440.  
  6441.         a. Open the settings notebook for the part. 
  6442.         b. Switch to the General page. 
  6443.         c. Select the AutoDelete check box. Dispose of modal windows using 
  6444.       deleteTarget connections. For more information about modal windows and 
  6445.       deleteTarget connections, see Connecting the Object Factory Parts to 
  6446.       Their Corresponding Variable Parts. 
  6447.  
  6448.  
  6449. ΓòÉΓòÉΓòÉ 51.3.2. Add variable parts ΓòÉΓòÉΓòÉ
  6450.  
  6451. When used with object factory parts, variable parts represent the newly created 
  6452. part instance. Add and set variable parts as follows: 
  6453.  
  6454.  ContractQ      OAQueryContract* 
  6455.  ContractorQ    OAQueryContractor* 
  6456.  SkillQ         OAQuerySkill* 
  6457.  ContractV      OAContractView* 
  6458.  ContractorV    OAContractorView* 
  6459.  SkillV         OASkillView* 
  6460.  
  6461.  For more information on variables, see Adding a Variable to a Composite Part. 
  6462.  
  6463.  
  6464. ΓòÉΓòÉΓòÉ 51.3.3. Connect to the object factory parts ΓòÉΓòÉΓòÉ
  6465.  
  6466. Once you have added and set both the object factory and variable parts, connect 
  6467. the IGraphicPushButton* parts on the welcome window to the object factory parts 
  6468. representing the query windows, as follows: 
  6469.  
  6470.  
  6471.  From part, feature                       To part, feature
  6472.  
  6473.  GraphicPushButton1, #buttonClickEvent    SklQFac, #new
  6474.  
  6475.  GraphicPushButton2, #buttonClickEvent    ConQFac, #new
  6476.  
  6477.  GraphicPushButton3, #buttonClickEvent    CtrQFac, #new
  6478.  
  6479. Next, connect promoted button actions in the query windows to the object 
  6480. factory parts representing the information windows, as follows: 
  6481.  
  6482.  
  6483.  From part, feature             To part, feature
  6484.  
  6485.  ContractQ, #okPB               ConVFac, #new
  6486.  ButtonClickEvent
  6487.  
  6488.  ContractorQ, #okPB             CtrVFac, #new
  6489.  ButtonClickEvent
  6490.  
  6491.  SkillQ, #okPBButtonClickEvent  SklVFac, #new
  6492.  
  6493.  
  6494. ΓòÉΓòÉΓòÉ 51.3.4. Connect the nonvisual parts to the variables that represent them ΓòÉΓòÉΓòÉ
  6495.  
  6496. Each visual part contains promoted variables as placeholders for the static 
  6497. nonvisual parts dropped in OAMain. This is also true for the object factory 
  6498. parts. Now, connect the static nonvisual parts to the variables that represent 
  6499. them as follows: 
  6500.  
  6501.  
  6502.  From part, feature        To part, feature
  6503.  
  6504.  ConQFac, #contract        Contract, #this
  6505.  
  6506.  ConVFac, #contract        Contract, #this
  6507.  
  6508.  CtrQFac, #contractor      Contractor, #this
  6509.  
  6510.  CtrQFac, #skillBase       SkillBase, #this
  6511.  
  6512.  CtrVFac, #contract        Contract, #this
  6513.  
  6514.  CtrVFac, #contractor      Contractor, #this
  6515.  
  6516.  CtrVFac, #skillBase       SkillBase, #this
  6517.  
  6518.  SklQFac, #skill           Skill, #this
  6519.  
  6520.  SklQFac, #skillBase       SkillBase, #this
  6521.  
  6522.  SklVFac, #skill           Skill, #this
  6523.  
  6524.  SklVFac, #skillBase       SkillBase, #this
  6525.  
  6526.  
  6527. ΓòÉΓòÉΓòÉ 51.3.5. Connect the object factory parts to their corresponding variable parts ΓòÉΓòÉΓòÉ
  6528.  
  6529. Once you have set both object factory and variable parts, you must connect 
  6530. them. In OAMain, the connections vary depending on whether the window is modal. 
  6531. Modal windows retain focus until they are closed; the user cannot switch focus 
  6532. to another window without closing the modal window. In OAMain, the query 
  6533. windows are modal; the other windows are modeless. 
  6534.  
  6535. Note:  You cannot make static windows modal in Windows. The owner of a modal 
  6536.        window must be assigned in the window's constructor call. Static windows 
  6537.        are constructed when the application is started. The owner connections 
  6538.        that follow do not run until after the static windows have already been 
  6539.        constructed. 
  6540.  
  6541.  Connections for modal windows 
  6542.  
  6543.  Make the following connections for the query window parts. The deleteTarget 
  6544.  connections dispose of pointers to the windows once they have been closed. 
  6545.  
  6546.  
  6547.    From part, feature        To part, feature
  6548.  
  6549.    ConQFac, #newEvent        ContractQ, #this
  6550.  
  6551.    ConQFac, #owner           FrameWindow, #this
  6552.  
  6553.    ConQFac, #newEvent        ContractQ, #setFocus
  6554.  
  6555.    ConQFac, #newEvent        ContractQ, #showModally
  6556.  
  6557.    ConQFac, #newEvent        ContractQ, #deleteTarget
  6558.  
  6559.    CtrQFac, #newEvent        ContractorQ, #this
  6560.  
  6561.    CtrQFac, #owner           FrameWindow, #this
  6562.  
  6563.    CtrQFac, #newEvent        ContractorQ, #setFocus
  6564.  
  6565.    CtrQFac, #newEvent        ContractorQ, #showModally
  6566.  
  6567.    CtrQFac, #newEvent        ContractorQ, #deleteTarget
  6568.  
  6569.    SklQFac, #newEvent        SkillQ, #this
  6570.  
  6571.    SklQFac, #owner           FrameWindow, #this
  6572.  
  6573.    SklQFac, #newEvent        SkillQ, #setFocus
  6574.  
  6575.    SklQFac, #newEvent        SkillQ, #showModally
  6576.  
  6577.    SklQFac, #newEvent        SkillQ, #deleteTarget
  6578.  
  6579.  Connections for modeless windows 
  6580.  
  6581.  Now make the following connections for the modeless information windows. The 
  6582.  connections for VBDevelopment are listed in Completing the Menu Bar. 
  6583.  
  6584.  
  6585.    From part, feature             To part, feature
  6586.  
  6587.    ConVFac, #newEvent             ContractV, #this
  6588.  
  6589.    ConVFac, #newEvent             ContractV, #setFocus
  6590.  
  6591.    ConVFac, #newEvent             ContractV, #visible
  6592.  
  6593.    CtrVFac, #newEvent             ContractorV, #this
  6594.  
  6595.    CtrVFac, #newEvent             ContractorV, #setFocus
  6596.  
  6597.    CtrVFac, #newEvent             ContractorV, #visible
  6598.  
  6599.    SklVFac, #newEvent             SkillV, #this
  6600.  
  6601.    SklVFac, #newEvent             SkillV, #setFocus
  6602.  
  6603.    SklVFac, #newEvent             SkillV, #visible
  6604.  
  6605.  For each connection that has the visible feature as its target, you must do 
  6606.  the following after making the connection: 
  6607.  
  6608.    1. Double-click on the connection line. 
  6609.  
  6610.       The settings notebook for the connection opens. 
  6611.  
  6612.       Note:  Do not double-click on one of the black squares that show that the 
  6613.              connection line is selected. If you do, the settings notebook does 
  6614.              not open. 
  6615.  
  6616.    2. Select the Set parameters push button. 
  6617.  
  6618.       A window opens for setting the parameters. 
  6619.  
  6620.    3. Select the visible check box. 
  6621.  
  6622.       If you do not select this check box, the window will not be visible when 
  6623.       you run your compiled application. 
  6624.  
  6625.    4. Select the OK push button. 
  6626.  
  6627.       The window for setting parameters closes. 
  6628.  
  6629.    5. Select the OK push button on the settings notebook. 
  6630.  
  6631.       The settings notebook closes. 
  6632.  
  6633.  
  6634. ΓòÉΓòÉΓòÉ 51.4. Complete the menu bar ΓòÉΓòÉΓòÉ
  6635.  
  6636. Now that all parts appear on the free-form surface, you can complete the menu 
  6637. bar. The connections echo those made in Connecting to the Object Factory Parts. 
  6638.  
  6639. Connections from the View submenu 
  6640.  
  6641.  
  6642.  From part, feature             To part, feature
  6643.  
  6644.  MenuItem3, #commandEvent       ConQFac, #new
  6645.  
  6646.  MenuItem4, #commandEvent       CtrQFac, #new
  6647.  
  6648.  MenuItem5, #commandEvent       SklQFac, #new
  6649.  
  6650.  MenuItem1, #commandEvent       VBDevelopment, #setFocus
  6651.  
  6652.  MenuItem1, #commandEvent       VBDevelopment, #visible
  6653.  
  6654. Be sure to open the settings notebook for the connection that has the visible 
  6655. feature as its target, select the Set parameters push button, and then select 
  6656. the visible check box. If you need more information, see Connecting the Object 
  6657. Factory Parts to Their Corresponding Variable Parts. 
  6658.  
  6659. Connections from the Edit submenu 
  6660.  
  6661.  
  6662.  From part, feature             To part, feature
  6663.  
  6664.  MenuItem7, #commandEvent       ConVFac, #new
  6665.  
  6666.  MenuItem9, #commandEvent       CtrVFac, #new
  6667.  
  6668. Once all connections are made, the OAMain part is essentially complete. Make 
  6669. sure to save your work. 
  6670.  
  6671.  
  6672. ΓòÉΓòÉΓòÉ 51.5. Reset my application's main resource library ΓòÉΓòÉΓòÉ
  6673.  
  6674. In order to ship your completed application to customers that do not have 
  6675. VisualAge for C++ installed, you must ship certain IBM product runtime DLLs 
  6676. with your compiled application. Many of these DLLs must be renamed. This 
  6677. process is outlined in Package runtime DLLs with my application. 
  6678.  
  6679. Visual Builder-generated code sets the main resource library for the 
  6680. application to a predefined Open Class resource DLL that contains default 
  6681. bitmaps for operations like Open and Cut. In OS/2, this DLL is called cppoor3u; 
  6682. in Windows, this DLL is called cppwor3u. 
  6683.  
  6684. The main resource library cannot be reset once the application instance has 
  6685. been constructed, so an additional nonvisual part is required to reset the 
  6686. resource library and construct the main part of your application. The OASearch 
  6687. part is provided in oanonvis.vbb for you to use as an example. 
  6688.  
  6689. To construct this nonvisual part, follow these steps: 
  6690.  
  6691.    1. Open a new nonvisual part. 
  6692.  
  6693.    2. On the Composition Editor, drop an IVBFactory* part and change its type 
  6694.       to the main part of your application. 
  6695.  
  6696.    3. Drop an IVBVariable* part and change its type to the main part of your 
  6697.       application. 
  6698.  
  6699.    4. Make the following connections: 
  6700.  
  6701.         a. From the free-form surface, connect the ready event of the composite 
  6702.            part to the new event of the IVBFactory* part. 
  6703.  
  6704.         b. From the IVBFactory* part, connect the newEvent feature of the 
  6705.            IVBVariable* part to the this attribute of the IVBVariable* part. 
  6706.  
  6707.         c. From the IVBFactory* part, connect the newEvent feature of the 
  6708.            IVBVariable* part to the setFocus action of the IVBVariable* part. 
  6709.  
  6710.         d. From the IVBFactory* part, connect the newEvent feature of the 
  6711.            IVBVariable* part to the visible attribute of the IVBVariable* part. 
  6712.  
  6713.         e. Open the settings for this connection and select the Set parameters 
  6714.            push button. Select the visible check box. 
  6715.  
  6716.         f. Close the settings for the connection. 
  6717.  
  6718.    5. Open the settings for the IVBFactory* part. Select the autoDelete check 
  6719.       box. 
  6720.  
  6721.    6. In the Class Editor, enter the following in the User constructor code 
  6722.       field: 
  6723.  
  6724.       IApplication::current().setResourceLibrary("dll_name"); 
  6725.  
  6726.       dll_name represents the renamed resource DLL, without the .dll extension. 
  6727.  
  6728.    7. Save the part. 
  6729.  
  6730.  
  6731. ΓòÉΓòÉΓòÉ 52. Generate source code for parts and applications ΓòÉΓòÉΓòÉ
  6732.  
  6733.      Preparing for source code generation 
  6734.  
  6735.      Generating C++ source code for individual parts 
  6736.  
  6737.      Source files created during part code generation 
  6738.  
  6739.      Generating C++ source code for your application's main() function 
  6740.  
  6741.      Source files created during generation of main() function code 
  6742.  
  6743.      Preparing generated files for compilation 
  6744.  
  6745.         -  Specifying additional libraries in the make file 
  6746.  
  6747.         -  Specifying debug options for the compiler and linker programs 
  6748.  
  6749.      Packaging runtime DLLs with your application 
  6750.  
  6751.      Compiling and linking your application 
  6752.  
  6753.  
  6754. ΓòÉΓòÉΓòÉ 52.1. Prepare for source code generation ΓòÉΓòÉΓòÉ
  6755.  
  6756. Before getting started, decide how you want to build your application's make 
  6757. file. You can create make files in either of the following ways: 
  6758.  
  6759.      From Visual Builder. 
  6760.      Using WorkFrame's makemake program. For more information, see the User's 
  6761.       Guide. 
  6762.  
  6763.  You must also decide whether you want Visual Builder to generate Hypertext 
  6764.  Markup Language (HTML) documentation for your parts. 
  6765.  
  6766.  
  6767. ΓòÉΓòÉΓòÉ 52.1.1. Set up Visual Builder to generate make files ΓòÉΓòÉΓòÉ
  6768.  
  6769. If you want Visual Builder to generate make files with the C++ source code, 
  6770. follow these steps from the Visual Builder window: 
  6771.  
  6772.    1. From the menu bar, select Options. 
  6773.  
  6774.    2. Select Generate make files. 
  6775.  
  6776.  The next step is generating C++ source code for individual parts. 
  6777.  
  6778.  
  6779. ΓòÉΓòÉΓòÉ 52.1.2. Set up Visual Builder to generate HTML documentation ΓòÉΓòÉΓòÉ
  6780.  
  6781. If you want a summary of your part's implementation, you can choose to have 
  6782. Visual Builder generate Hypertext Markup Language (HTML) documentation. The 
  6783. .htm file describes valid features for the part and lists all connections to or 
  6784. from the part. 
  6785.  
  6786. To get HTML documentation, you must set an environmental variable before 
  6787. starting Visual Builder, as follows: 
  6788.  
  6789. SET VBGENDOC=HTML 
  6790.  
  6791. The default value for this variable is NO. 
  6792.  
  6793. The next step is generating C++ source code for individual parts. 
  6794.  
  6795.  
  6796. ΓòÉΓòÉΓòÉ 52.2. Generate C++ source code for individual parts ΓòÉΓòÉΓòÉ
  6797.  
  6798. After you finish constructing a part, you must generate source code. If the 
  6799. part is an application in itself or if you want to test a part individually, 
  6800. you must also generate the main() function. 
  6801.  
  6802. You can generate source code for the part being edited from any of the Visual 
  6803. Builder editors. 
  6804.  
  6805.    1. From the editor's menu bar, select File. 
  6806.  
  6807.    2. Select Save and generate; then select Part source. 
  6808.  
  6809.  If you are using the Composition Editor, you can select , the Generate Part 
  6810.  Code tool, from the tool bar instead. There is no difference between selecting 
  6811.  this icon and using the menu item described previously. 
  6812.  
  6813.            One of the most common causes of code generation errors is changing 
  6814.            the names of features that are connected to other features. For 
  6815.            example, suppose feature A is connected to feature B. If you change 
  6816.            the name of feature A and then regenerate the source code for your 
  6817.            part, Visual Builder displays an error. This can also occur if you 
  6818.            change the name of a promoted feature. To correct the error, 
  6819.            double-click on the connection and replace the incorrect feature 
  6820.            name with the correct one. 
  6821.  
  6822.  Some capabilities found in OS/2 parts are not available in Windows. If you 
  6823.  plan to generate Windows-based code for parts created with the OS/2-based 
  6824.  product, review the contents of the log window after code generation. Visual 
  6825.  Builder writes warning messages to the log window for settings or connections 
  6826.  to features that are not portable from OS/2 to Windows. 
  6827.  
  6828.  Because Visual Builder cannot discern why the settings or features are not 
  6829.  currently valid, it writes the same message for nonportable items as it does 
  6830.  for items that are no longer valid because the part interface has changed. If 
  6831.  you see the following message, the setting that corresponds to the specified 
  6832.  attribute is not currently valid: 
  6833.  
  6834.  The X attribute of the Y part cannot be set. 
  6835.  
  6836.  You see the following message if a feature that is not currently valid is 
  6837.  either the source or target of a connection: 
  6838.  
  6839.   The X feature was not found in the part interface for Y. 
  6840.  
  6841.  If a feature that is not currently valid is used to supply a parameter value 
  6842.  in a connection, you see the following message: 
  6843.  
  6844.  The X feature of the Y part has changed since this part was developed. 
  6845.  
  6846.  For more information about the files generated, see Source Files Created 
  6847.  during Part Code Generation. 
  6848.  
  6849.  The next step is generating C++ source code for your application's main() 
  6850.  function. 
  6851.  
  6852.  
  6853. ΓòÉΓòÉΓòÉ 52.2.1. Know which source files are created during part code generation ΓòÉΓòÉΓòÉ
  6854.  
  6855. For each part processed, Visual Builder generates several source code files. As 
  6856. an example, the following files are created for the OAContractView part: 
  6857.  
  6858.  contrctg.cpp    A C++ code file. 
  6859.  
  6860.  contrctg.hpp    The header file for contrctg.cpp. 
  6861.  
  6862.  contrctg.h      A resource header file for the .cpp file. This file contains 
  6863.                  the resource IDs for your part. 
  6864.  
  6865.  contrctg.htm    An HTML file, if you opted to have Visual Builder generate 
  6866.                  one. 
  6867.  
  6868.  contrctg.rci    A resource file that contains any text strings used in the 
  6869.                  part for entry field labels, push buttons, menus, and so 
  6870.                  forth. 
  6871.  
  6872.  If you selected Default to FAT file names under the Options pull-down menu of 
  6873.  the Visual Builder window and your part name has more than eight characters, 
  6874.  Visual Builder creates an eight-character name for the part when it is 
  6875.  created. 
  6876.  
  6877.  Note:  If you are using the File Allocation Table (FAT) file system, we 
  6878.         recommend that you always use part names and file names that have eight 
  6879.         characters or fewer, even if you have selected the Default to FAT file 
  6880.         names option. Otherwise, Visual Builder might use a file name for a 
  6881.         part file that is the same as one that already exists and write over 
  6882.         the existing file. 
  6883.  
  6884.  If you decide to switch a pre-existing part to FAT file naming, be sure to 
  6885.  change the file names for code generation in the Class Editor for the part. 
  6886.  
  6887.  You must specify a starting resource ID in all parts for which you want Visual 
  6888.  Builder to export translatable strings into resource files. If you do not 
  6889.  specify a starting resource ID  or indicate that you want the default, Visual 
  6890.  Builder writes only text associated with fly-over help and the information 
  6891.  area to the resource files. For more information about resource IDs and 
  6892.  resource files, see Using Resource Files for Translation. 
  6893.  
  6894.  The next step is generating C++ source code for your application's main() 
  6895.  function. 
  6896.  
  6897.  
  6898. ΓòÉΓòÉΓòÉ 52.3. Generate C++ source code for my application's main() function ΓòÉΓòÉΓòÉ
  6899.  
  6900. To create an executable application, you must generate code for the standard 
  6901. C++ main() function. You can do this for parts that you want to test 
  6902. individually or for your entire application. If you want to compile your entire 
  6903. application, generate the function using the part that represents your 
  6904. application's primary view. 
  6905.  
  6906. You must first generate the C++ code for all parts that you intend to compile 
  6907. in your application. Load into Visual Builder the part files that represent all 
  6908. parts that will appear in the compiled application. Then, generate the main() 
  6909. function from the part that you want to appear first when your application is 
  6910. started (the main part). 
  6911.  
  6912. You can generate application source code for the main() function as follows if 
  6913. the main part is displayed in any of the Visual Builder editors: 
  6914.  
  6915.    1. From the editor's menu bar, select File. 
  6916.  
  6917.    2. Select Save and generate; then select main() for part. 
  6918.  
  6919.  For more information about the files generated, see Source Files Created 
  6920.  during Generation of main() Function Code. 
  6921.  
  6922.  The next step is preparing generated files for compilation. 
  6923.  
  6924.  
  6925. ΓòÉΓòÉΓòÉ 52.3.1. Know which source files are created during generation of main() ΓòÉΓòÉΓòÉ
  6926.  
  6927. function code 
  6928.  
  6929. For each main part processed, Visual Builder creates several files. For the 
  6930. OAMain part, the following files are created: 
  6931.  
  6932.  oamain.app      The C++ code file containing the main() function declaration. 
  6933.  
  6934.                  Note:  If you start Visual Builder from a WorkFrame project, a 
  6935.                         file named vbmain.cpp is generated instead of a file 
  6936.                         named oamain.app. 
  6937.  
  6938.  oamain.mak      A make file, if you opted to generate make files using Visual 
  6939.                  Builder. 
  6940.  
  6941.  oamain.rcx      The main resource file. It includes a resource (.rci) file for 
  6942.                  each part that you generated part source for. 
  6943.  
  6944.  If you selected Default to FAT file names as a preference under the Options 
  6945.  pull-down menu of the Visual Builder window and your part name has more than 
  6946.  eight characters, Visual Builder creates an eight-character name for the 
  6947.  generated files. 
  6948.  
  6949.  Note:  If you are using the File Allocation Table (FAT) file system, we 
  6950.         recommend that you always use part names and file names that have eight 
  6951.         characters or fewer, even if you have selected the Default to FAT file 
  6952.         names option. Otherwise, Visual Builder might use a file name for a 
  6953.         part file that is the same as one that already exists and write over 
  6954.         the existing file. 
  6955.  
  6956.  If you decide to switch a pre-existing part to FAT file naming, be sure to 
  6957.  change the file names for code generation in the Class Editor for the part. 
  6958.  
  6959.  The next step is preparing generated files for compilation. 
  6960.  
  6961.  
  6962. ΓòÉΓòÉΓòÉ 52.4. Prepare generated files for compilation ΓòÉΓòÉΓòÉ
  6963.  
  6964. Before compiling your application, be sure you have the following files: 
  6965.  
  6966.      Header files for all parts. 
  6967.  
  6968.      .cpp files for all parts. 
  6969.  
  6970.      Resource files (.rci) for all parts. If you are using class interface 
  6971.       parts, make sure that you have .rci files for them as well. For parts 
  6972.       that do not otherwise require them, consider creating .rci files with 
  6973.       just a comment line, as follows: 
  6974.  
  6975.       // Resource file for PARTNAME class interface part 
  6976.  
  6977.      A make file. 
  6978.  
  6979.      An .app file for the main part. 
  6980.  
  6981.       Note:  If you started Visual Builder from a WorkFrame project, you should 
  6982.              have a file named vbmain.cpp instead of an .app file. 
  6983.  
  6984.  Final preparations for compilation and linking include the following: 
  6985.  
  6986.      Specifying additional libraries (C++ libraries and DLLs) in the make file 
  6987.      Specifying debug options for the compiler and linker programs 
  6988.  
  6989.  
  6990. ΓòÉΓòÉΓòÉ 52.4.1. Specify additional libraries in the make file ΓòÉΓòÉΓòÉ
  6991.  
  6992. Review the list of libraries specified in the make file, particularly libraries 
  6993. for parts that you compiled separately. 
  6994.  
  6995. If your application uses DLLs, add the DLL names as dependent files in the 
  6996. description blocks used to keep the object files up to date. The order in which 
  6997. you list object files is significant. Files with external references must occur 
  6998. after the referred-to files. 
  6999.  
  7000.  
  7001. ΓòÉΓòÉΓòÉ 52.4.2. Specify the option to generate Browser information ΓòÉΓòÉΓòÉ
  7002.  
  7003. If you want the VisualAge for C++ compiler to generate Browser information, you 
  7004. must include the Fb+ option when you compile your application. This option 
  7005. causes the compiler to generate a file with an extension of .pdb. Once this 
  7006. file is generated, you can use the Browser data when connecting features to 
  7007. member functions and for other purposes. For more information, see Using 
  7008. Browser Information. 
  7009.  
  7010.  
  7011. ΓòÉΓòÉΓòÉ 52.4.3. Specify debug options for the compiler and linker programs ΓòÉΓòÉΓòÉ
  7012.  
  7013. If you prefer to compile and link your application using WorkFrame, you should 
  7014. have already specified debug options in your Visual Builder project file. For 
  7015. more information about the options you need to set, see the WorkFrame 
  7016. documentation. 
  7017.  
  7018. To make Visual Builder connections easier to debug, set up a trace by following 
  7019. these steps: 
  7020.  
  7021.    1. In your config.sys file, add this line: 
  7022.  
  7023.       SET ICLUI TRACE=ON SET ICLUI TRACETO=OUT 
  7024.  
  7025.    2. When you compile and link your application, specify the vbdebug flag. For 
  7026.       example, compile myapp.exe as follows: 
  7027.  
  7028.       NMAKE VBDEBUG=1 myapp.mak 
  7029.  
  7030.       The VBDEBUG flag setting determines whether compilation flags are set to 
  7031.       enable tracing. A value of 1 indicates that you want tracing enabled and 
  7032.       debug information to be generated. If you do not specify a value, 
  7033.       optimization is turned on, and tracing is not enabled. 
  7034.  
  7035.    3. When you run your compiled application, redirect the output to a file. 
  7036.       For example, run myapp.exe as follows on Windows NT: 
  7037.  
  7038.       myapp >myapp.out 2>&1 
  7039.  
  7040.       Run myapp.exe as follows on Windows 95: 
  7041.  
  7042.       myapp >myapp.out 
  7043.  
  7044.    4. Browse the output file (myapp.out) to see what connections were run and 
  7045.       in what order. The file also lists any exceptions that were thrown. 
  7046.  
  7047.  
  7048. ΓòÉΓòÉΓòÉ 52.5. Package runtime DLLs with my application ΓòÉΓòÉΓòÉ
  7049.  
  7050. To distribute your application to customers that do not have VisualAge for C++ 
  7051. installed, you must ship certain IBM product runtime DLLs with your compiled 
  7052. application. These DLLs fall into several categories, as follows: 
  7053.  
  7054.      C runtime file. 
  7055.  
  7056.      Open Class files, depending on the classes you use in your application. 
  7057.       These must be renamed. 
  7058.  
  7059.      Visual Builder files: cppwv03.dll and cppwov3.dll. 
  7060.  
  7061.  Be sure to read Reset my application's main resource library for more 
  7062.  information before compiling your application for distribution. 
  7063.  
  7064.  Enabling support for the Win32s platform requires a different set of DLLs than 
  7065.  for the other Windows platforms. These DLLs are segregated by subdirectory; be 
  7066.  sure to collect the appropriate set. 
  7067.  
  7068.  Your license type determines which DLLs you are authorized to redistribute. If 
  7069.  you are not sure, check the license card that came with your copy of the 
  7070.  product. 
  7071.  
  7072.  For more information about renaming product DLLs for redistribution, refer to 
  7073.  the Programming Guide. For more information about Open Class DLL support, 
  7074.  refer to the Open Class Library User's Guide. 
  7075.  
  7076.  
  7077. ΓòÉΓòÉΓòÉ 52.6. Compile and link my application ΓòÉΓòÉΓòÉ
  7078.  
  7079. You can compile your application from a command prompt or from WorkFrame. To 
  7080. call both the compiler and linker programs, you can run the Toolkit's nmake 
  7081. program. Regardless of how you choose to compile and link your Visual Builder 
  7082. application, use the following compile and link options: 
  7083.  
  7084.  B"/DE /pmtype:pm" Passes the string /DE /pmtype:pm to the linker as 
  7085.                 parameters. 
  7086.  
  7087.  C              Compiles and links. 
  7088.  
  7089.  Fb+            Generates Browser information in a file with a .pdb extension. 
  7090.  
  7091.  Ft(dir)        Generates files for template resolution and puts them in the 
  7092.                 dir directory. 
  7093.  
  7094.  Gd+ or Gd-     Links to the runtime library. Use Gd+ for dynamic linking or 
  7095.                 Gd- for static linking. 
  7096.  
  7097.  Gm+            Uses the multithread libraries. 
  7098.  
  7099.  I              Searches the directory of the source file for include files; 
  7100.                 then searches paths specified in the include environmental 
  7101.                 variable. 
  7102.  
  7103.  Q              Displays the compiler logo when invoking the compiler. 
  7104.  
  7105.  Ti+            Generates debugger information. This is optional but 
  7106.                 recommended. 
  7107.  
  7108.  Tdp            Compiles all source files as C++ files and ensures that 
  7109.                 template functions are resolved. 
  7110.  
  7111.  If you have problems running your generated application, check first for the 
  7112.  following situations: 
  7113.  
  7114.      Be sure your application correctly destroys object factory instances, as 
  7115.       follows: 
  7116.  
  7117.         -  To delete a modal window, connect the IVBFactory* part's newEvent 
  7118.            feature to the variable's deleteTarget action. This connection must 
  7119.            occur after the connection to the showModally action. 
  7120.  
  7121.         -  To delete a modeless window, no connections are necessary. Open the 
  7122.            settings editor for the IVBFactory* part and select the autoDelete 
  7123.            check box on the General page. 
  7124.  
  7125.      If you mix static and dynamic linking, the resulting application might 
  7126.       behave unpredictably. We recommend you use DLLs and link dynamically. 
  7127.       Alternatively, compile and link one executable file statically with no 
  7128.       DLLs. Do not mix static and dynamic libraries. 
  7129.  
  7130.      When you disable notification on collection parts, unpredictable results 
  7131.       occur. For example, if you use a sequence part to manage objects in a 
  7132.       container and then disable notification in the sequence, the container is 
  7133.       not notified of the change in the sequence and is therefore not 
  7134.       refreshed. 
  7135.  
  7136.  For more information on compiling and linking, refer to the Programming Guide. 
  7137.  
  7138.  
  7139. ΓòÉΓòÉΓòÉ 53. Share parts with others ΓòÉΓòÉΓòÉ
  7140.  
  7141.      Providing part files (.vbb) 
  7142.  
  7143.      Providing part information files (.vbe) 
  7144.  
  7145.  
  7146. ΓòÉΓòÉΓòÉ 53.1. Provide part files (.vbb) ΓòÉΓòÉΓòÉ
  7147.  
  7148. To provide part files, do the following: 
  7149.  
  7150.    1. Using Visual Builder, create a part file containing the parts. 
  7151.  
  7152.    2. Create and assign any icons needed for the new parts. 
  7153.  
  7154.    3. Supply the following to the part consumer: 
  7155.  
  7156.           A part file that contains the parts to be distributed 
  7157.  
  7158.           Any additional code files (.hpv or .cpv) needed to compile and use 
  7159.            the parts 
  7160.  
  7161.           Documentation or installation instructions, including any 
  7162.            information about how to add the parts to Visual Builder's parts 
  7163.            palette 
  7164.  
  7165.  To use the parts you distributed, the part consumer loads the part files and 
  7166.  generates source code. 
  7167.  
  7168.  
  7169. ΓòÉΓòÉΓòÉ 53.2. Provide part information files (.vbe) ΓòÉΓòÉΓòÉ
  7170.  
  7171. To provide part information files, do the following: 
  7172.  
  7173.    1. Create parts using Visual Builder or your favorite editor. For dynamic 
  7174.       linking, create a dll and import library containing the supplied parts. 
  7175.       The header (.h or .hpp) file can use the #pragma library statement to 
  7176.       specify the library to be used in the link step. 
  7177.  
  7178.    2. Create and assign any icons needed for the new parts. 
  7179.  
  7180.    3. Supply the following to the part consumer: 
  7181.  
  7182.           The part information file that contains the parts to be distributed 
  7183.  
  7184.           Any files (.hpp, .h, .hpv, .lib, .dll) needed to use the parts 
  7185.  
  7186.            Note:  You must provide resource files (.rci) for class interface 
  7187.                   parts. If you do not provide these files, the resource 
  7188.                   compiler issues missing-file error messages. This file may 
  7189.                   contain as little as an end-of-file character, but consider 
  7190.                   adding a comment line to remind users why the file is needed. 
  7191.  
  7192.           Documentation or installation instructions, including any 
  7193.            information about how to add the parts to Visual Builder's parts 
  7194.            palette 
  7195.  
  7196.  To use the parts you distributed, the part consumer imports the part 
  7197.  information file into Visual Builder to create part files (.vbb). If you 
  7198.  provided a DLL with the part information file, no code generation or further 
  7199.  compilation is required. 
  7200.  
  7201.  
  7202. ΓòÉΓòÉΓòÉ 54. Use existing C and C++ code with Visual Builder ΓòÉΓòÉΓòÉ
  7203.  
  7204.      Defining the part interface using part information files 
  7205.  
  7206.      Creating a part information file 
  7207.  
  7208.      Importing the part 
  7209.  
  7210.  
  7211. ΓòÉΓòÉΓòÉ 54.1. Define the part interface using part information files ΓòÉΓòÉΓòÉ
  7212.  
  7213. If C++ code already exists for your Visual Builder application, you can more 
  7214. efficiently define the part interface using part information files. This 
  7215. involves the following steps: 
  7216.  
  7217.    1. Determine the part's features. 
  7218.  
  7219.    2. Create a part information file using your favorite editor. This file can 
  7220.       include information for as many parts as you need. 
  7221.  
  7222.    3. In Visual Builder, import the part. 
  7223.  
  7224.  
  7225. ΓòÉΓòÉΓòÉ 54.1.1. Create a part information file ΓòÉΓòÉΓòÉ
  7226.  
  7227. To create a part information file, add information about your part's part 
  7228. interface to a file using your preferred editor. The following example shows 
  7229. how you could specify part information for the OAContractor part: 
  7230.  
  7231. //VBBeginPartInfo: OAContractor,"Contractor part for OASearch sample"
  7232. //VBParent: IStandardNotifier
  7233. //VBIncludes: "Cntrctor.hpp" _OACONTRACTOR_,"iprofile.hpp","istring.hpp","iexcbase.hpp"
  7234. //VBPartDataFile: OANONVIS.VBB
  7235. //VBConstructor: OAContractor()
  7236. //VBComposerInfo: nonvisual,802,cppov33r
  7237. //VBEvent: ready, "ready", readyId
  7238. //VBAction: getContractor,
  7239. //VB:    "Get contractor data from database",
  7240. //VB:    OAContractor&,
  7241. //VB:    OAContractor& getContractor()
  7242. //VBAction: putContractor,
  7243. //VB:    "Add or update contractor data in database",
  7244. //VB:    OAContractor&,
  7245. //VB:    OAContractor& putContractor()
  7246. //VBAction: parseName,
  7247. //VB:    "Parse user input to get contractor's name",
  7248. //VB:    OAContractor&,
  7249. //VB     OAContractor& parseName(const IString& aName)
  7250. //VBAttribute: contractorID,
  7251. //VB:      "Contractor's employee identifier",
  7252. //VB:      IString,
  7253. //VB:      IString contractorID() const,,
  7254. //VB:      contractorIDId
  7255. //VBAttribute: lastName,
  7256. //VB:      "Contractor's last name",
  7257. //VB:      IString,
  7258. //VB:      IString lastName() const,
  7259. //VB:      OAContractor& setLastName(const IString& aLastName),
  7260. //VB:      lastNameId
  7261. //VBAttribute: firstName,
  7262. //VB:      "Contractor's first name",
  7263. //VB:      IString,
  7264. //VB:      IString firstName() const,
  7265. //VB:      OAContractor& setFirstName(const IString& aFirstName),
  7266. //VB:      firstNameId
  7267. //VBAttribute: middleInitial,
  7268. //VB:      "Contractor's middle initial",
  7269. //VB:      IString,
  7270. //VB:      IString middleInitial() const,
  7271. //VB:      OAContractor& setMiddleInitial(const IString& aMiddleInitial),
  7272. //VB:      middleInitialId
  7273. //VBAttribute: homeStreet,
  7274. //VB:      "Contractor's home street address",
  7275. //VB:      IString,
  7276. //VB:      IString homeStreet() const,
  7277. //VB:      OAContractor& setHomeStreet(const IString& aHomeStreet),
  7278. //VB:      homeStreetId
  7279. //VBAttribute: homeCity,
  7280. //VB:      "Contractor's home city",
  7281. //VB:      IString,
  7282. //VB:      IString homeCity() const,
  7283. //VB:      OAContractor& setHomeCity(const IString& aHomeCity),
  7284. //VB:      homeCityId
  7285. //VBAttribute: homeState,
  7286. //VB:      "Contractor's home state or province",
  7287. //VB:      IString,
  7288. //VB:      IString homeState() const,
  7289. //VB:      OAContractor& setHomeState(const IString& aHomeState),
  7290. //VB:      homeStateId
  7291. //VBAttribute: homeZip,
  7292. //VB:      "Contractor's home postal code",
  7293. //VB:      IString,
  7294. //VB:      IString homeZip() const,
  7295. //VB:      OAContractor& setHomeZip(const IString& aHomeZip),
  7296. //VB:      homeZipId
  7297. //VBAttribute: phoneNumber,
  7298. //VB:      "Contractor's daytime phone number",
  7299. //VB:      IString,
  7300. //VB:      IString phoneNumber() const,
  7301. //VB:      OAContractor& setPhoneNumber(const IString& aPhoneNumber),
  7302. //VB:      phoneNumberId
  7303. //VBAttribute: startDate,
  7304. //VB:      "Contractor's starting date with OA",
  7305. //VB:      IString,
  7306. //VB:      IString startDate() const,
  7307. //VB:      OAContractor& setStartDate(const IString& aStartDate),
  7308. //VB:      startDateId
  7309. //VBAttribute: endDate,
  7310. //VB:      "Contractor's last day with OA (empty if active)",
  7311. //VB:      IString,
  7312. //VB:      IString endDate() const,
  7313. //VB:      OAContractor& setEndDate(const IString& aEndDate),
  7314. //VB:      endDateId
  7315. //VBAttribute: activeStatus,
  7316. //VB:      "Whether contractor actively seeks contract work",
  7317. //VB:      Boolean,
  7318. //VB:      Boolean isActiveStatus() const,
  7319. //VB:      OAContractor& enableActiveStatus(Boolean enable = true),
  7320. //VB:      activeStatusId
  7321. //VBAttribute: currentContract,
  7322. //VB:      "Contractor's current assignment, if any",
  7323. //VB:      IString,
  7324. //VB:      IString currentContract() const,
  7325. //VB:      OAContractor& setCurrentContract(const IString& aCurrentContract),
  7326. //VB:      currentContractId
  7327. //VBPreferredFeatures: enabledForNotification, getContractor, putContractor, this
  7328. //VBEndPartInfo: OAContractor
  7329.  
  7330. Note the following syntax: 
  7331.  
  7332.      The VBBeginPartInfo and VBEndPartInfo statements delimit the part 
  7333.       information for OAContractor. 
  7334.  
  7335.      The VBParent statement specifies the base class for OAContractor, 
  7336.       IStandardNotifier*. 
  7337.  
  7338.      The VBIncludes statement specifies a header file to be added in an 
  7339.       #include directive when the code is generated. 
  7340.  
  7341.      The VBPartDataFile statement specifies the .vbb file that holds the 
  7342.       information for OAContractor. 
  7343.  
  7344.      The VBComposerInfo statement indicates that this is a nonvisual part. The 
  7345.       absence of the abstract keyword indicates that this is a concrete part 
  7346.       that can be dropped on the free-form surface. 
  7347.  
  7348.      The VBEvent, VBAction, and VBAttribute statements define features for 
  7349.       this part. 
  7350.  
  7351.  If you plan to compile any parts separately into a DLL, use the VBLibFile 
  7352.  statement in the part information files for those parts to specify the name of 
  7353.  the .lib file that links to your DLL. As an alternative, you can specify this 
  7354.  file name in the Class Editor after you import the parts. 
  7355.  
  7356.  For information about part definition syntax, refer to Building 
  7357.  VisualAge for C++ Parts for Fun and Profit. 
  7358.  
  7359.  The next step is importing the part. 
  7360.  
  7361.  
  7362. ΓòÉΓòÉΓòÉ 54.1.2. Import the part ΓòÉΓòÉΓòÉ
  7363.  
  7364. Before importing the part, you must create a part information file. To import 
  7365. the part, follow these steps from the Visual Builder window: 
  7366.  
  7367.    1. From the menu bar, select File. Select Import part information. 
  7368.  
  7369.       The Enter Name for Part Information File window appears. 
  7370.  
  7371.    2. Specify the path and name of the part information file that contains the 
  7372.       information that you want to import. When the import is finished, the 
  7373.       name of the part appears in the Visual Builder window. 
  7374.  
  7375.  If C++ code for your part already exists, your part is finished. If you want 
  7376.  to change the part interface later, do either of the following: 
  7377.  
  7378.      Use the Part Interface Editor to edit feature specifications. You must 
  7379.       use this method to delete features. 
  7380.  
  7381.      Edit your part information file and re-import the part information. 
  7382.  
  7383.  If C++ code for your part does not exist, the next step is adding code to your 
  7384.  part. 
  7385.  
  7386.  
  7387. ΓòÉΓòÉΓòÉ 55. Create Composers and primitive visual parts ΓòÉΓòÉΓòÉ
  7388.  
  7389. To create your own primitive visual or Composers part, follow these steps: 
  7390.  
  7391.      Write code that derives the part from an IWindow-based class. IWindow 
  7392.       does not have to be the new part's immediate base class. 
  7393.  
  7394.       Because user Composers parts are represented by ICanvas* parts on the 
  7395.       free-form surface, user code to add primitive parts to the new Composers 
  7396.       part must be of the same form as that for ICanvas*. No function exists 
  7397.       within the Composition Editor to call customized code in the new 
  7398.       Composers part. 
  7399.  
  7400.      Create a part information file for the part. You must include a 
  7401.       VBComposerInfo statement. 
  7402.  
  7403.       If the part's constructor does not take a style flag, you must add 
  7404.       VBConstructor and VBAttribute statements to prevent problems with the 
  7405.       part at run time. 
  7406.  
  7407.      Import the part. 
  7408.  
  7409.  For more information on part syntax, see Building VisualAge for C++ Parts for 
  7410.  Fun and Profit. 
  7411.  
  7412.  
  7413. ΓòÉΓòÉΓòÉ 56. Add categories and parts to the parts palette ΓòÉΓòÉΓòÉ
  7414.  
  7415.      Preparing a resource DLL (OS/2 version only) 
  7416.  
  7417.      Preparing a resource DLL (Windows version only) 
  7418.  
  7419.      Adding a category to the parts palette 
  7420.  
  7421.      Specifying a unique icon for a part you add to the parts palette 
  7422.  
  7423.      Adding a part to the parts palette 
  7424.  
  7425.      Deleting a category or part from the parts palette 
  7426.  
  7427.      Saving parts palette changes 
  7428.  
  7429.  
  7430. ΓòÉΓòÉΓòÉ 56.1. Preparing a resource DLL (OS/2 version only) ΓòÉΓòÉΓòÉ
  7431.  
  7432. This example uses for the OAModels category and for the OAContractor part, 
  7433. which are stored in the cppwv33r.dll file as resource numbers 800 and 802, 
  7434. respectively. 
  7435.  
  7436. To prepare bitmaps for use with Visual Builder, do the following: 
  7437.  
  7438.    1. Create your icons. One way to do this is to use the OS/2 icon editor, 
  7439.       which is available in the operating system toolkit. 
  7440.  
  7441.       Bitmaps used on the parts palette must be no larger than standard icons 
  7442.       for the display resolution being used. For VGA displays on OS/2, use the 
  7443.       Independent VGA form (32x32). For higher display resolutions on OS/2, use 
  7444.       the 8514-16 colors form (40x40). 
  7445.  
  7446.    2. Create a resource DLL that contains your icons. Use files similar to the 
  7447.       following: 
  7448.  
  7449.           userpal.c 
  7450.  
  7451.                         empty()
  7452.                        {
  7453.                        }
  7454.  
  7455.           userpal.rc 
  7456.  
  7457.                         icon 800 oamodels.ico
  7458.                        icon 801 oacontractor.ico
  7459.  
  7460.           userpal.def 
  7461.  
  7462.                         library userpal
  7463.                        description 'Icons for user-extended palette'
  7464.  
  7465.           userpal.mak 
  7466.  
  7467.                         userpal.dll: userpal.obj userpal.def userpal.res
  7468.                         icc userpal.obj /Feuserpal.dll userpal.def
  7469.                          rc userpal.res userpal.dll
  7470.  
  7471.                        userpal.obj: userpal.c
  7472.                         icc /C+ userpal.c
  7473.  
  7474.                        userpal.res: userpal.rc
  7475.                         rc -r userpal.rc
  7476.  
  7477.       Once you have the files ready, type the following in a command window to 
  7478.       build the resource DLL: 
  7479.  
  7480.       nmake userpal.mak 
  7481.  
  7482.    3. Place the resource DLL in a directory in your LIBPATH statement. 
  7483.  
  7484.  Your icons are now ready for use with Visual Builder. 
  7485.  
  7486.  The next step is adding a category to the parts palette. 
  7487.  
  7488.  
  7489. ΓòÉΓòÉΓòÉ 56.2. Preparing a resource DLL (Windows version only) ΓòÉΓòÉΓòÉ
  7490.  
  7491. This example uses for the OAModels category and for the OAContractor part, 
  7492. which are stored in the cppwv33r.dll file as resource numbers 800 and 802, 
  7493. respectively. 
  7494.  
  7495. To prepare bitmaps for use with Visual Builder, do the following: 
  7496.  
  7497.    1. Create your icons using an icon editor. 
  7498.  
  7499.    2. Create a resource DLL that contains your icons. Use files similar to the 
  7500.       following: 
  7501.  
  7502.           cppwv33r.c 
  7503.  
  7504.                         empty()
  7505.                        {
  7506.                        }
  7507.  
  7508.           cppwv33r.rc 
  7509.  
  7510.                         800 icon    oamodels.ico
  7511.                        801 icon    contract.ico
  7512.                        802 icon    contrctr.ico
  7513.                        803 icon    diploma.ico
  7514.                        804 bitmap   oalog2.bmp
  7515.                        805 bitmap   oalog3.bmp
  7516.  
  7517.           cppwv33r.mak 
  7518.  
  7519.                         cppwv33r.dll: cppwv33r.obj cppwv33r.lib cppwv33r.res
  7520.                         icc /Gd- /Ge- /I. /Tdc /B"/DLL /NOE" -Fm$(@B).map /Fecppwv33r.dll \
  7521.                          cppwv33r.exp \
  7522.                          cppwv33r.obj \
  7523.                          cppwv33r.res
  7524.  
  7525.                        cppwv33r.lib: cppwv33r.obj cppwv33r.res
  7526.                         copy << cppwv33r.def
  7527.                         LIBRARY cppwv33r
  7528.                         DESCRIPTION 'Icons and bitmaps for OASearch sample application'
  7529.                         EXPORTS
  7530.                        <<
  7531.                         cppfilt -b -p $** >> cppwv33r.def
  7532.                         set ILIB=
  7533.                         ilib /Q cppwv33r.def
  7534.  
  7535.                        cppwv33r.obj: cppwv33r.c
  7536.                         icc /Gd- /Ge- /I. /Tdc -c -O+ cppwv33r.c
  7537.  
  7538.                        cppwv33r.res: cppwv33r.rc
  7539.                         irc cppwv33r.rc
  7540.  
  7541.       Once you have the files ready, type the following in a command window to 
  7542.       build the resource DLL: 
  7543.  
  7544.       nmake cppwv33r.mak 
  7545.  
  7546.    3. Place the resource DLL in a directory in your PATH statement. 
  7547.  
  7548.  Your icons are now ready for use with Visual Builder. 
  7549.  
  7550.  The next step is adding a category to the parts palette. 
  7551.  
  7552.  
  7553. ΓòÉΓòÉΓòÉ 56.3. Add a category to the parts palette ΓòÉΓòÉΓòÉ
  7554.  
  7555. Once you have prepared an icon in a resource DLL, you are ready to extend the 
  7556. parts palette. To add a category to the parts palette, do the following: 
  7557.  
  7558.    1. In the Composition Editor, select Modify palette.Add new category. from 
  7559.       the Options pull-down menu. The Add Palette Category window is displayed 
  7560.       as follows: 
  7561.  
  7562.       Notice that the default category icon, , is specified. It is stored as 
  7563.       resource ID 150 in the cppwv33r.dll resource file provided with Visual 
  7564.       Builder. cppwv33r.dll resource file provided with Visual Builder. 
  7565.  
  7566.    2. Enter the name that you want for your category in the Category name 
  7567.       field. 
  7568.  
  7569.    3. Enter cppov33r for OS/2 or cppwv33r for Windows or the name of your 
  7570.       resource DLL in the Module name field. 
  7571.  
  7572.       Note:  Do not type the .dll file extension in the Module name field. 
  7573.  
  7574.    4. Type 800 or the resource ID of the icon in your resource DLL in the 
  7575.       Resource ID field. 
  7576.  
  7577.       After entering the resource ID number, move the cursor to another 
  7578.       component in the window, such as the Module name field, if you want to 
  7579.       see the graphic that will be used before continuing. 
  7580.  
  7581.    5. Select the OK push button. 
  7582.  
  7583.  Your category with the icon specified is added to the parts palette. 
  7584.  
  7585.  Note:  If you do not specify a DLL, Visual Builder uses the default icon. If 
  7586.         you specify a DLL but Visual Builder cannot find it, Visual Builder 
  7587.         uses the question mark icon, . 
  7588.  
  7589.  If the question mark icon appears, make sure the following conditions are met: 
  7590.  
  7591.      The DLL exists and is in the current directory. 
  7592.      The DLL file name is correct. 
  7593.      The resource ID for the icon (in the .rc file) exists in the DLL. 
  7594.  
  7595.  The next step is specifying a unique icon for your part. 
  7596.  
  7597.  
  7598. ΓòÉΓòÉΓòÉ 56.4. Specify a unique icon for a part you add to the parts palette ΓòÉΓòÉΓòÉ
  7599.  
  7600. You can specify a unique icon for a part that you add to the parts palette, but 
  7601. you must do so before you add it to the parts palette. To give your part a 
  7602. unique icon, do the following: 
  7603.  
  7604.    1. Open the part. 
  7605.  
  7606.    2. Switch to the Class Editor. 
  7607.  
  7608.    3. Enter the name of the DLL file that contains the icon you want to use in 
  7609.       the DLL Name field. 
  7610.  
  7611.    4. Enter the resource ID number for the icon in the Resource ID field. 
  7612.  
  7613.       If you enter a valid DLL file name and resource ID number, Visual Builder 
  7614.       displays the icon below the Resource ID field. This enables you to verify 
  7615.       the icon before adding it to the parts palette. 
  7616.  
  7617.       Note:  If you do not specify a DLL, Visual Builder uses the default icon. 
  7618.              If you specify a DLL but Visual Builder cannot find it, Visual 
  7619.              Builder uses the question mark icon, . 
  7620.  
  7621.       If the question mark icon appears, make sure the following conditions are 
  7622.       met: 
  7623.  
  7624.           The DLL exists and is in the current directory. 
  7625.           The DLL file name is correct. 
  7626.           The resource ID for the icon (in the .rc file) exists in the DLL. 
  7627.  
  7628.    5. Select FileSave to save the resource DLL and resource ID information in 
  7629.       the Class Editor. 
  7630.  
  7631.  The next step is adding a part to the parts palette. 
  7632.  
  7633.  
  7634. ΓòÉΓòÉΓòÉ 56.5. Add a part to the parts palette ΓòÉΓòÉΓòÉ
  7635.  
  7636. You can add a part to any category on the parts palette using any of the 
  7637. following methods: 
  7638.  
  7639.      Add a part that is selected in the Visual Builder window 
  7640.      Add the part that you are currently editing 
  7641.      Add any part whose .vbb file is loaded 
  7642.  
  7643.  
  7644. ΓòÉΓòÉΓòÉ 56.5.1. Add a part that is selected in the Visual Builder window ΓòÉΓòÉΓòÉ
  7645.  
  7646. To add a part to the parts palette from the Visual Builder window, do the 
  7647. following: 
  7648.  
  7649.    1. Load the .vbb file that contains the part you want to add to the parts 
  7650.       palette if it is not already loaded. 
  7651.  
  7652.    2. Select the .vbb file. For this example, select oanonvis.vbb. 
  7653.  
  7654.    3. Select the part you want to add. For this example, select OAContractor. 
  7655.  
  7656.       Note:  You can add multiple parts by holding down the Ctrl key and 
  7657.              clicking on each part that you want to add. 
  7658.  
  7659.    4. Select PartAdd to palette. Visual Builder displays the Add to Palette 
  7660.       window, as shown in the following figure: 
  7661.  
  7662.    5. Select the part that you want to add. For this example, select 
  7663.       OAContractor. 
  7664.  
  7665.    6. Select the category that you want to add the part to. For this example, 
  7666.       select OAModels. 
  7667.  
  7668.    7. Select the Add push button. Visual Builder adds the OAContractor part to 
  7669.       the parts palette in the OAModels category. 
  7670.  
  7671.  
  7672. ΓòÉΓòÉΓòÉ 56.5.2. Add the part that you are currently editing ΓòÉΓòÉΓòÉ
  7673.  
  7674. You can add the part that you are currently editing to the parts palette from 
  7675. either the Composition Editor, the Class Editor, or the Part Interface Editor. 
  7676. To add the part that you are currently editing to the parts palette, do the 
  7677. following: 
  7678.  
  7679.    1. Double-click on the OAContractor part in the Visual Builder window. 
  7680.       Visual Builder opens the OAContractor part in the Part Interface Editor. 
  7681.  
  7682.    2. Select FileAdd to palette. Visual Builder displays the Add to Palette 
  7683.       window, as shown in the following figure: 
  7684.  
  7685.       The Part name field shows the name of the part that you are editing. This 
  7686.       is the part that is to be added to the parts palette. You cannot change 
  7687.       the name of the part displayed in this field. In this example, 
  7688.       OAContractor is displayed in this field. 
  7689.  
  7690.    3. Select the category that you want to add the part to. For this example, 
  7691.       select OAModels. 
  7692.  
  7693.    4. Select the Add push button. Visual Builder adds the OAContractor part to 
  7694.       the OAModels category on the parts palette. To see this, switch to the 
  7695.       Composition Editor and select the OAModels category. The icon for the 
  7696.       OAContractor part is displayed in the parts column. 
  7697.  
  7698.  
  7699. ΓòÉΓòÉΓòÉ 56.5.3. Add any part whose .vbb file is loaded ΓòÉΓòÉΓòÉ
  7700.  
  7701. You can add any part to the parts palette as long as its .vbb file is loaded in 
  7702. the Visual Builder window. The following steps explain how to do this: 
  7703.  
  7704.    1. In the Composition Editor, select Modify paletteAdd new part from the 
  7705.       Options pull-down menu. The Add to Palette window is displayed as shown 
  7706.       in the following figure: 
  7707.  
  7708.       To add a part to the parts palette, do the following: 
  7709.  
  7710.         a. Type OAContractor in the Part name field or the class name of the 
  7711.            part you want to add. 
  7712.  
  7713.         b. Select OAModels in the Category list or the name of the category to 
  7714.            which you want to add your part. 
  7715.  
  7716.         c. Select the Add push button. 
  7717.  
  7718.            Your part is added to the parts palette in the specified category. 
  7719.  
  7720.  Notice that the part you just added uses the same icon as the part it inherits 
  7721.  from. If you inherit from a part whose .vbb file is not loaded or for which 
  7722.  you have not provided a resource DLL, Visual Builder uses the default part 
  7723.  icon, . 
  7724.  
  7725.  The next section tells you how to delete a category or part from the parts 
  7726.  palette 
  7727.  
  7728.  
  7729. ΓòÉΓòÉΓòÉ 56.6. Delete a category or part from the parts palette ΓòÉΓòÉΓòÉ
  7730.  
  7731. To delete a part from the parts palette, do the following: 
  7732.  
  7733.    1. Select the part on the parts palette. 
  7734.  
  7735.    2. Select Modify paletteDelete category from the Options pull-down menu. The 
  7736.       selected part is deleted from the parts palette. 
  7737.  
  7738.  To delete a category from the parts palette, do the following: 
  7739.  
  7740.    1. Select the category on the parts palette. 
  7741.  
  7742.    2. Select Modify paletteDelete category from the Options pull-down menu. The 
  7743.       selected category and all of the parts in it are deleted from the parts 
  7744.       palette. 
  7745.  
  7746.  
  7747. ΓòÉΓòÉΓòÉ 56.7. Save parts palette changes ΓòÉΓòÉΓòÉ
  7748.  
  7749. Visual Builder automatically saves all parts palette changes for you. When you 
  7750. create a new category or part, Visual Builder stores information about that 
  7751. category or part in a file named vbpalet.dat, which is stored in your startup 
  7752. directory (or in your target directory, if you are using WorkFrame). This file 
  7753. is written automatically. 
  7754.  
  7755. Removing a category or part that you just added 
  7756.  
  7757. The vbpalet.dat file also allows you to undo and redo any changes you make to 
  7758. the parts palette, but only during the current Composition Editor session. For 
  7759. example, after adding a category or part, you can select EditUndo to remove the 
  7760. part or category you just added. Selecting EditRedo would put the part or 
  7761. category back on the parts palette, again. 
  7762.  
  7763. Once you close the Composition Editor, you can no longer undo or redo any 
  7764. changes. However, you can still add categories and add parts, as well as delete 
  7765. categories and parts. 
  7766.  
  7767.  
  7768. ΓòÉΓòÉΓòÉ 57. Enable national language support ΓòÉΓòÉΓòÉ
  7769.  
  7770.      Using resource files for translation 
  7771.  
  7772.      Using canvases to adjust size for translated text 
  7773.  
  7774.      Specifying parts with country-sensitive formatting 
  7775.  
  7776.      Providing double-byte character support for Asian languages 
  7777.  
  7778.  
  7779. ΓòÉΓòÉΓòÉ 57.1. Use resource files for translation ΓòÉΓòÉΓòÉ
  7780.  
  7781. In Generating Source Code for Parts and Applications, you learned that Visual 
  7782. Builder generates the following resource files for you: 
  7783.  
  7784.      A resource file (.rci), which contains the text strings and other program 
  7785.       resources used in your part 
  7786.  
  7787.      A resource header file (.h), which contains the resource ID definitions 
  7788.       for your application 
  7789.  
  7790.  In order for Visual Builder to write most resource definitions to the .h and 
  7791.  .rci files, you must specify a starting resource ID in the Class Editor for 
  7792.  every part. For information about how to choose a starting resource ID, see 
  7793.  Guidelines for Specifying Starting Resource IDs. 
  7794.  
  7795.  
  7796. ΓòÉΓòÉΓòÉ 57.1.1. The resource file (.rci) ΓòÉΓòÉΓòÉ
  7797.  
  7798. The .rci file groups resources into two categories: window resources and 
  7799. nonwindow resources. Window resources are those that are associated with window 
  7800. IDs, such as information area text, fly-over text, and help tables. 
  7801.  
  7802. Nonwindow resources are the text strings that are displayed in your composite 
  7803. part. Examples are window titles, static text used to label entry fields and 
  7804. list boxes, and the text on push buttons and menu items. These text strings are 
  7805. delimited by quotation marks (" ") and can be translated into another language. 
  7806.  
  7807. The window resources and nonwindow resources are grouped into separate string 
  7808. tables so that translators can easily find the text that is to be translated. 
  7809.  
  7810. You may have text strings in your part, such as the application name, that you 
  7811. do not want translated. If that is the case, you can prevent those text strings 
  7812. from being inserted in the .rci file by inserting a number sign (#) at the 
  7813. beginning of the text and enclosing the text in quotation marks (" "). This 
  7814. change must be made in the settings window for the part, not in the Composition 
  7815. Editor. 
  7816.  
  7817. For example, suppose you do not want the text in the window title to be 
  7818. translated. To prevent Visual Builder from inserting this text string in the 
  7819. .rci file, open the settings window for the part and edit the entry field on 
  7820. the General page that contains the title text. In the case of the ToDoList 
  7821. part, the modified title would appear as follows: 
  7822.  
  7823. #"To-Do List" 
  7824.  
  7825. Each text string that Visual Builder inserts in the .rci file is preceded by a 
  7826. resource hame that begins with STRRC, as follows: 
  7827.  
  7828. STRRC_ToDoList_FrameWindow_title,  "To-Do List" 
  7829.  
  7830. Visual Builder defines numeric resource IDs for these resource names in the .h 
  7831. file. 
  7832.  
  7833. For Visual Builder to define most string resources properly, you must specify 
  7834. the starting resource ID for your part in the Class Editor. 
  7835.  
  7836.  
  7837. ΓòÉΓòÉΓòÉ 57.1.2. The resource header file (.h) ΓòÉΓòÉΓòÉ
  7838.  
  7839. In the .h file, Visual Builder uses #define statements to assign unique 
  7840. resource IDs to each of the text strings listed in the .rci file. Visual 
  7841. Builder also assigns unique window IDs to all primitive visual parts. The only 
  7842. resource ID that you need to specify is the starting resource ID for the part. 
  7843.  
  7844. For an example, look at the todolist.h file that Visual Builder generates for 
  7845. the To-Do List application shown in Creating a Simple Visual Builder 
  7846. Application. The first #define statement in the todolist.h file appears as 
  7847. follows: 
  7848.  
  7849. #define RC_ToDoList  10000 
  7850.  
  7851. The number in this #define statement, 10000, is the starting resource ID. When 
  7852. you select the check box next to the Starting resource id field in the Class 
  7853. Editor for this part, the number 10000 appears in the entry field. During code 
  7854. generation, Visual Builder uses this number as the resource ID of the first 
  7855. text string and increments the resource ID of each successive text string by 1. 
  7856.  
  7857. For information about how to choose a starting resource ID, see Guidelines for 
  7858. Specifying Starting Resource IDs. 
  7859.  
  7860.  
  7861. ΓòÉΓòÉΓòÉ 57.1.3. Decide which starting resource IDs to use ΓòÉΓòÉΓòÉ
  7862.  
  7863. You must specify a starting resource ID in all parts for which you want Visual 
  7864. Builder to generate resource files. You can either use the default or specify 
  7865. an alternative, but consider the following: 
  7866.  
  7867.      The resource ID must be a number. 
  7868.  
  7869.      The number specified must be either high enough or low enough that the 
  7870.       resource IDs produced do not conflict with the resource IDs that Visual 
  7871.       Builder generates for other parts that comprise your application. 
  7872.  
  7873.  For example, suppose you have a reusable Address part (a canvas with entry 
  7874.  fields and static text) that you want to embed as a subpart in the frame 
  7875.  window of your application's main view. You might give the main view a 
  7876.  starting resource ID of 5000 and the Address part a starting resource ID of 
  7877.  6000. Doing this would prevent conflicts with the resource IDs that Visual 
  7878.  Builder generates for the main view and those it generates for the Address 
  7879.  part. 
  7880.  
  7881.  Consider using starting resource IDs between 100 and 14500 for most 
  7882.  applications, for the following reasons: 
  7883.  
  7884.      The operating system has reserved many resource IDs below 100 for its own 
  7885.       use. 
  7886.  
  7887.      When determining resource IDs for window resources, Visual Builder begins 
  7888.       with 15000 and increments the resource ID of each successive primitive 
  7889.       part by 5. Starting resource IDs between 100 and 14500 are low enough to 
  7890.       prevent you from experiencing any resource ID conflicts in most cases. 
  7891.  
  7892.  
  7893. ΓòÉΓòÉΓòÉ 57.2. Use canvases to adjust size for translated text ΓòÉΓòÉΓòÉ
  7894.  
  7895. When text is translated from one language to another, the translated text often 
  7896. occupies more space than the original text occupied. This can cause problems 
  7897. because the layout of the user interface can be disrupted by the longer text 
  7898. strings. 
  7899.  
  7900. Two of the canvas parts that Visual Builder provides solve this problem for 
  7901. you:  ISetCanvas* and IMultiCellCanvas*. These parts allow you to insert 
  7902. translated text and rebuild your application without having to change the 
  7903. position of any of the parts in the user interface. The ISetCanvas* and 
  7904. IMultiCellCanvas* parts automatically adjust their size at run time to allow 
  7905. for longer text strings, taking into account the current window's text size and 
  7906. font. 
  7907.  
  7908. For example, suppose you are using an ISetCanvas* part with three vertical 
  7909. decks and three rows of IRadioButton* parts in each deck. Once the text strings 
  7910. for the IRadioButton* parts are translated, all you have to do is rebuild your 
  7911. application. The decks in the ISetCanvas* part automatically adjust their 
  7912. widths to allow for the size of the translated text strings. 
  7913.  
  7914. The IMultiCellCanvas part is also good for translation purposes because the 
  7915. rows and columns automatically adjust themselves to fit the translated text. 
  7916.  
  7917.  
  7918. ΓòÉΓòÉΓòÉ 57.3. Specify parts with country-sensitive formatting ΓòÉΓòÉΓòÉ
  7919.  
  7920. Visual Builder provides the following class interface parts that allow you to 
  7921. specify how information is presented for specific national languages: 
  7922.  
  7923.  IDate      This part allows you to customize the date formatting for the 
  7924.             selected part. This includes specifying the order for the month, 
  7925.             day, and year, and the character to use as a separator. 
  7926.  
  7927.  ITime      This part allows you to customize the time formatting for the 
  7928.             selected part. This includes specifying the 12- or 24-hour format 
  7929.             and the character to use as a separator. 
  7930.  
  7931.  
  7932. ΓòÉΓòÉΓòÉ 57.4. Provide double-byte character support for Asian languages ΓòÉΓòÉΓòÉ
  7933.  
  7934. The following Visual Builder parts provide DBCS support: 
  7935.  
  7936.  IBuffer 
  7937.    A class interface part that defines the contents of an IString. This part 
  7938.    provides attributes to determine whether part or all of the characters in a 
  7939.    buffer are DBCS or multibyte character set (MBCS) characters, and whether 
  7940.    they are valid DBCS or MBCS characters. 
  7941.  
  7942.  IDBCSBuffer 
  7943.    A class interface part that implements the version of IString contents that 
  7944.    supports mixed DBCS characters. This part ensures that MBCS characters are 
  7945.    processed properly. 
  7946.  
  7947.  IEntryField 
  7948.    A visual part that creates and manages an entry field control. On the 
  7949.    General page of the settings window for this part, you can specify the type 
  7950.    of data that the user can enter. It can be one of the following: 
  7951.  
  7952.    SBCS           Sets the entry field to accept SBCS text only. 
  7953.  
  7954.    DBCS           Sets the entry field to accept DBCS text only. 
  7955.  
  7956.    Mixed          Sets the entry field to accept text that is a mixture of SBCS 
  7957.                   and DBCS characters. Conversion from an ASCII DBCS code page 
  7958.                   to an EBCDIC DBCS code page can result in a possible increase 
  7959.                   in the length of the data because of the addition of shift-in 
  7960.                   and shift-out characters, but it does not exceed the text 
  7961.                   limit of the entry field. 
  7962.  
  7963.    Any            Sets the entry field to accept text that is a mixture of SBCS 
  7964.                   and DBCS characters. This setting is the opposite of mixed. 
  7965.                   If the text contains both SBCS and DBCS characters and is to 
  7966.                   be converted from an ASCII code page into an EBCDIC code 
  7967.                   page, this style causes an entry field to properly handle 
  7968.                   shift-in and shift-out characters that would otherwise be 
  7969.                   introduced into its text. 
  7970.  
  7971.  IFrameWindow 
  7972.    A visual part that creates and manages a frame window control. This part has 
  7973.    a style option, appDBCSStatus, that includes a DBCS status area in the frame 
  7974.    window when it is displayed in a DBCS environment. IFrameWindow also has a 
  7975.    member function, shareParentDBCSStatus, that causes a child frame window to 
  7976.    share the DBCS status area of its parent. 
  7977.  
  7978.  IKeyboardEvent 
  7979.    A class interface part that represents a keyboard-related event. An 
  7980.    IKeyboardEvent object is created by a keyboard handler when a user presses 
  7981.    or releases a key. The part provides a virtualKey attribute that returns the 
  7982.    virtual key code of the key. Two of the codes it can return are firstDBCS 
  7983.    and lastDBCS. 
  7984.  
  7985.  IString 
  7986.    A class interface part that is an array of characters. This part provides 
  7987.    attributes to determine whether part or all of the characters in a string 
  7988.    are DBCS or MBCS characters, and whether they are valid DBCS or MBCS 
  7989.    characters. 
  7990.  
  7991.  
  7992. ΓòÉΓòÉΓòÉ 58. Use Direct-to-SOM objects ΓòÉΓòÉΓòÉ
  7993.  
  7994.      Creating and importing the part information file 
  7995.  
  7996.      Using DTS objects in a Visual Builder application 
  7997.  
  7998.      Bypassing DTS limitations 
  7999.  
  8000.  
  8001. ΓòÉΓòÉΓòÉ 58.1. Create and import the part information file ΓòÉΓòÉΓòÉ
  8002.  
  8003. Defining the Part Interface Using Part Information Files discusses how to 
  8004. create a part information file. Create one for your DTS objects. The following 
  8005. guidelines apply: 
  8006.  
  8007.      DTS objects can only have actions. This makes DTS objects the equivalent 
  8008.       of class interface parts because they have no notification capability. 
  8009.       Therefore, set the VBComposerInfo statement for each DTS object to class. 
  8010.  
  8011.      Do not code any attributes or events in your part information file. 
  8012.  
  8013.  The following example shows a part information file, mydtsdt.vbe, that 
  8014.  contains the information for the following sample DTS objects: 
  8015.  
  8016.  MyDTSDate      Returns the current date. 
  8017.  
  8018.  MyDTSTime      Returns the current time. 
  8019.  
  8020.   //
  8021.   // SOM classes as Visual Builder classes
  8022.   //
  8023.   //VBBeginPartInfo: MyDTSDate, "My DTS SOM Date Class"
  8024.   //VBIncludes: "mydtsdat.hh" MyDTSDate_hh
  8025.   //VBPartDataFile: 'mydtsdt.vbb'
  8026.   //VBLibFile: 'mydtsdat.lib'
  8027.   //VBComposerInfo: class
  8028.   //VBAction: getTodaysDate
  8029.   //VB:    ,"Get today's date action.",char*,
  8030.   //VB:    char* getTodaysDate()
  8031.   //VBPreferredFeatures: this, getTodaysDate
  8032.   //VBEndPartInfo: MyDTSDate
  8033.   //
  8034.   //VBBeginPartInfo: MyDTSTime, "My DTS SOM Time Class"
  8035.   //VBIncludes: "mydtstim.hh" MyDTSTime_hh
  8036.   //VBPartDataFile: 'mydtsdt.vbb'
  8037.   //VBLibFile: 'mydtstim.lib'
  8038.   //VBComposerInfo: class
  8039.   //VBAction: getCurrentTime
  8040.   //VB:    ,"Get current time action.",char*,
  8041.   //VB:    char* getCurrentTime()
  8042.   //VBPreferredFeatures: this, getCurrentTime
  8043.   //VBEndPartInfo: MyDTSTime
  8044.   //
  8045.  
  8046.  The mydtsdt.vbe file contains statements that refer to the following files 
  8047.  that are needed for each of the sample DTS objects: 
  8048.  
  8049.  mydtsdat.hh and mydtstim.hh The header files for the MyDTSDate and MyDTSTime 
  8050.                 SOM classes. 
  8051.  
  8052.  mydtsdat.lib and mydtstim.lib The library files that were created when the DTS 
  8053.                 objects were compiled. 
  8054.  
  8055.  mydtsdt.vbb    The part (.vbb) file that is to contain the information about 
  8056.                 the DTS parts when you import the part information from the 
  8057.                 mydtsdt.vbe file. You must load the mydtsdt.vbb file into 
  8058.                 Visual Builder before you can add the MyDTSDate and MyDTSTime 
  8059.                 parts to the free-form surface in the Composition Editor. 
  8060.  
  8061.  Once you create your part information file, you must import it into Visual 
  8062.  Builder before you can use your DTS objects in a Visual Builder application. 
  8063.  For information on how to do this, see Importing Part Information. 
  8064.  
  8065.  The next step is using DTS objects in a Visual Builder application. 
  8066.  
  8067.  
  8068. ΓòÉΓòÉΓòÉ 58.2. Use DTS objects in a Visual Builder application ΓòÉΓòÉΓòÉ
  8069.  
  8070. Using DTS objects in a Visual Builder application is no different from using a 
  8071. class interface part. You simply place the DTS objects on the free-form surface 
  8072. and make the necessary connections to use their actions. 
  8073.  
  8074. The following figure shows how we used the MyDTSDate and MyDTSTime objects in a 
  8075. simple application. 
  8076.  
  8077. To create the application, we placed the MyDTSDate and MyDTSTime parts on the 
  8078. free-form surface by selecting OptionsAdd part and by providing the necessary 
  8079. information in the Add Part window for each part. 
  8080.  
  8081. In this application, when a user clicks on the Current push button, the 
  8082. buttonClickEvent feature causes the getTodaysDate and getTodaysTime actions to 
  8083. get the date and time that is currently set in your computer's operating 
  8084. system. In addition, the actionResult attribute of each connection updates the 
  8085. text attribute of each entry field with the result of the two actions, the 
  8086. current date and time. 
  8087.  
  8088. Earlier, we mentioned that actions in DTS classes can return only basic C data 
  8089. types. The getTodaysDate and getTodaysTime actions in our example both return a 
  8090. data type of char*. Therefore, when we connected the actionResult attribute to 
  8091. the text attribute of the entry field, Visual Builder displayed a message 
  8092. saying that the types did not match and asking if we wanted to continue. In 
  8093. this case, we could make the connection because IString has a constructor that 
  8094. takes a char*. You can find out whether to complete a connection in situations 
  8095. like this by looking at the IBM Open Class Library Reference. 
  8096.  
  8097.            When you have generated your code and are ready to compile your 
  8098.            application, make sure you have the .hh and .lib files that contain 
  8099.            the code for your DTS objects in the current directory. Also, make 
  8100.            sure the SOM Toolkit is installed because the VisualAge for C++ 
  8101.            compiler must have access to several of its files. 
  8102.  
  8103.            When you are ready to run your application, the .dll for the DTS 
  8104.            objects must be accessible. 
  8105.  
  8106.  
  8107. ΓòÉΓòÉΓòÉ 58.3. Bypass DTS limitations ΓòÉΓòÉΓòÉ
  8108.  
  8109. Earlier, we told you that DTS objects have certain limitations, such as not 
  8110. being able to use attributes and events, and not being able to notify other 
  8111. parts. You can bypass these limitations by using nonvisual parts to manage the 
  8112. things your DTS objects cannot do. 
  8113.  
  8114. In the example shown in Using DTS Objects in a Visual Builder Application, we 
  8115. could have created two nonvisual parts called MyDate and MyTime in addition to 
  8116. the two DTS parts, MyDTSDate and MyDTSTime. We could give these nonvisual parts 
  8117. attributes, such as theDate and theTime, and notify other parts when the values 
  8118. of these attributes change. We could also give these attributes get and set 
  8119. member functions that call actions in the DTS objects to get and set the values 
  8120. of the attributes. 
  8121.  
  8122. Once this is done, we would place the nonvisual parts MyDate and MyTime on the 
  8123. free-form surface, instead of MyDTSDate and MyDTSTime, and make the same 
  8124. connections as described previously. 
  8125.  
  8126.  
  8127. ΓòÉΓòÉΓòÉ 59. Glossary ΓòÉΓòÉΓòÉ
  8128.  
  8129.  
  8130. ΓòÉΓòÉΓòÉ <hidden> Glossary description ΓòÉΓòÉΓòÉ
  8131.  
  8132. This glossary defines terms and abbreviations that are used in this book. If 
  8133. you do not find the term you are looking for, refer to the IBM Dictionary of 
  8134. Computing, New York:McGraw-Hill, 1994. 
  8135.  
  8136. This glossary includes terms and definitions from the American National 
  8137. Standard Dictionary for Information Systems, ANSI X3.172-1990, copyright 1990 
  8138. by the American National Standards Institute (ANSI). Copies may be purchased 
  8139. from the American National Standards Institute, 1430 Broadway, New York, New 
  8140. York 10018. 
  8141.  
  8142.  
  8143. ΓòÉΓòÉΓòÉ <hidden> Glossary listing ΓòÉΓòÉΓòÉ
  8144.  
  8145. A
  8146. abstract class
  8147. access
  8148. action
  8149. argument
  8150. attribute
  8151. attribute-to-action connection
  8152. attribute-to-attribute connection
  8153. attribute-to-member function connection
  8154. B
  8155. base class
  8156. behavior
  8157. C
  8158. caller
  8159. category
  8160. class
  8161. Class Editor
  8162. class hierarchy
  8163. class library
  8164. class member function
  8165. client area object
  8166. client object
  8167. collection
  8168. Common User Access (CUA)
  8169. composite part
  8170. Composition Editor
  8171. concrete class
  8172. connection
  8173. const
  8174. construction from parts
  8175. constructor
  8176. CUA
  8177. cursored emphasis
  8178. custom logic connection
  8179. D
  8180. data abstraction
  8181. data member
  8182. data model
  8183. data object
  8184. declaration
  8185. DEF file
  8186. derivation
  8187. destructor
  8188. DLL
  8189. dynamic link library (DLL)
  8190. E
  8191. encapsulation
  8192. event
  8193. event-to-action connection
  8194. event-to-attribute connection
  8195. event-to-member function connection
  8196. expansion area
  8197. F
  8198. feature
  8199. full attribute
  8200. free-form surface
  8201. G
  8202. graphical user interface (GUI)
  8203. GUI
  8204. H
  8205. handles
  8206. header file
  8207. I
  8208. inheritance
  8209. instance
  8210. L
  8211. legacy code
  8212. loaded
  8213. M
  8214. main part
  8215. member
  8216. member function
  8217. member function call
  8218. member function name
  8219. message
  8220. model
  8221. module definition file
  8222. N
  8223. nested class
  8224. nonvisual part
  8225. no-event attribute
  8226. no-set attribute
  8227. notebook part
  8228. O
  8229. object
  8230. object class
  8231. object factory
  8232. object-oriented programming
  8233. observer
  8234. operation
  8235. overloading
  8236. P
  8237. palette
  8238. parameter connection
  8239. parent class
  8240. part
  8241. part event
  8242. part event ID
  8243. part interface
  8244. Part Interface Editor
  8245. parts palette
  8246. preferred features
  8247. primary selection
  8248. private
  8249. process
  8250. program
  8251. protected
  8252. prototype
  8253. primitive part
  8254. process
  8255. property
  8256. pure virtual function
  8257. R
  8258. receiver
  8259. resource file
  8260. S
  8261. selection handles
  8262. server
  8263. service
  8264. settings view
  8265. sticky
  8266. structure
  8267. subpart
  8268. superclass
  8269. T
  8270. tear-off attribute
  8271. template
  8272. thread
  8273. tool bar
  8274. U
  8275. UI
  8276. unloaded
  8277. user interface (UI)
  8278. V
  8279. variable
  8280. view
  8281. virtual function
  8282. visual part
  8283. visual programming tool
  8284. W
  8285. white space
  8286. window
  8287.  
  8288.  
  8289. ΓòÉΓòÉΓòÉ <hidden> abstract class ΓòÉΓòÉΓòÉ
  8290.  
  8291. A class that provides common behavior across a set of subclasses but is not 
  8292. itself designed to have instances that work. An abstract class represents a 
  8293. concept; classes derived from it represent implementations of the concept. For 
  8294. example, IControl is the abstract base class for control view windows; the 
  8295. ICanvas and IListBox classes are controls derived from IControl. An abstract 
  8296. class must have at least one pure virtual function. 
  8297.  
  8298. See also  base class. 
  8299.  
  8300.  
  8301. ΓòÉΓòÉΓòÉ <hidden> access ΓòÉΓòÉΓòÉ
  8302.  
  8303. A property of a class that determines whether a class member is accessible in 
  8304. an expression or declaration. 
  8305.  
  8306.  
  8307. ΓòÉΓòÉΓòÉ <hidden> action ΓòÉΓòÉΓòÉ
  8308.  
  8309. A specification of a function that a part can perform. The visual builder uses 
  8310. action specifications to generate connections between parts. Actions are 
  8311. resolved to member function calls in the generated code. 
  8312.  
  8313. Compare to  event and  attribute. 
  8314.  
  8315.  
  8316. ΓòÉΓòÉΓòÉ <hidden> argument ΓòÉΓòÉΓòÉ
  8317.  
  8318. A data element, or value, included as part of a member function call. Arguments 
  8319. provide additional information that the called member function can use to 
  8320. perform the requested operation. 
  8321.  
  8322.  
  8323. ΓòÉΓòÉΓòÉ <hidden> attribute ΓòÉΓòÉΓòÉ
  8324.  
  8325. A specification of a property of a part. For example, a customer part could 
  8326. have a name attribute and an address attribute. An attribute can itself be a 
  8327. part with its own behavior and attributes. 
  8328.  
  8329. The visual builder uses attribute specifications to generate code to get and 
  8330. set part properties. 
  8331.  
  8332. Compare to  event and  action. 
  8333.  
  8334.  
  8335. ΓòÉΓòÉΓòÉ <hidden> attribute-to-action connection ΓòÉΓòÉΓòÉ
  8336.  
  8337. A connection that starts an action whenever an attribute's value changes. It is 
  8338. similar to an event-to-action connection because the attribute's event ID is 
  8339. used to notify the action when the value of the attribute changes. 
  8340.  
  8341. See also  connection. Compare to  event-to-action connection. 
  8342.  
  8343.  
  8344. ΓòÉΓòÉΓòÉ <hidden> attribute-to-attribute connection ΓòÉΓòÉΓòÉ
  8345.  
  8346. A connection from an attribute of one part to an attribute of another part. 
  8347. When one attribute is updated, the other attribute is updated automatically. 
  8348.  
  8349. See also  connection. 
  8350.  
  8351.  
  8352. ΓòÉΓòÉΓòÉ <hidden> attribute-to-member function connection ΓòÉΓòÉΓòÉ
  8353.  
  8354. A connection from an attribute of a part to a member function. The connected 
  8355. attribute receives its value from the member function, which can make 
  8356. calculations based on the values of other parts. 
  8357.  
  8358. See also  connection. 
  8359.  
  8360.  
  8361. ΓòÉΓòÉΓòÉ <hidden> base class ΓòÉΓòÉΓòÉ
  8362.  
  8363. A class from which other classes or parts are derived. A base class may itself 
  8364. be derived from another base class. 
  8365.  
  8366. See also  abstract class. 
  8367.  
  8368.  
  8369. ΓòÉΓòÉΓòÉ <hidden> behavior ΓòÉΓòÉΓòÉ
  8370.  
  8371. The set of external characteristics that an object exhibits. 
  8372.  
  8373.  
  8374. ΓòÉΓòÉΓòÉ <hidden> caller ΓòÉΓòÉΓòÉ
  8375.  
  8376. An object that sends a member function call to another object. 
  8377.  
  8378. Contrast with  receiver. 
  8379.  
  8380.  
  8381. ΓòÉΓòÉΓòÉ <hidden> category ΓòÉΓòÉΓòÉ
  8382.  
  8383. In the Composition Editor, a selectable grouping of parts represented by an 
  8384. icon in the left-most column. Selecting a category displays the parts belonging 
  8385. to that category in the next column. 
  8386.  
  8387. See also  parts palette. 
  8388.  
  8389.  
  8390. ΓòÉΓòÉΓòÉ <hidden> class ΓòÉΓòÉΓòÉ
  8391.  
  8392. An aggregate that can contain functions, types, and user-defined operators, in 
  8393. addition to data. Classes can be defined hierarchically, allowing one class to 
  8394. be an expansion of another, and can restrict access to its members. 
  8395.  
  8396.  
  8397. ΓòÉΓòÉΓòÉ <hidden> Class Editor ΓòÉΓòÉΓòÉ
  8398.  
  8399. The editor you use to specify the names of files that Visual Builder writes to 
  8400. when you generate default code. You can also use this editor to do the 
  8401. following: 
  8402.  
  8403.      Enter a description of the part 
  8404.      Specify a different .vbb file in which to store the part 
  8405.      See the name of the part's base class 
  8406.      Modify the part's default constructor 
  8407.      Enter additional constructor and destructor code 
  8408.      Specify a .lib file for the part 
  8409.      Specify a resource DLL and ID to assign an icon to the part 
  8410.      Specify other files that you want to include when you build your 
  8411.       application 
  8412.  
  8413.  Compare to  Composition Editor and  Part Interface Editor. 
  8414.  
  8415.  
  8416. ΓòÉΓòÉΓòÉ <hidden> class hierarchy ΓòÉΓòÉΓòÉ
  8417.  
  8418. A tree-like structure showing relationships among object classes. It places one 
  8419. abstract class at the top (a base class) and one or more layers of less 
  8420. abstract classes below it. 
  8421.  
  8422.  
  8423. ΓòÉΓòÉΓòÉ <hidden> class library ΓòÉΓòÉΓòÉ
  8424.  
  8425. A collection of classes. 
  8426.  
  8427.  
  8428. ΓòÉΓòÉΓòÉ <hidden> class member function ΓòÉΓòÉΓòÉ
  8429.  
  8430. See  member function. 
  8431.  
  8432.  
  8433. ΓòÉΓòÉΓòÉ <hidden> client area object ΓòÉΓòÉΓòÉ
  8434.  
  8435. An intermediate window between a frame window (IFrameWindow) and its controls 
  8436. and other child windows. 
  8437.  
  8438.  
  8439. ΓòÉΓòÉΓòÉ <hidden> client object ΓòÉΓòÉΓòÉ
  8440.  
  8441. An object that requests services from other objects. 
  8442.  
  8443.  
  8444. ΓòÉΓòÉΓòÉ <hidden> collection ΓòÉΓòÉΓòÉ
  8445.  
  8446. A set of features in which each feature is an object. 
  8447.  
  8448.  
  8449. ΓòÉΓòÉΓòÉ <hidden> Common User Access (CUA) ΓòÉΓòÉΓòÉ
  8450.  
  8451. An IBM architecture for designing graphical user interfaces using a set of 
  8452. standard components and terminology. 
  8453.  
  8454.  
  8455. ΓòÉΓòÉΓòÉ <hidden> composite part ΓòÉΓòÉΓòÉ
  8456.  
  8457. A part that is composed of a part and one or more subparts. A composite part 
  8458. can contain visual parts, nonvisual parts, or both. 
  8459.  
  8460. See also  nonvisual part, part, subpart, and  visual part. 
  8461.  
  8462.  
  8463. ΓòÉΓòÉΓòÉ <hidden> Composition Editor ΓòÉΓòÉΓòÉ
  8464.  
  8465. A view that is used to build a graphical user interface and to make connections 
  8466. between parts. 
  8467.  
  8468. Compare to  Class Editor and  Part Interface Editor. 
  8469.  
  8470.  
  8471. ΓòÉΓòÉΓòÉ <hidden> concrete class ΓòÉΓòÉΓòÉ
  8472.  
  8473. A subclass of an abstract class that is a specialization of the abstract class. 
  8474.  
  8475.  
  8476. ΓòÉΓòÉΓòÉ <hidden> connection ΓòÉΓòÉΓòÉ
  8477.  
  8478. A formal, explicit relationship between parts. Making connections is the basic 
  8479. technique for building any visual application because that defines the way in 
  8480. which parts communicate with one another. The visual builder generates the code 
  8481. that then implements these connections. 
  8482.  
  8483. See also  attribute-to-action connection, attribute-to-attribute connection, 
  8484. attribute-to-member function connection, parameter connection, custom logic 
  8485. connection, event-to-action connection, event-to-attribute connection, and 
  8486. event-to-member function connection. 
  8487.  
  8488.  
  8489. ΓòÉΓòÉΓòÉ <hidden> const ΓòÉΓòÉΓòÉ
  8490.  
  8491. An attribute of a data object that declares that the object cannot be changed. 
  8492.  
  8493.  
  8494. ΓòÉΓòÉΓòÉ <hidden> construction from parts ΓòÉΓòÉΓòÉ
  8495.  
  8496. A software development technology in which applications are assembled from 
  8497. existing and reusable software components, known as parts. 
  8498.  
  8499.  
  8500. ΓòÉΓòÉΓòÉ <hidden> constructor ΓòÉΓòÉΓòÉ
  8501.  
  8502. A special class member function that has the same name as the class and is used 
  8503. to construct and possibly initialize class objects. 
  8504.  
  8505.  
  8506. ΓòÉΓòÉΓòÉ <hidden> CUA ΓòÉΓòÉΓòÉ
  8507.  
  8508. See  Common User Access. 
  8509.  
  8510.  
  8511. ΓòÉΓòÉΓòÉ <hidden> cursored emphasis ΓòÉΓòÉΓòÉ
  8512.  
  8513. When the selection cursor is on a choice, that choice has cursored emphasis. 
  8514.  
  8515.  
  8516. ΓòÉΓòÉΓòÉ <hidden> custom logic connection ΓòÉΓòÉΓòÉ
  8517.  
  8518. A connection that causes your customized C or C++ code to be run. This 
  8519. connection can be triggered either when an attribute's value changes or an 
  8520. event occurs. 
  8521.  
  8522.  
  8523. ΓòÉΓòÉΓòÉ <hidden> data abstraction ΓòÉΓòÉΓòÉ
  8524.  
  8525. A data type with a private representation and a public set of operations. The 
  8526. C++ language uses the concept of classes to implement data abstraction. 
  8527.  
  8528.  
  8529. ΓòÉΓòÉΓòÉ <hidden> data member ΓòÉΓòÉΓòÉ
  8530.  
  8531. Private data that belongs to a given object and is hidden from direct access by 
  8532. all other objects. Data members can only be accessed by the member functions of 
  8533. the defining class and its subclasses. 
  8534.  
  8535.  
  8536. ΓòÉΓòÉΓòÉ <hidden> data model ΓòÉΓòÉΓòÉ
  8537.  
  8538. A combination of the base classes and parts shipped with the product and the 
  8539. classes and parts you save and create. They are saved in a file named 
  8540. vbbase.vbb. 
  8541.  
  8542.  
  8543. ΓòÉΓòÉΓòÉ <hidden> data object ΓòÉΓòÉΓòÉ
  8544.  
  8545. A storage area used to hold a value. 
  8546.  
  8547.  
  8548. ΓòÉΓòÉΓòÉ <hidden> declaration ΓòÉΓòÉΓòÉ
  8549.  
  8550. A description that makes an external object or function available to a function 
  8551. or a block. 
  8552.  
  8553.  
  8554. ΓòÉΓòÉΓòÉ <hidden> DEF file ΓòÉΓòÉΓòÉ
  8555.  
  8556. See  module definition file. 
  8557.  
  8558.  
  8559. ΓòÉΓòÉΓòÉ <hidden> derivation ΓòÉΓòÉΓòÉ
  8560.  
  8561. The creation of a new or abstract class from an existing or base class. 
  8562.  
  8563.  
  8564. ΓòÉΓòÉΓòÉ <hidden> destructor ΓòÉΓòÉΓòÉ
  8565.  
  8566. A special class member function that has the same name as the class and is used 
  8567. to destruct class objects. 
  8568.  
  8569.  
  8570. ΓòÉΓòÉΓòÉ <hidden> DLL ΓòÉΓòÉΓòÉ
  8571.  
  8572. See  dynamic link library. 
  8573.  
  8574.  
  8575. ΓòÉΓòÉΓòÉ <hidden> dynamic link library (DLL) ΓòÉΓòÉΓòÉ
  8576.  
  8577. In OS/2, a library containing data and code objects that can be used by 
  8578. programs or applications during loading or at run time. Although they are not 
  8579. part of the program's executable (.exe) file, they are sometimes required for 
  8580. an .exe file to run properly. 
  8581.  
  8582.  
  8583. ΓòÉΓòÉΓòÉ <hidden> encapsulation ΓòÉΓòÉΓòÉ
  8584.  
  8585. The hiding of a software object's internal representation. The object provides 
  8586. an interface that queries and manipulates the data without exposing its 
  8587. underlying structure. 
  8588.  
  8589.  
  8590. ΓòÉΓòÉΓòÉ <hidden> event ΓòÉΓòÉΓòÉ
  8591.  
  8592. A specification of a notification from a part. 
  8593.  
  8594. Compare to  action, attribute, and  part event. 
  8595.  
  8596.  
  8597. ΓòÉΓòÉΓòÉ <hidden> event-to-action connection ΓòÉΓòÉΓòÉ
  8598.  
  8599. A connection that causes an action to be performed when an event occurs. 
  8600.  
  8601. See also  connection. 
  8602.  
  8603.  
  8604. ΓòÉΓòÉΓòÉ <hidden> event-to-attribute connection ΓòÉΓòÉΓòÉ
  8605.  
  8606. A connection that changes the value of an attribute when a certain event 
  8607. occurs. 
  8608.  
  8609. See also  connection. 
  8610.  
  8611.  
  8612. ΓòÉΓòÉΓòÉ <hidden> event-to-member function connection ΓòÉΓòÉΓòÉ
  8613.  
  8614. A connection from an event of a part to a member function. When the connected 
  8615. event occurs, the member function is executed. 
  8616.  
  8617. See also  connection. 
  8618.  
  8619.  
  8620. ΓòÉΓòÉΓòÉ <hidden> expansion area ΓòÉΓòÉΓòÉ
  8621.  
  8622. The section of a multicell canvas between the current cell grid and the outer 
  8623. edge of the canvas. Visually, this area is bounded by the rightmost column 
  8624. gridline and the bottommost row gridline. 
  8625.  
  8626.  
  8627. ΓòÉΓòÉΓòÉ <hidden> feature ΓòÉΓòÉΓòÉ
  8628.  
  8629. A major component of a software product that can be installed separately. 
  8630.  
  8631. In Visual Builder, an action, attribute, or event that is available from a 
  8632. part's part interface and that other parts can connect to. 
  8633.  
  8634.  
  8635. ΓòÉΓòÉΓòÉ <hidden> full attribute ΓòÉΓòÉΓòÉ
  8636.  
  8637. An attribute that has all of the behaviors and characteristics that an 
  8638. attribute can have:  a data member, a get member function, a set member 
  8639. function, and an event identifier. 
  8640.  
  8641.  
  8642. ΓòÉΓòÉΓòÉ <hidden> free-form surface ΓòÉΓòÉΓòÉ
  8643.  
  8644. The large open area of the Composition Editor window. The free-form surface 
  8645. holds the visual parts contained in the views you build and representations of 
  8646. the nonvisual parts (models) that your application includes. 
  8647.  
  8648.  
  8649. ΓòÉΓòÉΓòÉ <hidden> graphical user interface (GUI) ΓòÉΓòÉΓòÉ
  8650.  
  8651. A type of interface that enables users to communicate with a program by 
  8652. manipulating graphical features, rather than by entering commands. Typically, a 
  8653. graphical user interface includes a combination of graphics, pointing devices, 
  8654. menu bars and other menus, overlapping windows, and icons. 
  8655.  
  8656.  
  8657. ΓòÉΓòÉΓòÉ <hidden> GUI ΓòÉΓòÉΓòÉ
  8658.  
  8659. See  graphical user interface. 
  8660.  
  8661.  
  8662. ΓòÉΓòÉΓòÉ <hidden> handles ΓòÉΓòÉΓòÉ
  8663.  
  8664. Small squares that appear on the corners of a selected visual part in the 
  8665. visual builder. Handles are used to resize parts. 
  8666.  
  8667. Compare to  primary selection. 
  8668.  
  8669.  
  8670. ΓòÉΓòÉΓòÉ <hidden> header file ΓòÉΓòÉΓòÉ
  8671.  
  8672. A file that contains system-defined control information that precedes user 
  8673. data. 
  8674.  
  8675.  
  8676. ΓòÉΓòÉΓòÉ <hidden> inheritance ΓòÉΓòÉΓòÉ
  8677.  
  8678. A mechanism by which an object class can use the attributes, relationships, and 
  8679. member functions defined in more abstract classes related to it (its base 
  8680. classes). 
  8681.  
  8682. An object-oriented programming technique that allows you to use existing 
  8683. classes as bases for creating other classes. 
  8684.  
  8685.  
  8686. ΓòÉΓòÉΓòÉ <hidden> instance ΓòÉΓòÉΓòÉ
  8687.  
  8688. Synonym for  object, a particular instantiation of a data type. 
  8689.  
  8690.  
  8691. ΓòÉΓòÉΓòÉ <hidden> legacy code ΓòÉΓòÉΓòÉ
  8692.  
  8693. Existing code that a user might have. Legacy applications often have 
  8694. character-based, nongraphical user interfaces; usually they are written in a 
  8695. nonobject-oriented language, such as C or COBOL. 
  8696.  
  8697.  
  8698. ΓòÉΓòÉΓòÉ <hidden> loaded ΓòÉΓòÉΓòÉ
  8699.  
  8700. The state of the mouse pointer between the time you select a part from the 
  8701. parts palette and deposit the part on the free-form surface. 
  8702.  
  8703.  
  8704. ΓòÉΓòÉΓòÉ <hidden> main part ΓòÉΓòÉΓòÉ
  8705.  
  8706. The part that users see when they start an application. This is the part from 
  8707. which the main() function C++ code for the application is generated. 
  8708.  
  8709. The main part is a special kind of composite part. 
  8710.  
  8711. See also  part and  subpart. 
  8712.  
  8713.  
  8714. ΓòÉΓòÉΓòÉ <hidden> member ΓòÉΓòÉΓòÉ
  8715.  
  8716. A data object in a structure or a union. 
  8717.  
  8718. In C++, classes and structures can also contain functions and types as members. 
  8719.  
  8720.  
  8721. ΓòÉΓòÉΓòÉ <hidden> member function ΓòÉΓòÉΓòÉ
  8722.  
  8723. An operator or function that is declared as a member of a class. A member 
  8724. function has access to the private and protected data members and member 
  8725. functions of objects of its class. 
  8726.  
  8727.  
  8728. ΓòÉΓòÉΓòÉ <hidden> member function call ΓòÉΓòÉΓòÉ
  8729.  
  8730. A communication from one object to another that requests the receiving object 
  8731. to execute a member function. 
  8732.  
  8733. A member function call consists of a member function name that indicates the 
  8734. requested member function and the arguments to be used in executing the member 
  8735. function. The member function call always returns some object to the requesting 
  8736. object as the result of performing the member function. 
  8737.  
  8738. Synonym for  message. 
  8739.  
  8740.  
  8741. ΓòÉΓòÉΓòÉ <hidden> member function name ΓòÉΓòÉΓòÉ
  8742.  
  8743. The component of a member function call that specifies the requested operation. 
  8744.  
  8745.  
  8746. ΓòÉΓòÉΓòÉ <hidden> message ΓòÉΓòÉΓòÉ
  8747.  
  8748. A request from one object that the receiving object implement a member 
  8749. function. Because data is encapsulated and not directly accessible, a message 
  8750. is the only way to send data from one object to another. Each message specifies 
  8751. the name of the receiving object, the member function to be implemented, and 
  8752. any arguments the member function needs for implementation. 
  8753.  
  8754. Synonym for  member function call. 
  8755.  
  8756.  
  8757. ΓòÉΓòÉΓòÉ <hidden> model ΓòÉΓòÉΓòÉ
  8758.  
  8759. A nonvisual part that represents the state and behavior of a object, such as a 
  8760. customer or an account. 
  8761.  
  8762. Contrast with  view. 
  8763.  
  8764.  
  8765. ΓòÉΓòÉΓòÉ <hidden> module definition file ΓòÉΓòÉΓòÉ
  8766.  
  8767. A file that describes the code segments within a load module. 
  8768.  
  8769. Synonym for DEF file. 
  8770.  
  8771.  
  8772. ΓòÉΓòÉΓòÉ <hidden> nested class ΓòÉΓòÉΓòÉ
  8773.  
  8774. A class defined within the scope of another class. 
  8775.  
  8776.  
  8777. ΓòÉΓòÉΓòÉ <hidden> nonvisual part ΓòÉΓòÉΓòÉ
  8778.  
  8779. A part that has no visual representation at run time. A nonvisual part 
  8780. typically represents some real-world object that exists in the business 
  8781. environment. 
  8782.  
  8783. Compare to  model. Contrast with  view and  visual part. 
  8784.  
  8785.  
  8786. ΓòÉΓòÉΓòÉ <hidden> no-event attribute ΓòÉΓòÉΓòÉ
  8787.  
  8788. An attribute that does not have an event identifier. 
  8789.  
  8790.  
  8791. ΓòÉΓòÉΓòÉ <hidden> no-set attribute ΓòÉΓòÉΓòÉ
  8792.  
  8793. An attribute that does not have a set member function. 
  8794.  
  8795.  
  8796. ΓòÉΓòÉΓòÉ <hidden> notebook part ΓòÉΓòÉΓòÉ
  8797.  
  8798. A visual part that resembles a bound notebook containing pages separated into 
  8799. sections by tabbed divider pages. A user can turn the pages of a notebook or 
  8800. select the tabs to move from one section to another. 
  8801.  
  8802.  
  8803. ΓòÉΓòÉΓòÉ <hidden> object ΓòÉΓòÉΓòÉ
  8804.  
  8805. A computer representation of something that a user can work with to perform a 
  8806. task. An object can appear as text or an icon. 
  8807.  
  8808. A collection of data and member functions that operate on that data, which 
  8809. together represent a logical entity in the system. In object-oriented 
  8810. programming, objects are grouped into classes that share common data 
  8811. definitions and member functions. Each object in the class is said to be an 
  8812. instance of the class. 
  8813.  
  8814. An instance of an object class consisting of attributes, a data structure, and 
  8815. operational member functions. It can represent a person, place, thing, event, 
  8816. or concept. Each instance has the same properties, attributes, and member 
  8817. functions as other instances of the object class, though it has unique values 
  8818. assigned to its attributes. 
  8819.  
  8820.  
  8821. ΓòÉΓòÉΓòÉ <hidden> object class ΓòÉΓòÉΓòÉ
  8822.  
  8823. A template for defining the attributes and member functions of an object. An 
  8824. object class can contain other object classes. An individual representation of 
  8825. an object class is called an object. 
  8826.  
  8827.  
  8828. ΓòÉΓòÉΓòÉ <hidden> object factory ΓòÉΓòÉΓòÉ
  8829.  
  8830. A nonvisual part capable of dynamically creating new instances of a specified 
  8831. part. For example, during the execution of an application, an object factory 
  8832. can create instances of a new class to collect the data being generated. 
  8833.  
  8834.  
  8835. ΓòÉΓòÉΓòÉ <hidden> object-oriented programming ΓòÉΓòÉΓòÉ
  8836.  
  8837. A programming approach based on the concepts of data abstraction and 
  8838. inheritance. Unlike procedural programming techniques, object-oriented 
  8839. programming concentrates on those data objects that comprise the problem and 
  8840. how they are manipulated, not on how something is accomplished. 
  8841.  
  8842.  
  8843. ΓòÉΓòÉΓòÉ <hidden> observer ΓòÉΓòÉΓòÉ
  8844.  
  8845. An object that receives notification from a notifier object. 
  8846.  
  8847.  
  8848. ΓòÉΓòÉΓòÉ <hidden> operation ΓòÉΓòÉΓòÉ
  8849.  
  8850. A member function or service that can be requested of an object. 
  8851.  
  8852.  
  8853. ΓòÉΓòÉΓòÉ <hidden> overloading ΓòÉΓòÉΓòÉ
  8854.  
  8855. An object-oriented programming technique that allows you to redefine functions 
  8856. and most standard C++ operators when the functions and operators are used with 
  8857. class types. 
  8858.  
  8859.  
  8860. ΓòÉΓòÉΓòÉ <hidden> palette ΓòÉΓòÉΓòÉ
  8861.  
  8862. See  parts palette. 
  8863.  
  8864.  
  8865. ΓòÉΓòÉΓòÉ <hidden> parameter connection ΓòÉΓòÉΓòÉ
  8866.  
  8867. A connection that satisfies a parameter of an action or member function by 
  8868. supplying either an attribute's value or the return value of an action, member 
  8869. function, or custom logic. The parameter is always the source of the 
  8870. connection. 
  8871.  
  8872. See also  connection. 
  8873.  
  8874.  
  8875. ΓòÉΓòÉΓòÉ <hidden> parent class ΓòÉΓòÉΓòÉ
  8876.  
  8877. The class from which another part or class inherits data, member functions, or 
  8878. both. 
  8879.  
  8880.  
  8881. ΓòÉΓòÉΓòÉ <hidden> part ΓòÉΓòÉΓòÉ
  8882.  
  8883. A self-contained software object with a standardized public interface, 
  8884. consisting of a set of external features that allow the part to interact with 
  8885. other parts. A part is implemented as a class that supports the INotifier 
  8886. protocol and has a part interface defined. 
  8887.  
  8888. The parts on the palette can be used as templates to create instances or 
  8889. objects. 
  8890.  
  8891.  
  8892. ΓòÉΓòÉΓòÉ <hidden> part event ΓòÉΓòÉΓòÉ
  8893.  
  8894. A representation of a change that occurs to a part. The events on a part's 
  8895. interface enable other interested parts to receive notification when something 
  8896. about the part changes. For example, a push button generates an event signaling 
  8897. that it has been clicked, which might cause another part to display a window. 
  8898.  
  8899.  
  8900. ΓòÉΓòÉΓòÉ <hidden> part event ID ΓòÉΓòÉΓòÉ
  8901.  
  8902. The name of a part static-data member used to identify which notification is 
  8903. being signaled. 
  8904.  
  8905.  
  8906. ΓòÉΓòÉΓòÉ <hidden> part interface ΓòÉΓòÉΓòÉ
  8907.  
  8908. A set of external features that allows a part to interact with other parts. A 
  8909. part's interface is made up of three characteristics: attributes, actions, and 
  8910. events. 
  8911.  
  8912.  
  8913. ΓòÉΓòÉΓòÉ <hidden> Part Interface Editor ΓòÉΓòÉΓòÉ
  8914.  
  8915. An editor that the application developer uses to create and modify attributes, 
  8916. actions, and events, which together make up the interface of a part. 
  8917.  
  8918. Compare to  Class Editor and  Composition Editor. 
  8919.  
  8920.  
  8921. ΓòÉΓòÉΓòÉ <hidden> parts palette ΓòÉΓòÉΓòÉ
  8922.  
  8923. The parts palette holds a collection of visual and nonvisual parts used in 
  8924. building additional parts for an application. The parts palette is organized 
  8925. into categories. Application developers can add parts to the palette for use in 
  8926. defining applications or other parts. 
  8927.  
  8928.  
  8929. ΓòÉΓòÉΓòÉ <hidden> preferred features ΓòÉΓòÉΓòÉ
  8930.  
  8931. A subset of the part's features that appear in a pop-up connection menu. 
  8932. Generally, they are the features used most often. 
  8933.  
  8934.  
  8935. ΓòÉΓòÉΓòÉ <hidden> primary selection ΓòÉΓòÉΓòÉ
  8936.  
  8937. In the Composition Editor, the part used as a base for an action that affects 
  8938. several parts. For example, an alignment tool will align all selected parts 
  8939. with the primary selection. Primary selection is indicated by closed (solid) 
  8940. selection handles, while the other selected parts have open selection handles. 
  8941.  
  8942. See also  selection handles. 
  8943.  
  8944.  
  8945. ΓòÉΓòÉΓòÉ <hidden> private ΓòÉΓòÉΓòÉ
  8946.  
  8947. Pertaining to a class member that is accessible only to member functions and 
  8948. friends of that class. 
  8949.  
  8950.  
  8951. ΓòÉΓòÉΓòÉ <hidden> process ΓòÉΓòÉΓòÉ
  8952.  
  8953. A program running under OS/2, along with the resources associated with it 
  8954. (memory, threads, file system resources, and so on). 
  8955.  
  8956.  
  8957. ΓòÉΓòÉΓòÉ <hidden> program ΓòÉΓòÉΓòÉ
  8958.  
  8959. One or more files containing a set of instructions conforming to a particular 
  8960. programming language syntax. 
  8961.  
  8962. A self-contained, executable module. Multiple copies of the same program can be 
  8963. run in different processes. 
  8964.  
  8965.  
  8966. ΓòÉΓòÉΓòÉ <hidden> protected ΓòÉΓòÉΓòÉ
  8967.  
  8968. Pertaining to a class member that is only accessible to member functions and 
  8969. friends of that class, or to member functions and friends of classes derived 
  8970. from that class. 
  8971.  
  8972.  
  8973. ΓòÉΓòÉΓòÉ <hidden> prototype ΓòÉΓòÉΓòÉ
  8974.  
  8975. A function declaration or definition that includes both the return type of the 
  8976. function and the types of its arguments. 
  8977.  
  8978.  
  8979. ΓòÉΓòÉΓòÉ <hidden> primitive part ΓòÉΓòÉΓòÉ
  8980.  
  8981. A basic building block of other parts. A primitive part can be relatively 
  8982. complex in terms of the function it provides. 
  8983.  
  8984.  
  8985. ΓòÉΓòÉΓòÉ <hidden> process ΓòÉΓòÉΓòÉ
  8986.  
  8987. A collection of code, data, and other system resources, including at least one 
  8988. thread of execution, that performs a data processing task. 
  8989.  
  8990.  
  8991. ΓòÉΓòÉΓòÉ <hidden> property ΓòÉΓòÉΓòÉ
  8992.  
  8993. A unique characteristic of a part. 
  8994.  
  8995.  
  8996. ΓòÉΓòÉΓòÉ <hidden> pure virtual function ΓòÉΓòÉΓòÉ
  8997.  
  8998. A virtual function that has a function definition of = 0;. 
  8999.  
  9000.  
  9001. ΓòÉΓòÉΓòÉ <hidden> receiver ΓòÉΓòÉΓòÉ
  9002.  
  9003. The object that receives a member function call. 
  9004.  
  9005. Contrast with  caller. 
  9006.  
  9007.  
  9008. ΓòÉΓòÉΓòÉ <hidden> resource file ΓòÉΓòÉΓòÉ
  9009.  
  9010. A file that contains data used by an application, such as text strings and 
  9011. icons. 
  9012.  
  9013.  
  9014. ΓòÉΓòÉΓòÉ <hidden> selection handles ΓòÉΓòÉΓòÉ
  9015.  
  9016. In the Composition Editor, small squares that appear on the corners of a 
  9017. selected visual part. Selection handles are used to resize parts. 
  9018.  
  9019. See also  primary selection. 
  9020.  
  9021.  
  9022. ΓòÉΓòÉΓòÉ <hidden> server ΓòÉΓòÉΓòÉ
  9023.  
  9024. A computer that provides services to multiple users or workstations in a 
  9025. network; for example, a file server, a print server, or a mail server. 
  9026.  
  9027.  
  9028. ΓòÉΓòÉΓòÉ <hidden> service ΓòÉΓòÉΓòÉ
  9029.  
  9030. A specific behavior that an object is responsible for exhibiting. 
  9031.  
  9032.  
  9033. ΓòÉΓòÉΓòÉ <hidden> settings view ΓòÉΓòÉΓòÉ
  9034.  
  9035. A view of a part that provides a way to display and set the attributes and 
  9036. options associated with the part. 
  9037.  
  9038.  
  9039. ΓòÉΓòÉΓòÉ <hidden> sticky ΓòÉΓòÉΓòÉ
  9040.  
  9041. In the Composition Editor, the mode that enables you to add multiple parts of 
  9042. the same class (for example, three push buttons) without going back and forth 
  9043. between the parts palette and the free-form surface. 
  9044.  
  9045.  
  9046. ΓòÉΓòÉΓòÉ <hidden> structure ΓòÉΓòÉΓòÉ
  9047.  
  9048. A construct that contains an ordered group of data objects. Unlike an array, 
  9049. the data objects within a structure can have varied data types. 
  9050.  
  9051.  
  9052. ΓòÉΓòÉΓòÉ <hidden> subpart ΓòÉΓòÉΓòÉ
  9053.  
  9054. A part that is used to create another part. 
  9055.  
  9056. See also  nonvisual part, part, and  visual part. 
  9057.  
  9058.  
  9059. ΓòÉΓòÉΓòÉ <hidden> superclass ΓòÉΓòÉΓòÉ
  9060.  
  9061. See  abstract class and  base class. 
  9062.  
  9063.  
  9064. ΓòÉΓòÉΓòÉ <hidden> tear-off attribute ΓòÉΓòÉΓòÉ
  9065.  
  9066. An attribute that an application developer has exposed to work with as though 
  9067. it were a stand-alone part. 
  9068.  
  9069.  
  9070. ΓòÉΓòÉΓòÉ <hidden> template ΓòÉΓòÉΓòÉ
  9071.  
  9072. A family of classes or functions with variable types. 
  9073.  
  9074.  
  9075. ΓòÉΓòÉΓòÉ <hidden> thread ΓòÉΓòÉΓòÉ
  9076.  
  9077. A unit of execution within a process. 
  9078.  
  9079.  
  9080. ΓòÉΓòÉΓòÉ <hidden> tool bar ΓòÉΓòÉΓòÉ
  9081.  
  9082. The strip of icons along the top of the free-form surface. The tool bar 
  9083. contains tools to help you construct composite parts. 
  9084.  
  9085.  
  9086. ΓòÉΓòÉΓòÉ <hidden> UI ΓòÉΓòÉΓòÉ
  9087.  
  9088. See  user interface. 
  9089.  
  9090.  
  9091. ΓòÉΓòÉΓòÉ <hidden> unloaded ΓòÉΓòÉΓòÉ
  9092.  
  9093. The state of the mouse pointer before you select a part from the parts palette 
  9094. and after you deposit a part on the free-form surface. In addition, you can 
  9095. unload the mouse pointer by pressing the Esc key. 
  9096.  
  9097.  
  9098. ΓòÉΓòÉΓòÉ <hidden> user interface (UI) ΓòÉΓòÉΓòÉ
  9099.  
  9100. The hardware, software, or both that enable a user to interact with a computer. 
  9101.  
  9102. The term user interface normally refers to the visual presentation and its 
  9103. underlying software with which a user interacts. 
  9104.  
  9105.  
  9106. ΓòÉΓòÉΓòÉ <hidden> variable ΓòÉΓòÉΓòÉ
  9107.  
  9108. A storage place within an object for a data feature. The data feature is an 
  9109. object, such as number or date, stored as an attribute of the containing 
  9110. object. 
  9111.  
  9112. A part that receives an identity at run time. A variable by itself contains no 
  9113. data or program logic; it must be connected such that it receives runtime 
  9114. identity from a part elsewhere in the application. 
  9115.  
  9116.  
  9117. ΓòÉΓòÉΓòÉ <hidden> view ΓòÉΓòÉΓòÉ
  9118.  
  9119. A visual part, such as a window, push button, or entry field. 
  9120.  
  9121. A visual representation that can display and change the underlying model 
  9122. objects of an application. Views are both the end result of developing an 
  9123. application and the basic unit of composition of user interfaces. 
  9124.  
  9125. Compare to  visual part. Contrast with  model. 
  9126.  
  9127.  
  9128. ΓòÉΓòÉΓòÉ <hidden> virtual function ΓòÉΓòÉΓòÉ
  9129.  
  9130. A function of a class that is declared with the keyword virtual. The 
  9131. implementation that is executed when you make a call to a virtual function 
  9132. depends on the type of the object for which it is called. This is determined at 
  9133. run time. 
  9134.  
  9135.  
  9136. ΓòÉΓòÉΓòÉ <hidden> visual part ΓòÉΓòÉΓòÉ
  9137.  
  9138. A part that has a visual representation at run time. Visual parts, such as 
  9139. windows, push buttons, and entry fields, make up the user interface of an 
  9140. application. 
  9141.  
  9142. Compare to  view. Contrast with  nonvisual part. 
  9143.  
  9144.  
  9145. ΓòÉΓòÉΓòÉ <hidden> visual programming tool ΓòÉΓòÉΓòÉ
  9146.  
  9147. A tool that provides a means for specifying programs graphically. Application 
  9148. programmers write applications by manipulating graphical representations of 
  9149. components. 
  9150.  
  9151.  
  9152. ΓòÉΓòÉΓòÉ <hidden> white space ΓòÉΓòÉΓòÉ
  9153.  
  9154. Space characters, tab characters, form-feed characters, and new-line 
  9155. characters. 
  9156.  
  9157.  
  9158. ΓòÉΓòÉΓòÉ <hidden> window ΓòÉΓòÉΓòÉ
  9159.  
  9160. A rectangular area of the screen with visible boundaries in which information 
  9161. is displayed. Windows can overlap on the screen, giving it the appearance of 
  9162. one window being on top of another. 
  9163.  
  9164. In the Composition Editor, a window is a part that can be used as a container 
  9165. for other visual parts, such as push buttons.