C++ Class Explorer Window
Go Up to View Menu
View > C++ Class Explorer
Contents
Allows you to:
- Examine the class structure of your project
- Examine the declaration in the source for a selected element
- Create new fields, methods, and properties in managed units in your project
Three Panes in the C++ Class Explorer
The C++ Class Explorer window is separated into three panes (you can see a screenshot showing the Graph pane in C++ Class Explorer Overview):
Pane | Location | Description |
---|---|---|
Type List |
Left-hand pane in the C++ Class Explorer window |
Shows a tree structure of types, classes, interfaces, and namespaces declared directly in your project. Look further in this help topic for Type List Tree Structure and Type List Context Menu. |
Member View |
Top right-hand pane |
Displays the members (fields, properties, and methods) of the type or types currently selected in the Type List. In the Member View, the icons for class members can have additional "decorators," as follows: |
Source/References/Graph Window |
Lower right-hand pane |
The three tabs display different information, as follows:
|
Type List Tree Structure
The Type List dislays all the types, classes, interfaces, and namespaces declared in units directly used in your project. By default, the nodes (units, classes, interfaces, types) in the tree are displayed in alphabetical order.
To expand or collapse nodes in the Type List, click the tree nodes:
- indicates a collapsed node. (Clicking opens the node.)
- indicates an expanded node. (Clicking closes the node.)
If no icon is displayed before a node, the node is a terminal node (that is, it does not have subnodes that can be expanded or collapsed).
Clicking a node (or moving from node to node using the arrow keys) loads the corresponding source file into the read-only Source Window and focuses the window on the declaration of the selected item.
Icons Used in the Type List and Member View
The following icons are used in both the Type List and Member View:
Icon | Description | Icon | Description |
---|---|---|---|
Collapsed node |
Expanded node | ||
Source file |
Namespace | ||
Class |
Interface1 | ||
Method or Operation2 |
Field or Variable3 | ||
Property |
Event | ||
Typedef4 |
Union | ||
Enumeration4 |
Member of enumeration | ||
Structure |
Group (default group or custom group) | ||
Private class member |
Protected class member |
Notes: 1 By default, an interface is defined as a class/struct that contains no data and only pure virtual methods. You can modify the definition of an interface for viewing purposes by setting options on the Tools > Options > C++ Options > Class Explorer
dialog box. (The option "Interfaces must derive from IUnknown" determines whether ActiveX/COM types are displayed as interfaces, and you can disable "Show pure abstract classes as Interfaces.") 2 The same icon is used for method, operation, procedure, or function. You can add methods (using the button) only to a managed unit. 3 You can add fields (using the button) only to a managed unit. 4 You can control the display of typedefs and enumerations using the and buttons and the Properties dialog box.
Type List Search Field
At the top of the Type List is an incremental search field, indicated by a magnifying glass icon .
As you enter a string in the search field, the Type List adjusts to display only elements that contain that string. The search matches the names of any contained elements (such as members of a class), even if the class name itself does not contain the string. But the search field has a dropdown menu that enables you to control some crucial aspects of the search. Click the search icon to display the following menu:
Item | Description |
---|---|
All |
Matches any element that contains the search string, even if the string occurs in a parameter or an ancestor. Default is On. |
Name Only |
Matches only types whose names contain the search string. Default is Off. |
Case insensitive |
Requires that elements must match the search string in case. Default is On (case insensitive). |
Toolbar Icons
The following icons appear on the toolbar buttons of the Class Explorer:
Icon | Description |
---|---|
Sort by types, either forward or reverse. sorts the various types in the following order:
The reverse button sorts individual types in the reverse order. In either case, the Type List displays the types in alphabetical order (the default view). | |
Sort alphabetically by name, forward (A-Z). The reverse button sorts backward (Z-A). | |
Do not group types. Types are shown in a flat display, as root nodes, instead of being associated with parent nodes (namespace, file, or Custom File Group nodes). | |
Group types by inheritance hierarchy. Types are shown under their base type nodes; or flat, if there's no base type. | |
Group types by their namespaces. Each node is represented by a namespace icon , and the types in the namespace are listed under that icon. | |
Group types by their files. Displays a file icon () for each file (.cpp, .h, or .hpp file), and lists the elements defined in each file. | |
Group types using custom file groups. Uses the default display groups, as well as any custom groups that you have created. | |
Refresh list of types. Parse modified source files and update type list. | |
Cancel active browser compilations. | |
Clear all browser information | |
Add a new method to this class. Opens the Add Method (C++) dialog box. Enabled only for managed units. | |
Add a new field to this class. Opens the Add Field (C++) dialog box. Enabled only for managed units. | |
Add a new property to this class. Opens the Add Property (C++) dialog box. Enabled only for managed units. | |
Configure custom file groups. Opens the Explorer File Groups dialog box, enabling you to:
| |
Show top-level typedefs in the type list. Default is Off. | |
Show top-level enumerations in the type list. Default is On (shown). | |
Show top-level functions in the type list. Default is Off. | |
Show top-level (global) variables in the type list. Default is Off. | |
Include inherited members. By default, the Member View includes inherited class members by displaying the members of the ancestor type below the members of the selected type. For example, TForm3 is followed by its ancestor type, TForm. When this button is not pressed, only locally defined members are displayed. Default is On. | |
Go to the declaration of the selected node. Opens the source in the Code Editor, and highlights the declaration of the selected item. | |
Go to the definition of this declaration. Opens the source in the Code Editor, and highlights the definition of the selected item. The C++ compiler maintains information such as when each symbol is first defined and when it is subsequently used. This information is used to perform the Go to definition command. |
Type List Context Menu
Right-clicking an element in the Type List displays the following context menu commands.
Note: The context menu commands are enabled only for elements that are declared in a managed unit; that is, the .CPP and .H file must belong to the project that you are exploring with the C++ Class Explorer. For example, you cannot add fields, methods, or properties to VCL or FireMonkey elements using the C++ Class Explorer.
Name | Description |
---|---|
Go to Declaration |
Opens the Code Editor window and focuses on the declaration of the selected element. Enabled only when an element is selected that is declared in a managed unit. |
Go to Definition |
Opens the Code Editor window and focuses on the definition of the selected element. Enabled only when an element is selected that is defined in a managed unit. |
Collapse All |
Closes all the nodes, folders, or groups that are open in the Type List. |
Group |
Specifies the grouping to be used in the Class Explorer. Select from the following:
|
Show |
Specifies that certain elements are displayed in or omitted from the top level of the Class Explorer view. Select either:
Including either or both of these elements in the view or eliminating them from the view can enable you to see more detail about the specific elements you want to view.
|
Sort |
Specifies the sorting to be used in the Class Explorer. You can sort all elements alphabetically or sort according to types. Select either:
|
Add Field |
Opens the Add Field dialog box, which enables you to add a new field to the selected element. Enabled only when an element is selected that is declared in a managed unit, and you have write access to the source. |
Add Method |
Opens the Add Method dialog box, which enables you to add a new method to the selected element. Enabled only when an element is selected that is declared in a managed unit, and you have write access to the source. |
Add Property |
Opens the Add Property dialog box, which enables you to add a new property to the selected element. Enabled only when an element is selected that is declared in a managed unit, and you have write access to the source. |
Properties |
Opens the Properties dialog box (the same dialog as the Tools > Options > Environment Options > C++ Options > Class Explorer dialog box). You can set three types of options:
|
See Also
- C++ Class Explorer Overview
- Class Explorer (C++) options dialog
- C++ Class Explorer Topics
- Add Field (C++)
- Add Property (C++)
- Add Method (C++)
- Locating Declarations of Classes, Interfaces, Types, and Class/Interface Members with the C++ Class Explorer
- Locating Definitions of Classes, Interfaces, Types, and Class/Interface Members with the C++ Class Explorer
- Saving View Settings on the C++ Class Explorer