This section describes some of the basic ways in which you can use the Class Browser by giving some examples. If you wish, you can skip this section and look at the descriptions of each individual view: these start with 7.2 Examining slot information.
When examining a class, the slot names of the class are displayed by default.
To examine a class, follow the instructions below:
(capi:contain (make-instance 'capi:push-button-panel :title "Test Buttons" :items '(:one :two :three)))
The push button panel appears on your screen.
This invokes the Class Browser on the button panel. The class capi:push-button-panel is described in the Class Browser.
Examining classes in the Class Browser
Notice that, although you invoked the browser on an object that is an instance of a class, the class itself is described in the Class Browser. Similarly, if you had pasted the object into an Inspector, the instance of that object would be inspected. Using the environment, it is very easy to pass Common Lisp objects between different tools in this intelligent fashion. This behavior is achieved using the LispWorks IDE clipboard; see 3.3.3 Using the Object operations with the clipboard for details.
See 3.8 Performing operations on selected objects for a full description of the standard action commands available.
A list of the slots in the current class is printed in the Slots area. By selecting any slot, you can examine it in more detail in the Description area.
While still examining the capi:push-button-panel class, select any slot in the Slots area.
Description of a slot
A description of the slot is given in the Description area. For details about the information contained in this description, see 7.2.4 Description list.
By default, inherited slots (those slots which are defined in a superclass of the current class, rather than the current class itself) are listed in the Slots area along with the slots defined in the current class.
No slots are displayed in the Slots area. This is because all the slots available to the capi:push-button-panel class are inherited from its superclasses. No slots are defined explicitly on the capi:push-button-panel class.
Notice that the slot description for each slot tells you which superclass the slot is defined on.
The Filter box can be used to filter out information about slots you are not interested in. This is especially useful if you are examining classes which contain a large number of slots.
The example below shows you how to create an instance of a CAPI object, and then limit the display in the Class Browser so that the only slots displayed are those you are interested in:
(capi:contain (make-instance 'capi:list-panel :items '("Apple" "Orange" "Pear")))
This creates a list panel object and displays it on your screen. The list panel object is the current value in the Listener.
Suppose you are only interested in seeing the callbacks that can be defined in a list panel.
callback
in the Filter box.Using filters to limit the display in the Class Browser
You can immediately see the types of callback that are available to CAPI list panel objects. See the CAPI User Guide and Reference Manual for details about these callbacks.
For more information about using filters, see 3.12 Filtering information.
There are two ways that you can examine other classes. The first is to type the name of the class you wish to see into the Class text box at the top of the browser. For long class names, you might find it useful to type just a few characters and then press Up
or Down
to invoke in-place completion. Press Return
or click and the named class is described.
The class capi:push-button-panel is described.
Because some class names may be potentially quite long, you can use completion to reduce typing. This allows you to select from a list of all class names which begin with the partial input you have entered. See 3.14 Completion for detailed instructions. When you have entered the complete class name, click on to make this the class being described.
The second way to examine other classes is by using the Superclasses and Subclasses lists available in the hierarchy view. Click on the Hierarchy tab to display the hierarchy view.
The main part of the hierarchy view consists of two lists:
Double-click on any superclass or subclass of the current class to examine it.
CAPI:BUTTON-PANEL
in the Superclasses list.
The capi:button-panel class is described.
CAPI:PUSH-BUTTON-PANEL
in the Subclasses list.
The capi:push-button-panel class is described again.
So, using the Hierarchy tab, you can easily look through the related classes in a system.
As with many of the other tools in the LispWorks IDE, you can sort the items in any of the lists or graphs of the Class Browser using the Preferences dialog. Raise this dialog as described in 3.2 Setting preferences, and then select Class Browser in the list on the left side.
Setting Class Browser preferences
Under the General tab, there are three options for sorting items, listed in the Sort panel.
Unsorted |
Displays items in the order they are defined in. |
By Name |
Sorts items alphabetically by name. This is the default setting. |
By Package |
Sorts items alphabetically by package name. |
For more information on sorting items, see 3.9.1 Sorting items in views.
LispWorks IDE User Guide (Unix version) - 01 Dec 2021 19:37:06