═══ About this Information ═══ The How Do I... information provides solutions to common tasks that you would perform with the various components of VisualAge C++. Before you begin to use this information, it would be helpful to understand how to navigate through it:  Use the Contents and Index facilities to locate topics.  Use the Search facility to search the text of this document.  Use hypertext links to acquire related information on the current topic. Hypertext links appear in a different color (which you can customize using the OS/2 Scheme Palette). For example, below there are two lists of hypertext links. By double-clicking on the text of the link or by pressing Enter on a highlighted link, you will open a panel of related information. To shift the focus to other links using the keyboard, use the Tab key. For more information on using this help facility, see:  How to Use the Contents  How to Obtain Additional Information  How to Access and Use IPF Facilities For more information, see:  Other Information You Might Find Helpful  Communicating Your Comments to IBM  Notices  Trademarks ═══ How to Use the Contents ═══ The Contents window is the first to appear. Some topics have a plus ( ) icon beside them. This icon indicates that additional topics are available. To expand the Contents if you are using a mouse, click on the plus ( ) icon. If you are using the keyboard, use the Up or Down Arrow key to highlight the topic, and press the plus (+) key. To see additional topics for a heading with a plus ( ) icon, click on the icon or highlight that topic and press the plus (+) key. To view a topic, double-click on the topic (or press the Up or Down Arrow key to highlight the topic, and then press the Enter key). ═══ How to Obtain Additional Information ═══ After you select a topic, the information for that topic appears in a window. Highlighted words or phrases indicate that additional information is available. Certain words and phrases are highlighted in a different color from the surrounding text. These are called hypertext terms. If you are using a mouse, double-click on the highlighted word. If you are using a keyboard, press the Tab key to move to the highlighted word, and then press the Enter key. Additional information then appears in a window. ═══ How to Access and Use IPF Facilities ═══ Several choices are available for managing the information presented in this document. There are three PullDown menus: the Services menu, the Options menu, and the Help menu. The actions that are selectable from the Services menu operate on the active window currently displayed on the screen. These actions include the following: Placing Bookmarks You can set a placeholder so you can retrieve information of interest to you. Searching for Information You can find occurrences of a word or phrase in the current topic, selected topics, or all topics. Printing Information You can print one or more topics. You can also print a set of topics by first marking the topics in the Contents list. Copying Information to a File You can copy a topic that you are viewing to the System Clipboard or to a file that you can edit. This method is particularly useful for copying syntax definitions and program samples into the application that you are developing. Using the actions that are selectable from the Options menu, you can change the way your Contents list is displayed. To expand the Contents and show all levels for all topics, choose Expand all from the Options PullDown menu. You can also press the Ctrl, Shift and * keys together. The actions that are selectable from the Help menu allow you to select different types of help information. For information about any of the menu choices, highlight the choice in the menu and press F1. ═══ Placing Bookmarks ═══ When you place a bookmark on a topic, it is added to a list of bookmarks you have previously set. You can view the list, and you can remove one or all bookmarks from the list. If you have not set any bookmarks, the list is empty. To set a bookmark, do the following: 1. Select a topic from the Contents. 2. When that topic appears, select the Bookmark option from the Services menu. 3. If you want to change the name used for the bookmark, type the new name in the field. 4. Click on the Place radio button (or press the Up or Down Arrow key to select it). 5. Click on OK (or select it and press Enter). The bookmark is then added to the bookmark list. ═══ Searching for Information ═══ You can specify a word or phrase to be searched. You can also limit the search to a set of topics by first marking the topics in the Contents list. To search for a word or phrase in all topics, do the following: 1. Select the Search option from the Services menu. 2. Type the word or words to be searched for. 3. Click on All sections (or press the Up or Down Arrow keys to select it). 4. Click on Search (or select it and press Enter) to begin the search. 5. The list of topics where the word or phrase appears is displayed. ═══ Printing Information ═══ You can print one or more topics, the index, or the table of contents. Make sure that your printer is connected to the serial port, configured correctly, and ready for input. To print: 1. Select Print from the Services menu. 2. Select what you want to print. Note that the This section and Marked sections choices are only available if you are viewing a topic or if you have marked topics, respectively. To mark topics in the table of contents, press the Ctrl key and click on the topics, or use the arrow keys. 3. Select Print to print what you've chosen on your printer. ═══ Copying Information to a File ═══ You can copy a topic that you are viewing in two ways:  Copy copies the topic that you are viewing into the System Clipboard. If you are using a Presentation Manager (PM) editor (for example, the Enhanced Editor) that copies or cuts (or both) to the System Clipboard, and pastes to the System Clipboard, you can easily add the copied information to your program source module.  Copy to file copies the topic that you are viewing into a temporary file named TEXT.TMP. You can later edit that file by using any editor. TEXT.TMP is placed in the directory where your viewable document resides. To copy a topic, do the following: 1. Expand the Contents list and select a topic. 2. When the topic appears, select Copy to file from the Services menu. 3. The system puts the text pertaining to that topic into the temporary file TEXT.TMP. ═══ Other Information You Might Find Helpful ═══ The VisualAge C++ provides a number of online guides and references that we hope you'll find helpful as you develop applications. This information includes:  User's Guide information provides conceptual and usage information,  Reference information is organized for quick access, and  How Do I... information gives you specific instructions for performing common tasks. You can get to this online information from the Information folder inside the main product folder. You can also get to it from the Help menu in any of the components of the product. ═══ Communicating Your Comments to IBM ═══ If there is something you like, or dislike, about this document, please let us know. You can use one of the methods listed below to send your comments to IBM. Please be sure to include the complete title of the publication that you are commenting on. For example, you would refer to the How Do I... information for the Browser as: VisualAge C++ Browser: How Do I... for OS/2. The comments you send should only pertain to the information in this document and its presentation. To request additional publications or to ask questions or make comments about the functions of IBM products or systems, you should talk to your IBM representative or your authorized IBM remarketer. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. You can send your comments to IBM in the following ways:  By mail to the following address: IBM Canada Ltd. Laboratory Information Development 2G/345/1150/TOR 1150 EGLINTON AVENUE EAST NORTH YORK, ONTARIO CANADA M3C 1H7  By FAX to the following number: - United States and Canada: (416) 448-6161 - Other countries (+1) 416-448-6161  By electronic mail to one of the following IDs. Be sure to include your entire network address if you wish to get a reply. - Internet: torrcf@vnet.ibm.com - IBMLink: toribm(torrcf) - IBM/PROFS: torolab4(torrcf) - IBMMAIL: ibmmail(caibmwt9 ═══ Notices ═══ Copyright International Business Machines Corporation, 1995. All rights reserved. Note to U.S. Government Users - Documentation related to restricted rights - Use, duplication, or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. This edition applies to Version 3.0 of IBM VisualAge C++ for OS/2 (30H1664, 30H1665, 30H1666) and to all subsequent releases and modifications until otherwise indicated in new editions. Make sure you are using the correct edition for the level of the product. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; any such changes will be reported in subsequent revisions. Requests for publications and for technical information about IBM products should be made to your IBM Authorized Dealer or your IBM Marketing Representative. When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any ways it believes appropriate without incurring any obligation to you. Any reference to an IBM licensed program in this publication is not intended to state or imply that only IBM's licensed program may be used. Any functionally equivalent product, program, or service that does not infringe any of IBM's intellectual property rights may be used instead of the IBM product, program, or service. Evaluation and verification of operation in conjunction with other products, except those expressly designated by IBM, is the user's responsibility. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to the IBM Director of Licensing. IBM Corporation, 500 Columbus Avenue, Thornwood, NY, 10594, USA. This publication contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. ═══ Trademarks and Service Marks ═══ The following terms used in this publication are trademarks or service marks of IBM Corporation in the United States or other countries: C/2 C Set/2 C Set ++ Common User Access CUA IBM Operating System/2 OS/2 Personal System/2 Presentation Manager PS/2 VisualAge WorkFrame/2 Other company, product, and service names, which may be denoted by a double asterisk(**), may be trademarks or service marks of others. ═══ 1. Use the Browser ═══ Browsing is a technique for understanding the complexities inherent in an object-oriented application. The Browser helps you to:  Navigate through an inheritance hierarchy.  Understand the full interface of a class available to you as a programmer.  Locate the body of a function or a class definition amongst dozens (possibly hundreds) of files across multiple directories.  Understand calling relationships between functions. When you first start the Browser, you will be presented with a blank List window. Use the File PullDown menu to load either a program file (.DLL, .EXE, .LIB) or a Browser database file (.PDD, .PDE, .PDL). A list of all the classes defined in the file are listed in the List window. To perform actions on objects, use Mouse Button 2 on the selected object to invoke the object's PopUp menu. For more information on using the Browser, see the Browser section in the User's Guide. ═══ 2. Browse Files ═══ You can use the Browser to browse the following:  VisualAge C++ Open Class Library  Your own program files (.DLLs, .EXEs, .LIBs)  Direct To SOM C++ objects You can use the Browser to do limited browsing on the following:  C programs  IDL-based SOM C++ objects While some similarity exists between C++ and other object-oriented languages, the VisualAge C++ Browser is a C++ class browser. Therefore, you cannot use the Browser to browse the following:  OO REXX,  OO COBOL, or  Any other object-oriented languages Related Tasks:  How do I browse without compiling.  How do I edit and browse at the same time. ═══ 2.1. Browsing the VisualAge C++ Open Class Library ═══ You can quickly browse the libraries that make up the IBM VisualAge C++ Open Class Library: 1. Select the File PullDown menu. 2. Select the Load  Cascade menu. 3. Choose one of:  User Interface Classes  Collection Classes  I/O Stream Classes  Complex Math Classes  Database Access Classes  Application Support Classes You can also quickly merge these files with your own loaded program: 1. Select the File PullDown menu. 2. Select the Merge  Cascade menu. 3. Choose one of:  User Interface Classes  Collection Classes  I/O Stream Classes  Complex Math Classes  Database Access Classes  Application Support Classes ═══ 2.2. Browsing your own Program Files ═══ You need to understand the types provided by class libraries and frameworks in order to understand how class libraries work. Typically, within a library, function calls made internally are not exposed to the user, except for "trivial" inline functions. You can create a single program file (.DLL, .EXE, or .LIB) which includes all the interfaces to a third party library, and either use the compiler to generate the Browser information, or use the QuickBrowse feature.  To compile and link, use the /Fb compiler option and the /BROWSE linker option.  To use QuickBrowse, see How Do I browse without compiling. Note that function call information is not present for QuickBrowsed programs. Related Information:  Open the User's Guide section on the /Fb compiler option.  Open the User's Guide section on the /BROWSE linker option. ═══ 2.3. Browsing C Programs ═══ You can do limited browsing on C files by compiling them as C++ files. Unfortunately, the data obtained this way will have limited value, since there are no classes in the C language. However, file and function call information will be present. ═══ 2.4. Browsing Direct To SOM C++ Objects ═══ To list only the SOM objects used in your program: 1. Select the Actions PullDown menu. 2. Select the Search Application... menu item. 3. Select the Classes RadioButton. 4. Select the SOM RadioButton. 5. Select the Search or Apply PushButton to initiate the search. If your currently loaded program contains SOM objects, then a List window with all the SOM objects listed will be displayed. By default, SOM objects are displayed in green. If there are no SOM objects, you will get a No Results Found MessageBox. In order to browse the SOM objects, use Mouse Button 2 to get action PopUps. Note: Only SOM classes compiled with the Direct to SOM feature of the VisualAge C++ compiler can be fully browsed, unless you generate C++ bindings for these classes, and then compile them through the Direct To SOM compiler. IDL-based SOM classes compiled with the SOM emitter can generate C based bindings for the SOM classes defined in the IDL. The SOM C++ emitter will generate C++ definitions. In both cases, the bindings are machine-generated, and the symbols may not be easy to understand. ═══ 2.5. Browsing without Compiling ═══ If the Browser database file is missing or out of date, the Browser provides the QuickBrowse alternative instead of recompiling the modified source files. QuickBrowse examines the makefile and derives the compiler options used to compile the required source files. The source files are then quickly parsed as if they were compiled with such options. QuickBrowse can be invoked within the Browser, and is faster than recompiling the source. You must have an IBM WorkFrame project defined for the file that you are loading in order to use the QuickBrowse facility. QuickBrowse may be invoked in one of two ways: A) You are loading a file that is not found or out-of-date: 1. Select the File PullDown menu. 2. Select the Load... menu item. 3. Choose an .EXE, .DLL, or .LIB file to load. If the .PDB or Browser database file is not found or is out of date, the Browser Files dialog will appear. 4. Check the QuickBrowse files which could not be loaded CheckBox. 5. Select the Load PushButton. B) You are browsing files that have changed since last recompile: 1. Select the File PullDown menu. 2. Choose the Refresh menu item. If some of the source files have changed, the Browser Files dialog will appear. 3. Check the QuickBrowse files which could not be loaded CheckBox. 4. Select the Load PushButton. Note: A QuickBrowse dialog will appear if the target file contains files that were built outside of the scope of the project. The files listed in this dialog will be ignored. ═══ 3. Compile Files for Use with the Browser ═══ In general, you compile your source file with the /Fb option. However, there are two options that you can use to compile your programs for use with the Browser: /Fb or /Fb*. The difference between the two options relates to how much Browser information is generated from system include files. That is, those included via: #include as opposed to: #include "local_file.h". The Generate Browser information option (/Fb) discards much of the non-type information from inside of system include files. For instance:  Non-member function declarations will not be included in the .PDB file, including those C and OS/2 header files. Any friendship granted to these types of omitted functions will not be recorded for a class. For instance: // in int foobar(void); // in "bar.h" class bar { friend int foobar(void); } This friendship will not be included in the list of friends of class bar.  No global variable declared, or defined, in the system header file will be included in the .PDB file. This includes variables of an instantiated template type.  Class member function declarations will be added to the .PDB file, but their inline definitions, if any, will not.  Non-inline function definitions will not be added to the .PDB file. These restrictions are lifted when compiling with the Generate All Browser Information (/Fb*) option. It is recommended that you use the /Fb option, unless the compiler issues a message indicating that the use of the /Fb* option is appropriate. Related Tasks:  How do I browse without compiling. Related Information:  Open the User's Guide section on the /Fb compiler option.  Open the User's Guide section on the /BROWSE linker option. ═══ 4. Create Browser Database Files ═══ The Browser will automatically create a Browser database file from your loaded program files (.DLL, .EXE, or .LIB) when you exit the Browser, or when you load another program. The Browser will then use this database file the next time you load your program files again. The main purpose of the Browser database file is for quick loading. You will not lose any data by loading a Browser database file instead of the program file. The Browser knows when it needs to update the database file by checking the creation dates of the program files. If any of the program file dates are newer than the database file, the Browser performs an incremental "smart" load that incorporates the new/updated information. The Browser will create the following Browser database files depending on what you loaded into the Browser: Program Browser Database File .DLL .PDD .EXE .PDE .LIB .PDL The Browser will use the file name of the program file as the file name for the Browser database file, replacing the file extension as indicated above. The Browser will only prompt you for a name when it cannot determine what to call the file. This only occurs if you have performed a merge. The Browser will load the Browser database file the next time you load the same program file. You can also explicitly load the created Browser database file. Note that if you were asked to name the Browser database file, then you must load that file explicitly in order to get the merged information. Related Tasks:  How do I browse without compiling.  How do I use .PDB, .PDD, .PDE, and .PDL files.  How do I load files.  How do I merge files. ═══ 5. Customize the Browser ═══ You can customize the following:  Graph Window Settings  List Window Settings  Browser Settings  Printer Settings Related Information:  Open the User's Guide to the Graph window description.  Open the User's Guide to the List window description. ═══ 5.1. Changing Graph Window Settings ═══ You can use the Graph Window Settings NoteBook to change any of the following:  Settings - To change the font of the Action Status Bar, to change the default double-click action for objects, and to change the default load action.  Colors - To change the colors used by objects in the Browser.  Styles - To change the shape of the nodes and arcs in the graph.  Bitmap - To change the dimensions of the OS/2 bitmap to be saved. Use the Node Fonts... and List Fonts... menu items on the Graph window Options PullDown menu to change the fonts used in the nodes of the graph and the List Area of the Graph window. ═══ 5.1.1. Changing Graph Settings ═══ You can change the font used by the Action Status Bar, the default action performed when a program is loaded into the Graph window, and the default double-click action performed on objects in the Graph window. 1. Select the Options PullDown menu. 2. Choose the Graph Window... item to load the Graph Window Settings NoteBook. 3. Select the Settings tab. 4. To change the font of the Action Status Bar, choose the Select... PushButton to launch the Action Status Bar Font dialog. Select a font type. 5. To change the default action performed when you have a Graph window open and you load a program into the Browser, select one of the choices from the Initial Action DropDown list. 6. To change the default action performed when a Graph window is loaded, select one of the choices from the DropDown ComboBox. 7. To change the default double-click actions for program objects, select an object and a corresponding action. 8. Select OK to accept the changes or Cancel to close the dialog without making any changes. Note: These changes will be saved to the icsbrs.ini file when you exit the Browser. ═══ 5.1.2. Changing Graph Colors ═══ To change the colors used in the Graph window: 1. Select the Options PullDown menu on the Graph window 2. Select the Graph Window... menu item to load the Graph Window Settings NoteBook. 3. Select the Colors tab. 4. Select an item from the scrollable list of things that you can change the color of. 5. Select a color block from the 16 colors displayed in the upper right. 6. Select OK to apply the new color defaults, which will be saved when you exit the Browser. Note that you can preview your color selections without applying them using the Example Area in the bottom right. ═══ 5.1.3. Changing Graph Styles ═══ You can change the shape of the nodes and arcs on the graph: 1. Select the Options PullDown menu. 2. Select the Graph Window... menu item to load the Graph Window Settings NoteBook. 3. Choose the Styles tab to display the Graph Window Settings Styles page. 4. Select an object from the Object Shape Listbox or a relationship from the Line Style Listbox. 5. Select a shape or line style PushButton to associate with the object or relationship. Note: These changes will be saved to the icsbrs.ini file when you exit the Browser. ═══ 5.1.4. Changing Bitmap Dimensions ═══ You can change the OS/2 bitmap dimensions that the Browser will save a graph to: 1. Select the Options PullDown menu. 2. Select the Graph Window... menu item to load the Graph Window Settings NoteBook. 3. Choose the Bitmap tab to display the Graph Window Settings Bitmap page. 4. Enter the Width and Height dimensions into the corresponding TextEntry fields. Note: These changes will be saved to the icsbrs.ini file when you exit the Browser. ═══ 5.1.5. Changing Graph Fonts ═══ To change the font used by the Graph window: 1. Select the Options PullDown menu on the Graph window.  Choose the Node Fonts... menu item to change the font used in the nodes, or  Choose the List Fonts... menu item to change the font used in the List Area of the Graph window. Either choice will yield the Graph Window Node/List Font dialog. 2. Select a font type. 3. Select OK to apply the changes or Cancel to close the dialog without making any changes. Note: These settings will be saved to the icsbrs.ini file when you exit the Browser. You can also change the fonts of the Action Status Bar:  See How do I change Graph window Settings ═══ 5.2. Changing List Window Settings ═══ You can use the List Window Settings NoteBook to change any of the following:  Settings - To change the font of the Action Status Bar, to change the default double-click action for objects, and to change the default load action.  Colors - To change the colors used by objects in the Browser.  Styles - To change the amount of text displayed in the List Area. Use the List Fonts... menu item on the List window Options PullDown menu to change the font used in the List window. ═══ 5.2.1. Changing List Settings ═══ You can change the font used by the Action Status Bar, the default action performed when a program is loaded into the List window, and the default double-click action performed on program objects listed. 1. Select the Options PullDown menu. 2. Choose the List Window... item to load the List window Settings NoteBook. 3. To change the font of the Action Status Bar, choose the Select... PushButton to launch the Action Status Bar Font dialog. Select a font type. 4. To change the default action performed when you have a List window open and you load a program into the Browser, select one of the choices from the Initial Action DropDown list. 5. To change the default double-click actions for program objects, select an object and a corresponding action. 6. Select OK to accept the changes or Cancel to close the dialog without making any changes. Note: These changes will be saved to the icsbrs.ini file when you exit the Browser. Related Tasks:  How do I order List window contents. ═══ 5.2.2. Changing Colors ═══ To change the colors used in the List window: 1. Select the Options PullDown menu on the List window 2. Choose the List Window... item to load the List Window Settings NoteBook. 3. Select the Colors page. 4. Select an item from the scrollable list. 5. Select a color block from the 16 colors displayed in the upper right. 6. Select OK to apply the new color defaults, which will be saved when you exit the Browser. Note: You can preview your color selections without applying them using the Example Area in the bottom right. ═══ 5.2.3. Changing List Styles ═══ You can change the amount of text displayed in the List window: 1. Select the Options PullDown menu. 2. Select the List Window... menu item to load the List Window Settings NoteBook. 3. Choose the Styles tab to load the List Window Settings Styles page.  Select Attributes to summarize what the program element is (C-constant, V-virtual, E-enumerator, S-static, and PV-pure virtual).  Select Full Text to list the full text of the program elements.  Select Both to list both the summary and the full text of the program elements. Note: These changes will be saved to the icsbrs.ini file when you exit the Browser. ═══ 5.2.4. Changing Fonts ═══ To change the font used by the List window: 1. Select the Options PullDown menu on the List window. 2. Choose the List Fonts... menu item to load the List Window Font dialog. 3. Select a font type. 4. Select OK to apply the changes or Cancel to close the dialog without making any changes. Note: These settings will be saved to the icsbrs.ini file when you exit the Browser. You can also change the fonts of the Action Status Bar:  See How do I change List window Settings ═══ 5.3. Changing Browser Settings ═══ You can use the Browser Settings NoteBook to change any of the following:  Paths - To change the paths used by the Browser to find source, Browser database, and library files and the Browser profile (icsbrs.ini).  Help Levels - To change the level of help offered by the Browser. ═══ 5.3.1. Changing Paths ═══ You can set the paths where the Browser will search for your source files, which library files the Browser should ignore, and where the Browser should save the icsbrs.ini profile. 1. Select the Options PullDown menu. 2. Select the Browser... menu item to load the Browser Settings NoteBook. The first page displayed is the Paths page. 3. Enter your source file path names into the File Search Path TextEntry field. 4. Enter the list of library files that you do not want the Browser to use into the Library Files TextEntry field. 5. Enter the directory where you want the Browser profile, icsbrs.ini, to be saved into the Profile TextEntry field. Note: These settings will be saved to the icsbrs.ini when you exit the Browser. ═══ 5.3.2. Changing Help Levels ═══ You can change the level of help that is available to you through the Browser. 1. Select the Options PullDown menu. 2. Choose the Browser... item to load the Browser Settings NoteBook.  Select New User to have a Browser introductory dialog load on startup of the Browser, as well as have an Information Bar located at the bottom of each window.  Select Intermediate to disable the Browser introductory dialog, but keep the Information Bar still active.  Select Expert to have no introductory dialog and no Information Bar. The Information Bar shows brief help on menu items that you pass the mouse over. From this Settings page, you can also deselect the Confirm on exit CheckBox to keep the Browser from prompting you whether you want to exit the Browser or not when you perform a Exit Browser action. Note: These settings will be saved to the icsbrs.ini file when you exit the Browser. ═══ 5.4. Changing Printer Settings ═══ You can change the printer settings the Browser uses to print the contents of the Graph and List windows. 1. Select the File PullDown menu on either the List or Graph window.  From the List window: Select the Print... menu item to load the Browser Print - List dialog.  From the Graph window: Select the Print  Cascade menu and choose one of the print options to load the Browser Print - dialog. 2. From any Print dialog: Select the Print Setup... PushButton to load the Printer Setup dialog.  Select the printer queue that you want to use for printing from the Select Printer list.  Choose the Job Properties... PushButton if you want to change the job properties associated with the selected printer queue.  Choose the Page Setup... PushButton if you want to change the margins of the paper used for printing.  Select OK to save the changes for this printer queue. Note that only the changes for the last printer queue selected are saved by the Browser. 3. Choose the Fonts... PushButton to select the font that you want to use for printing. Note that the printer settings apply to printing from either the Graph or List windows. ═══ 6. Design Programs Using the Browser ═══ You may find the QuickBrowse feature especially helpful during the design phase. At this point, you are concentrating on defining and refining the objects (types) in the design. QuickBrowse enables you to view the evolving design. Though it imposes the rigor of valid C++ declarations, it allows the flexibility of function bodies that may consist of incomplete code. Whether you use QuickBrowse or not, the Browser is a useful design tool, especially when:  The design becomes large. With the Browser, it is easy to keep track of the many components of the design.  You are participating in a group design effort or wish to have your design reviewed. Provide your coworkers with the Browser database file, and they will be able to review your design (with the exception of function call information if QuickBrowse was used to create the Browser database file). Related Tasks:  How do I browse without compiling. ═══ 7. Distinguish Between my Classes and Others ═══ The only way to distinguish IBM VisualAge C++ Open Class Library classes from your own classes is to not start any of your class names with a capital letter "I". All classes in the IBM VisualAge C++ Open Class Library start with the letter "I", with the exception of the I/O Stream and Complex Mathematics Libraries which do not follow this convention. ═══ 8. Edit Within the Browser ═══ You can launch an edit session from within the Browser on the following objects:  Program Element Definitions  Files Related Tasks:  How do I edit and browse at the same time.  How do I find the Edit window. ═══ 8.1. Editing Program Element Definitions ═══ To edit program elements that are displayed in either the List or Graph windows: 1. Select the program element (class, function, type or variable). 2. Click Mouse Button 2 on the program element to get the program element's PopUp menu 3. Choose the Edit Definition menu item By default, this will load the VisualAge Editor with the file that contains the definition of the program element, and the editor will place you at the beginning of the program element's definition. Related Tasks:  How do I list all the members of a class.  How do I edit files from the Browser. ═══ 8.2. Editing Files from the Browser ═══ In order to edit a program file from the Browser, you must first have a file object to work with. To list or view all program files used to generate the loaded program by:  Select the Actions PullDown menu.  Choose one of Show Include File Graph or List All Files to get a window of File objects. OR  Use Mouse Button 2 on the background of the List or Graph window to access the Background PopUp menu.  Choose one of Show Include File Graph or List All Files to get a window of File objects. To edit program files from the Browser: 1. Select the program file. 2. Click Mouse Button 2 on the file to get the File PopUp menu. 3. Choose the Edit File menu item. By default, this will load the VisualAge Editor with the file. Related Tasks:  How do I find where my program elements are defined.  How do I view the include file relationship.  How do I find all programs used by my program.  How do I list files.  How do I list program elements defined within a file. ═══ 8.3. Editing and Browsing at the Same Time ═══ You do not have to leave the Browser environment in order to determine the location of your program element definitions to edit. The Browser gives you direct access to your source files and works, by default, with the VisualAge Editor to quickly locate your program definitions. Related Tasks:  How do I edit files from the Browser  How do I edit program element definitions  How do I browse without recompiling ═══ 9. Find Items in the Browser ═══ You can quickly locate the following:  Browser Windows  Program Element Definitions  Files  VisualAge C++ Program Element Documentation The Browser does not provide a special Edit window. ═══ 9.1. Finding my Browser Windows ═══ You can have a maximum of four List windows and four Graph windows open during a Browser session. In order to quickly locate your various Browser windows, use the Windows PullDown menu from either a List or Graph window. ═══ 9.2. Finding Where Program Elements are Defined ═══ You can see the source for any program element by: 1. Select the program element. 2. Click Mouse Button 2 on the program element to get the Object PopUp. 3. Choose the Edit Definition menu item to load the VisualAge Editor to the location of the program element's definition. To list files that contain the definition of a class and any members of that class: 1. Select the program element 2. Get the Object PopUp menu for that program element (click Mouse Button 2 on the program element to get the PopUp) 3. Choose the List Implementing Files menu item Related Tasks:  How do I list all the members of a class ═══ 9.3. Finding All the Files Used by your Program ═══ To list all the files used by your program: 1. Select the Actions PullDown menu OR select the List window PopUp menu (click Mouse Button 2 on the background of a List window to get the PopUp). 2. Choose the List All Files menu item A list of all the files used by your program will be listed. Related Tasks:  How do I view the include file relationship ═══ 9.4. Finding Program Element Documentation Quickly ═══ You can quickly view the VisualAge C++ documentation for client classes and their members: 1. Select the program element that you want documentation for 2. Click Mouse Button 2 on the program element to get the Object PopUp menu 3. Choose the Show Documentation menu item This will launch the VisualAge C++ documentation for that particular program element. The Show Documentation action has been designed to work with VisualAge C++ supplied documentation only. Unfortunately, it is difficult to determine if a given "object" is supplied by VisualAge C++, or by you without trying to look for it in the VisualAge C++ online documentation. If you try to show the documentation of a program element that is not part of the IBM VisualAge C++ Open Class Library, a message will appear to inform you that documentation could not be found for the program element. Related Tasks:  How do I list all the members of a class ═══ 9.5. Finding the Edit Window ═══ There is no Edit window provided by the Browser for the following reasons. Other C++ and Smalltalk browsers contain a small Edit window which is linked to other list boxes etc. in their browser. This has a number of drawbacks:  It is "yet another editor". The editor that a programmer uses is nearly an emotional choice. These small edit windows introduce Yet Another Editor which is likely to confuse, or frustrate users. The VisualAge C++ Browser uses your choice of editor, as defined in your IBM WorkFrame project, or it uses the VisualAge Editor by default.  It is a small window. The small edit window is just that: small. With small windows you spend more time scrolling and resizing than you do understanding.  Programming with C++ is not the same as Smalltalk. In Smalltalk, all of your program's classes and methods are stored in some environment-aware database, not the file system. When you program in C++, you are still using files, and the performance of opening a new file, and locating a line just because the user changed focus or scrolled up with the arrow keys is slow. Instead, the Browser provides quick access to the VisualAge Editor, by default. When you issue an Edit Definition action from a class, function, variable or type object, the Editor will load with the cursor positioned at the start of the object's definition. Related Tasks:  How do I edit and browse at the same time.  How do I edit program element definitions.  How do I edit files from the Browser. ═══ 10. Graph Program Element Relationships ═══ You can use the graph window to view:  The call chain for a function  The include file relationship of files  The inheritance relationship of classes Related Tasks:  How do I make sense out of large graphs. Related Information:  Open the User's Guide to the Graph window description. ═══ 10.1. Graphing the Call Chain for a Function ═══ You can graph the callers and callees of a function: 1. Select the function with Mouse Button 2 to get the Function PopUp menu. 2. Select one of:  Graph All Callers  Graph All Callees  Graph All Callers & Callees  Graph Immediate Callers & Callees A Graph window will be created showing the call chain. Related Tasks:  How do I make sense out of large graphs.  How do I list all the members of a class ═══ 10.2. Graphing the Include File Relationship of Files ═══ You can graph all the files used by your program: 1. Select the Actions PullDown menu. 2. Choose the Show Include File Graph menu item. You can also graph the include file relationship of individual files: 1. Select the file object with Mouse Button 2 to get the File PopUp menu. 2. Select one of the following:  Graph All Includers  Graph All Includees  Graph All Includers & Includees Related Tasks:  How do I make sense out of large graphs.  How do I list all files ═══ 10.3. Graphing the Inheritance Relationship of Classes ═══ You can graph the inheritance relationship of all the classes in your program: 1. Select the Actions PullDown menu. 2. Choose the Show Inheritance Graph menu item. You can also graph the inheritance relationship of individual classes: 1. Select a class object with Mouse Button 2 to get the Class PopUp menu. 2. Choose one of the following:  Graph All Base Classes  Graph All Derived Classes  Graph All Base & Derived Classes  Graph Immediate Derived Classes Related Tasks:  How do I make sense out of large graphs.  How do I list all the members of a class ═══ 10.4. Making Sense out of Large Graphs ═══ Large graphs can often be difficult to understand. The Browser provides a number of ways for you to focus in on your graphs:  Zoom in and out  Get an overview of the whole graph  Quickly determine what each node represents  Divide the graph into smaller sections  Change the presentation of a graph  Zone a graph ═══ 10.4.1. Zooming In and Out ═══ You can zoom in and out on your graphs quickly by using the Slider located at the left side of the Graph window. Click on the Slider and drag it downwards to magnify the focus of the currently displayed portion of the graph. Drag the Slider upwards to zoom out. You can also use the View PullDown menu or the Graph window Background PopUp menu (use Mouse Button 2 to get PopUp) to zoom in and out on the graph:  Zoom in - Increase graph by one factor  Zoom out - Decrease graph by one factor  Max Zoom in - Increase graph to maximum size  Max Zoom out - Decrease graph to minimum size One factor is approximately 10%. In addition, the Graph window PopUp menu has a Center menu item which will center the currently selected node in the graph area. To select a node either click on the node on the graph or select the node from the Graph-List portion of the Graph window. Note: If you use an Outline font for the node text, the need to zoom in as far in order to read the text of the nodes is reduced. ═══ 10.4.2. Getting an Overview of the Whole Graph ═══ You can get an overview of the entire graph by using the Overview... menu item from either the View PullDown menu or the Graph window Background PopUp menu (use Mouse Button 2 to get PopUp). The Overview window provides a representation of all the nodes on the graph. The currently displayed area of the graph is marked with a shaded box. You can move this box around in the Overview window and the changes are reflected in the Graph window. You can also make this box larger or smaller by clicking on the edges of the shaded area and dragging the mouse. ═══ 10.4.3. Determine What Each Node Represents Quickly ═══ On the right side of the Graph window is a list of all the nodes on the graph. You can either select an object from this list and see it highlighted in the Graph Area, or you can select a node in the graph and see it highlighted in the Graph List. Therefore, you do not have to zoom in on the graph in order to read the text of the nodes. This will help you to maintain the context of the graph while you are determining what each node is. Note: If you use an Outline font for the node text, the need to zoom in as far in order to read the text of the nodes is reduced. ═══ 10.4.4. Dividing the Graph into Smaller Sections ═══ Sometimes a graph can be so large that it is nearly impossible to read, even using the zooming factors, the Overview window, or the Graph List. You can divide your graph down into sections: 1. Select the Hold CheckBox on the Graph window if you want to maintain the original graph. 2. Select one of the nodes that you want to focus on. 3. Click Mouse Button 2 on this node to initiate the Object PopUp menu for that node: a. For Classes:  Graph All Base Classes - Graphs all classes linked above.  Graph All Derived Classes - Graphs all classes linked below.  Graph All Base & Derived Classes - Graphs all classes linked above and below.  Graph Immediate Derived Classes - Graphs first level of classes linked below. b. For Functions:  Graph All Callers - Graphs all functions linked above.  Graph All Callees - Graphs all functions linked below.  Graph All Callers & Callees - Graphs all functions linked above and below.  Graph Immediate Callers & Callees - Graphs first level of functions linked above and below. c. For Files:  Graph All Includers - Graphs all files linked below.  Graph All Includees - Graphs all files linked above.  Graph All Includers & Includees - Graphs all files linked above and below. Note: If you want to view more than one section at a time, use the Hold CheckBox on the new Graph windows. You can view a maximum of four Graph windows at a time. ═══ 10.4.5. Changing the Presentation of a Graph ═══ Some graphs look better displayed horizontally; for example, tall structures with narrow nodes. Other graphs look better displayed vertically; for example, wide structures. 1. Select the View PullDown menu.  Choose the Horizontal menu item to read the relationships from left to right.  Choose the Vertical menu item to read the relationships from top to bottom. You can also change the weighting of the nodes of the graph: 1. Select the View PullDown menu. 2. Select the Weighting  Cascade menu.  Choose Top to weight the nodes to the top of the graph.  Choose Center to weight the nodes to the center of the graph.  Choose Bottom to weight the nodes to the bottom of the graph. ═══ 10.4.6. Working with a Graph Zone ═══ You can select an area of the graph and zoom in on that area: 1. Click Mouse Button 1 and drag it across the area of the graph that you want to select. 2. Click Mouse Button 2 to access the Graph Zone PopUp menu. 3. Choose the Zoom in menu item to increase the currently selected area to its maximum size. ═══ 11. Keep Windows from Being Replaced ═══ By default, if you have a List window open and you perform an object-action pair that results in a list, then the existing List window contents are replaced by the new results. The same is true for Graph window and object-action pairs that result in a graph. If you wanted to keep the contents the contents from being replaced, for instance, you may want to keep the list of all classes available as you peruse various class contents, then use the Hold CheckBox:  Select the Hold CheckBox on the List or Graph window that you do not want to replace. Now any time you perform an object-action pair from that window, a new window will be created. Related Tasks:  How do I find my Browser windows  How do I return to previous queries/displays ═══ 12. List Program Elements ═══ You can use the List window to list:  Exceptions that a function may throw  All the members of a class  Friends and friendships of a class or function  Class and Function Instantiations  Files  All program elements defined in a file Related Tasks:  How do I order List window contents Related Information:  Open the User's Guide to the List window description. ═══ 12.1. Listing Exceptions that a Function May Throw ═══ To list the exceptions that a function may throw: 1. Select the function. 2. Click Mouse Button 2 on the function to get the Function PopUp menu. 3. Choose the List Possible Exceptions Thrown menu item. A list of all the possible thrown types, if any, will be displayed. Related Tasks:  How do I list all the members of a class ═══ 12.2. Listing All the Members of a Class ═══ To list all the members of a class: 1. Select the class that you want to list the members of, from either the List or Graph window (by default, the List window will list all the classes when you load a program into the Browser). 2. Select the class with Mouse Button 2. This will invoke the Class PopUp menu. 3. Select List Members with Inheritance. This will create a list of classes that you can expand to show the members of each class. Related Tasks:  How do I order List window contents  How do I keep my windows from being replaced How Do I Note: If you started this task from within another task, press ESC to return to the previous task, or press Mouse Button 2 inside this help panel and choose Previous from the Options Cascade menu. ═══ 12.3. Listing Friends/Friendships of a Class/Function ═══ A friend of a class is a function which has been granted access to the private members of the class. In addition, C++ allows you to grant friendships to a class, thereby making all of the new class' member functions friends of the first class. To list all the friends of a class: 1. Select the class with Mouse Button 2 to get the Class PopUp menu. 2. Choose the List Friends menu item. To list all the friendships of a class or function: 1. Select the class or function with Mouse Button 2 to get the Class or Function PopUp menu. 2. Choose the List Friendships menu item. ═══ 12.4. Listing Class and Function Instantiations ═══ To list the instantiations of a template class or function: 1. Select the template class or function with Mouse Button 2 to get the Class or Function PopUp menu. 2. Select the List Instantiations menu item. A list of all the class or function template instantiations will be listed in the List window. Related Tasks:  How do I list all the members of a class ═══ 12.5. Listing Files ═══ You can list or view all program files used to create the loaded program by: 1. Select the Actions PullDown menu. 2. Choose one of Show Include File Graph or List All Files to get a window of File objects. You can view include file relationships by:  Select a file object.  Click Mouse Button 2 on the file object to get the File PopUp menu.  Choose one of: - Graph All Includers & Includees - Graph All Includers - Graph All Includees ═══ 12.6. Listing Program Elements Defined in a File ═══ You can list all the program elements defined within a source file: 1. Select a file object. 2. Click Mouse Button 2 on the file object to get the File PopUp menu. 3. Choose the List Defined Objects menu item. A List window with all the program elements defined in the file appears. Related Tasks:  How do I list files ═══ 13. Load, Merge, Print and Save Within the Browser ═══ You can load and merge files, and print and save List and Graph window contents.  Loading Files  Merging Files  Printing Graphs and Lists  Saving Graphs and Lists ═══ 13.1. Loading Files ═══ To load a file into the Browser: 1. Select the File PullDown menu. 2. Choose the Load... menu item. The Load dialog appears.  Enter a file name (extensions .DLL, .EXE, or .LIB) or a Browser database file (extensions are .PDB, .PDD, .PDL, .PDE) into the Open filename TextField, or  Use the ListBoxes to locate the file that you want to load. Note: The format of the new .PDB files are incompatible with the .BRS files generated by the previous release of the Browser, and the AIX format of the .PDB files. You can probably erase these old files, unless want to use them with the old Browsers. The good news is that the new .PDB files are between 60-95% smaller than the .BRS files for the same input files. On a large application, you will save many Megabytes of hard disk space by recompiling and generating the new .PDB files. Related Tasks:  How do I create Browser database files..  How do I use .PDB, .PDD, .PDE, and .PDL files. ═══ 13.2. Merging Files ═══ When you browse a target program (an .EXE, .DLL, or .LIB), you will only see those classes, functions, and files that were actually used in the program. You will not see related objects. For example, assume that you have written a small program using the IBM User Interface classes, and it contains an IFrameWindow, a Menu bar, and some static text. The small program will only reference the classes, functions, and files of the IFrameWindow, IMenuBar, and IStaticText with their parent classes. If you want to add some PushButtons and a bitmap onto your window, you can see these classes by merging the User Interface classes data with your small program. Also, many programs are written as an .EXE and one or more .DLLs. If you browse the .EXE, then you only see the data from that .EXE. You can merge in the data from the .DLL(s) and see the whole program's information. To perform a merge: 1. Select the File PullDown menu. 2. Choose the Merge  Cascade menu to load an IBM VisualAge C++ Open Class Library or the Merge... menu item to merge other files. 3. In the Merge dialog, use the listboxes to search for the files you want to merge. ═══ 13.3. Printing Graphs and Lists ═══ ═══ Printing Graphs and Lists ═══ ═══ Printing graphs and lists ═══ You can print either graphs or lists. ═══ Printing Graphs ═══ There are several ways to print a graph. For each case below, a Browser Print - dialog, where print option is either List for List window printing or one of the Print  Cascade menu items for Graph window printing, will appear so that you can change some of the options before printing. You can also change the printer settings. For a graph, you can:  Print the client area (the currently displayed portion of the graph). 1. Select the Print  Cascade menu from the File PullDown on the Graph window. 2. Choose the Client... menu item. The graph is printed on one page.  Print a selected zone. 1. Select a zone by holding Mouse Button 1 and dragging the mouse to select a rectangular zone. 2. Select the Print  Cascade menu from the File PullDown on the Graph window. 3. Choose the Zone... menu item. Note that you could have also chosen Print... from the Zone PopUp menu. The graph is printed on one page.  Print the whole graph on a single page. 1. Select the Print  Cascade menu from the File PullDown on the Graph window. 2. Choose the One Page... menu item.  Print the whole graph on multiple pages. 1. Select the Print  Cascade menu from the File PullDown on the Graph window. 2. Choose the Multiple Pages... menu item. The graph will be set to its maximum zoom. A grid is drawn on the graph to show how the pages are divided. The grid will be cleared and the graph will be restored to its previous zoom once the printing is done. 3. The Print - Multiple Pages dialog has default numbers set for the number of horizontal and vertical pages based on the printer resolution, paper source, page margins, and zooming level (ie. maximum zoom). If you change any of these, these numbers may change. You can change these to values that suit your needs. ═══ Printing Lists ═══ You can print the entire contents of the List window. 1. Select the File PullDown menu. 2. Choose the Print... menu item. The Print - List dialog will appear so that you can change some of the options before printing. The fonts used to print the list may be different from the font used in the List window. You can change this font in the printer settings. Related Tasks:  How do I customize printer settings. ═══ 13.4. Saving Graphs and Lists ═══ Use the Save List As... action from the File PullDown menu on the List window to save the contents of the window to an ASCII file. Use the Save List As... action from the File PullDown menu on the Graph window to save the contents of the List Area to an ASCII file. Use the Save Graph As... action from the File PullDown menu on the Graph window to save the contents of the graph to an OS/2 bitmap file. Use the Save Graph As... action from the Graph Zone PopUp menu if you have selected a region of the graph and want to save it. You can adjust the size of the bitmap saved using the Graph Window Settings Bitmap page: 1. Select the Options PullDown menu. 2. Choose the Graph Window... menu item to load the Graph Window Settings NoteBook. 3. Select the Bitmap page. 4. Enter the width and height. 5. Select OK to accept the change or Cancel to exit without making changes. ═══ 14. Order List Window Contents ═══ If you have a container view that resulted from the List Members with Inheritance action, then you can rearrange the program elements in three different ways:  By Class,  By Access, or  By Type. Related Tasks:  How do I list all the members of a class Related Information:  Open the User's Guide to the List window description ═══ 14.1. By Class ═══ This is the default setting for a List window. To get the default class view: 1. Select the Order PullDown menu from the List window 2. Choose the Class menu item This will create a list of elements as follows: Class 1 Public Constructors/Destructors Functions Types Variables Protected Private Class 2 ═══ 14.2. By Access ═══ To group together all the public, all the private, and all the protected elements: 1. Select the Order PullDown menu from the List window 2. Choose the Access menu item This will create a list of elements as follows: Public Constructors/Destructors Functions Class 1 Class 2 Types Variables Protected Private ═══ 14.3. By Type ═══ By default, the List window displays a container view with the classes at the highest level. If you are interested in seeing particular program elements (like functions) from various classes, it can become quite annoying to have to scroll back and forth in the list between classes. You can reorder the list items so that all the functions are listed together by: 1. Select the Order PullDown menu from the List window 2. Choose the Type menu item This will create a list of elements as follows: Constructors/Destructors Functions Public Protected Class 1 Class 2 Private Types Variables ═══ 15. Redo an Action if the Object is Not Displayed ═══ Sometimes you will perform object-action pairs and then later during your Browser session, you will want to perform them again because the original window was replaced. However, you no longer have access to the object from which you launched the action. The Browser gives you a quick way to redo your object-action pairs: 1. Select the Windows PullDown menu 2. Choose the History... menu item This will invoke the History window which displays your last 40 object-action pairs. Double-click on any pair to redo it. Or select the pair and choose OK to redo the command and remove the History window or Apply to redo the command and keep the History window open. If you had just performed the object-action pair prior to the current display results, you can:  Select Previous from the Actions PullDown menu, or  Select the F6 key. This will perform the previous object-action pair issued in the window. ═══ 16. Return to Previous Queries/Displays ═══ If you have already performed a query or had a display that you wanted to see again, then you can use the History window to invoke the query again. 1. Select the Windows PullDown menu 2. Choose the History... menu item This will invoke the History window which displays your last 40 object-action pairs. Double-click on any pair to invoke it. Or select the pair and choose OK to redo the command and remove the History dialog or Apply to redo the command and keep the History window open. If you had just performed the object-action pair prior to the current display results, you can:  Select Previous from the Actions PullDown menu, or  Select the F6 key. This will perform the previous object-action pair issued in the window. ═══ 17. Use the Browser to Assist in Porting Code ═══ There are three things you have to do when porting code from one operating system to another:  Decide whether or not it is worth the effort to port.  Understand the structure and detail of the code you are porting.  Port the code. The QuickBrowse feature can assist you in the first two. If you have code written for an operating system other than OS/2, the amount of effort to make that code acceptable to QuickBrowse will be less than the effort to make it compilable. This effort will provide you with an idea of how hard it may be to get the code compiling and working, and will result in your being able to use the Browser to examine the candidate code. Using the results of the QuickBrowse, you can discover the structure of the code, which will assist you in making the decisions to port or not. If you decide to port the code, use the QuickBrowsed information to assist you in making changes to the code. Related Tasks:  How do I browse without compiling. ═══ 18. Use the Browser to Aid Program Understanding ═══ When you get new code, use QuickBrowse to understand the type structure of the code while ignoring the functional details. Then, when you want to look at the function call relationships, compile the code. In well-designed and well-built code, the key abstractions will be found in the type structure. Dealing with just the types also reduces the amount of information you have to comprehend at the beginning. Related Tasks:  How do I browse without compiling. ═══ 19. Use .PDB, .PDD, .PDE and .PDL Files ═══ The .PDB files are output by the C++ compiler. The compiler creates one .PDB file for every .OBJ file. When you browse a target file (.EXE, .DLL, or .LIB) the individual .PDBs (for the .OBJs that are contained in the target) are loaded into memory by the Browser. A copy of this data is quickly saved when you stop browsing the target file, and is quickly loaded when you browse the target file again. The extension of the saved file is based upon the extension of the target file:  .EXE data is saved in a .PDE file,  .DLL data is saved in a .PDD, and  .LIB data is saved in a .PDL. Also, if you manually load one or more .PDB files, or perform a merge operation, this is analogous to grouping a set of .OBJ files together into a single .LIB file, so the saved file version in this case is a .PDL file. .PDD, .PDE, and .PDL files are referred to as Browser database files. Note that loading a large .PDB file takes longer than loading the corresponding .PDD, .PDD, or .PDL file that is created when you close the Browser after having browsed a .PDB, .DLL, .EXE, or .LIB file. This is because the Browser is designed to optimally load .DLL, .EXE, and .LIB files. Related Tasks:  How do I create Browser database files. ═══ Container View ═══ A container view is a list which can be further expanded using the and icons to expand and collapse the various members of a class. You can get this type of view by performing the following actions: List Members with Inheritance (class and function) List Friends (class) List Defined Objects (file) List Immediate Callers & Callees (function) ═══ Browser Objects ═══ The Browser presents program elements to you in the form of objects on the screen. Objects can be classes, types, functions, variables, and source files. You can click Mouse Button 2 on any of these objects to invoke a PopUp menu of actions available for that object. Open the Browser section in the User's Guide ═══ Object-Action Pair ═══ You can perform actions on any Browser object from the object's PopUp menu. Use Mouse Button 2 over the object to invoke the PopUp menus. The Browser remembers the last 40 unique object-action pairs and lists them in the History dialog for quick access. The List and Graph window each have an Action Status Bar which is located directly below the menubar. It indicates what object and action were used to create the current contents of the window. ═══ Browser Database ═══ A Browser database is the in-memory representation of all the facts about the .EXE, .DLL, or .LIB, or collection of .PDBs, or the results of a merge operation. When you perform a new load, or when you exit the Browser, the contents of this in-memory representation is stored into a Browser database file. The next time you browse this program, the saved database file is quickly loaded into memory. For example, if you loaded a program called PROG.EXE into the Browser, the saved database file would be PROG.PDE. If you loaded a DLL called PROG.DLL into the Browser, the saved database file would be PROG.PDD. If you loaded a library file called PROG.LIB into the Browser, the saved database file would be PROG.PDL. If you did a merge, or loaded individual .PDB files, then the Browser would not know what to call the file that is to be saved. In this case, the program that is being browsed is conceptually a pseudo-library, so it will save the memory representation of this pseudo-LIB as a .PDL. ═══ Program Element Definition ═══ The Browser differentiates between declarations and definitions of objects. The Edit Definition action will edit the file where the object is defined. This causes some confusion regarding functions. A function is defined where it is implemented. If you do not have the body of function in any of the files that make up the program you are browsing (for example, it may be a function from a library), then the Browser cannot edit the function. Editing the file containing the declaration for a function whose full prototype is displayed in the Browser would not give any more useful information. Your build process will help you find all problems with mismatched function prototypes. Also, a function's declaration can appear in multiple files, and may be (subtly) different in each location. For example: int foo(int, int, char*, int); int foo(int a, int b, char *c, int); int foo(int b, int c, char *, int a); int foo(int x, int, char *p, int y=0); int foo(int z, int tt, char *p=NULL, int u=0); int foo(int q, int tt=88, char* pppp=NULL, int p=0); The above declarations could all exist in the same file or across multiple source files. Parameter names are ignored (other than they must not be keywords), and default parameter values are only used in function calls, up to the next declaration which can add more default values. The first three declarations are the same, and the last three are subtly different. ═══ QuickBrowse ═══ The QuickBrowse feature allows you to quickly obtain and browse type information for code for which there is no compiler generated (/Fb) Browser information. Use QuickBrowse for the following reasons:  It is faster than compiling the code  You may be able to browse files that do not compile Note: The QuickBrowse feature is only available when the Browser is started from an IBM WorkFrame project. QuickBrowse parses the top level declarations which must be valid C++ statements, and ignores the bodies of function definitions. You may want to use QuickBrowse if you are not interested about function call information. Also, if you have code where the type information is well defined, but function bodies will not compile, you can browse the type information with QuickBrowse. If you are browsing in a project, and the Browser detects that some, or all, information is missing, a dialog will appear telling you that this information is missing, and will give you the option or QuickBrowing the files for which data is missing. Messages will appear in the Project's monitor, just as if you were doing a build. Note that the QuickBrowse feature is not a complete replacement to the Generate Browser information (/Fb) compiler option. The speed of QuickBrowse does come at a cost in the richness of information provided. Since the QuickBrowse feature does not look inside of function bodies, function call and exception information are not available. If you need to know this kind of information, then you will need to compile the file and use the Generate Browser information (/Fb) option.