The C++ Browser lets you customize your display and the way you work with reference pages (man pages). These formats are implemented as X application resources that you can redefine in your local .Xdefaults file. After editing it, run xrdb .Xdefaults and then reopen the Static Analyzer.
This appendix covers these topics:
This section shows you how to customize the outline formats of Browser View lists by applying your own keyword headers and rearranging the features of each list.
The layout of the Browser View member list is controlled by this resource:
Cvstatic*memberOrder |
The general format of this resource is as follows:
Level-1-keyword: HEADING [keyword], HEADING [keyword],..; Level-2-keyword: HEADING [keyword], HEADING [keyword],...; Level-3-keyword: HEADING [keyword], HEADING [keyword],...; |
The three level keywords are Protection, Scope, and Member. The order in which these are used determines the level of nesting in the outline list used for protection, scope, and member headings, respectively.
Headings may consist of any string you choose to describe the heading category. The headings listed with the level-1 keyword become top-level headings in the outline list, the level-2 headings appear indented under each of the level-1 headings, and the level-3 headings appear indented beneath each of the level-2 headings.
Each heading in a level has an associated keyword that determines the sort of items that appear under the heading. The allowable keywords are as follows for each associated level keyword:
Protection: | [public], [protected], [private] | |
Scope: | [instance], [static] | |
Member: | [type], [data], [method], [virtualmethod] |
It is also possible to combine the types associated with two or more keywords under one heading by using the construction for any given heading:
HEADING [keyword1+keyword2+...] |
You can also control whether a heading is expanded or collapsed when the browser starts up. Placing an asterisk (*) at the end of the heading string causes that heading to be collapsed by default:
HEADING* [keyword] |
The default assignment for the outline resource of the member list can be found in /usr/lib/X11/app-defaults/Cvstatic. The contents of the file appear below:
Cvstatic*memberOrder: Protection: PUBLIC [public], PROTECTED* [protected], PRIVATE* [private]; Scope: INSTANCE [instance], STATIC [static]; Member: TYPE* [type], DATA [data], METHODS [method], VIRTUAL_METHODS [virtualmethod]; |
Note: The sample above is a single line. |
You can override this definition by placing your own definition in your local .Xdefaults file. For example, to make the display look like the sample in Figure A-1, add this line:
Cvstatic*memberOrder: Member: IS (Type) [type], Data Members--------------------- [data], Methods----------------------------- [method], Virtual Methods-------------------- [virtualmethod]; Scope: Non-Static [instance], Static [static]; Protection: Private [private], Protected [protected], Public [public]; |
The layout of the Browser View related class list is controlled by this resource:
Cvstatic*relationOrder |
The construction of this resource is similar to the member list, but simpler:
HEADING [keyword], HEADING [keyword],... |
The headings and keywords work as described for the member list, but there is no concept of level keywords in the related class list.
The allowable keywords for the related class list are as follows:
[base], [derived], [uses], [usedby], [friendfunction], [friend], [friendof]
Note: In the related class list, headings cannot contain multiple keywords, as they can in the member list. |
As in the member list, you can control whether a heading in the related class list is expanded or collapsed when the browser starts up. Placing an asterisk (*) at the end of the heading string causes that heading to be collapsed by default:
HEADING* [keyword] |
The default assignment for the related class list outline resource can be found in /usr/lib/X11/app-defaults/Cvstatic, and is listed below for your convenience:
Cvstatic*relationOrder: BASE CLASSES [base], DERIVED CLASSES [derived], USES [uses], USED BY [usedby], FRIEND FUNCTIONS [friendfunction], FRIENDS [friend], FRIEND OF [friendof] |
You can override this definition by placing your own definition in your local .Xdefaults file. For example, for the display shown in Figure A-1, try this:
Cvstatic*relationOrder: Parent Classes [base], Child Classes [derived], Used Classes [uses], User Classes [usedby], Friend Functions [friendfunction], Friend Classes [friend], Friend Of [friendof] |
XWindows resources listed in this section, found in /usr/lib/X11/app-defaults/Cvstatic, can be modified in your local .Xdefaults file. The default values are listed with each resource. You can set any true value to false.
Cvstatic*completeClassName: true |
| ||
Cvstatic*showMessageArea: true |
| ||
Cvstatic*scream: true |
| ||
Cvstatic*indentationWidth: 15 |
| ||
Cvstatic*nameAlign: true |
| ||
Cvstatic*arglistAlign: true |
| ||
Cvstatic*sort: true |
| ||
Cvstatic*nameSort: true |
|
Using both of the previous resources in conjunction sorts first by type and then by name, as shown in Table A-1.
Table A-1. Sort Resources for Outline Lists
sort | name | Sort effect |
---|---|---|
false | false | Members are in declaration order |
false | true | Members are sorted based on the name and not on type or return type. This behavior is shown in Figure A-1. |
true | false | Members are sorted based on the their return type or type. Within the same return type, members appear in declaration order. |
true | true | Members are sorted both on their type or return type and their name. This is the default behavior. |
Figure A-1 shows the Browser View display using the sample resources set in .Xdefaults.
The resources in this section are associated with the Man Pages for Classes window, available from the Browser View Admin menu item "Generate Man Pages."
Cvstatic*manPageDirPath: <default manpage directory path> |
| ||
Cvstatic*manPageSuffix: .<suffix> |
| ||
Cvstatic*manPageViewCommand: <commands> |
| ||
Cvstatic*manPageCopyRightMessage: <string> |
|