Appendix A. Customizing the Browser

The Browser lets you customize your display and the way you work with man pages. These formats are implemented as X application resources that you can redefine in your local .Xdefaults file. After editing it, run the following command:

xrdb .Xdefaults

Then reopen the Static Analyzer.

This appendix covers the following topics:

Customizing the Browser View Lists

The following sections show you how to customize the formats of Browser View lists by applying your own keyword headers and rearranging the features of each list.

Member List Resource

The layout of the Browser View member list is controlled by the Cvstatic*memberOrder resource.

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 keywords are Protection, Scope, and Member. The order in which these keywords 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.

Related Class List Resource

The layout of the Browser View related class list is controlled by the Cvstatic*relationOrder resource.

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.

Other Browser View List Resources

X Windows System resources, 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
 

Enables ClassName completion. By typing a space in the current class field, you complete a class name from the list of classes in the fileset (if set to true, as it is by default).

Cvstatic*showMessageArea: true
 

Enables the message area in the Browser View window (if set to true, as it is by default).

Cvstatic*scream: true
 

Enables warning beeps when there are 0 results for a query, or when a class name has more than one completion in the current class field (if set to true, as it is by default).

Cvstatic*indentationWidth: 15
 

Sets the indentation in the outline lists in pixels. Default setting is 15.

Cvstatic*nameAlign: true
 

Aligns names of the members under the same parent so that the type declarations and member (variable and function) names form left-justified columns (if set to true, as it is by default).

Cvstatic*arglistAlign: true
 

Aligns the argument lists of member functions under the same parent so they form a left-justified column (if set to true, as it is by default).

Cvstatic*sort: true
 

Sorts items in the outline lists based on the value of the entire string denoting an item (if set to true, as it is by default). For example, given two members, void f and int k, the Browser lists int k before void f in the list.

Cvstatic*nameSort: true
 

Sorts items in the outline lists based on the string value of the name of a member (if set to true, as it is by default). For example, void f would be listed before int k).

If you use the last two resources in conjunction, output is sorted 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.

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.


Customizing Man Page Generation

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:manpage directory path
 

The default directory is the current directory (.). To place generated man pages in the windTunnel directory that you have created use the following command:

Cvstatic*manPageDirPath: ./manpage/windTunnel

Cvstatic*manPageSuffix: .suffix
 

The default suffix is 3, which would make the name of a man page:

class_name.3

To change the suffix to 4, use the following command:
Cvstatic*manPageSuffix: .4

Cvstatic*manPageViewCommand: commands
 

Clicking the View button in the Man Pages for Classes window executes the command specified by this resource. The argument given is the set of man pages for the classes that are selected. By default, View displays the most recently generated man page in a read-only window. The default commands are:

Cvstatic*manPageViewCommand: winterm -H -c man -d

Cvstatic*manPageCopyRightMessage: string
 

Lists standard copyright information. You can customize the message.