Inspect

The Inspector window displays information about objects. The same
information is displayed (when not in the IDE) using the function
inspect and the various
inspector top-level commands documented in the inspector.htm.

The illustration shows an Inspector window inspecting a form.
We describe the various fields and controls on the Inspector,
and the right button menu.

The Properties and Internals buttons

The buttons at the top (in the illustration, Properties and
Internals, other objects may have more or different buttons),
indicate what pane of the window is visible. In the illustration, the
Properties pane is visible and the button looks pressed. Properties
are usually changeable aspects of the object while Internals should
not normally be modified. Controls have an Events button listing the
event functions called when certain mouse events occur over the
control.

The pane has names (of properties or event handlers of whatever pane
is displayed) listed on the left and the value on the right. You can
modify the value by selecting it and typing a new value or clicking on
the extended editor button which will display a dialog suitable for
the value required (such as a color choice dialog for a color, and
the Menu Editor
dialog for the menu property, illustrated).

Clicking over the name causes the value to be inspected.

The drop-down list

The drop-down list at the top shows a history of the objects that have
already been inspected by this inspector. The objects are arranged
into a hierarchy, where objects that were inspected by clicking in the
left column of the inspector are indented just below the objects from
which they were inspected; otherwise more recently inspected objects
appear toward the top of the list. Clicking an item in this list
re-inspects it.

A pixmap appears at the left of each item in the drop-down history
list to make it easier to find objects of various types. By default,
widgets are identified with the pixmaps that are used for them in the
Component Toolbar, windows display a picture of an empty window, all
other first-class objects (instances of standard-object or
structure-object) display a solid gray dot, and all remaining
objects show a hollow dot. These pixmaps (except for the dots) also
appear in the always-visible part of the history widget for the
currently inspected object, and appear in the rows of the inspector
body when it is inspecting a sequence.

The inspector may be customized to show additional pixmaps for other
types of objects by defining pixmap methods.

The button with the left-pointing arrow

The button with a left-pointing arrow at the upper left of the
inspector re-inspects the previously-inspected object. Clicking this
button multiple times will re-inspect successively older objects
from the inspector history. Or use your mouse's
back button if it has one.

The status bar at the bottom

The status bars at the bottom show the type of value accepted (on the
left) and information on the value on the right.

The right button menu over the inspector

Right-clicking in the inspector shows a pop-up menu of additional
inspector commands. A child menu of this menu shows further inspector
commands that are more easily accomplished in other ways but are shown
as a reminder of their keyboard shortcuts. Here are the
inspector-specific commands on the main pop-up menu:

Inspect in New Window: Inspects the currently selected object,
but first opening a new inspector window in which to inspect it. This
allows retaining the current state of the earlier inspector.

Refresh Values: Updates the currently displayed information to
reflect any changes that have occurred in the lisp environment since
the most recent inspection was done. This essentially re-inspects the
current object. Information is also updated when re-inspecting an
object from the inspector history, or for an individual attribute if
it is not read-only and is selected for typing in a new value.

Back in History: Re-inspects the previously inspected object,
just as the arrow button at the upper left or your mouse's back
button does.

Forward in History: Re-inspects later objects just after earlier
objects have been re-inspected. Or use your
mouse's forward button if it has one.

Clear History: Empties the inspector history of all objects
that have been inspected so far.

Inspecting Long Sequences

When you inspect a long list or vector, the inspector will initially
display only the first fifty elements, for efficiency reasons. To
display the next set of fifty elements, you simply need to scroll to
the bottom of the ones that are displayed so far. You can do that
either with the keyboard (using the PageDown key or the down
arrow key) or with the mouse (by dragging the scrollbar or pressing
its lower arrow button). GTK note: You may need to use the
keyboard technique if the scrollbar method does not work.

More on the Properties and Events tabs

The Properties and Events tabs also provide brief documentation on how
to access an object programmatically (assuming that properties are
defined for the object). The function for reading the value of a
property almost always has the same name as the property.

Thus if you notice in the inspector that an object has a property
called border,
this means that you can read the current value of that property with a
form such as

(border my-object)

Likewise, the writer function is almost always the setf of the
property name, and the initarg for specifying the property value when
creating the object is almost always the corresponding keyword. So

(setf (border my-object) :frame)

would set the border property, and an initarg/value pair such as

:border :frame

would initialize the border when creating the object.

Other comments

A property value is displayed in a bold font if it is not equivalent
to the programmatic default value for that property. This highlights
values that you have changed, as well as some sample values that are
given to widgets that you place onto forms (and which you typically
will want to change). A read-only value will never be bold. A
handful of properties are never shown bold because they generally do
not have meaningful default values and are more distracting than
useful when made bold; these exceptions include the properties child-p, class, tab-position, left, top, width, height, dialog-items, and pixmap-use-handle.

Brief help information is supplied in the main Allegro status bar when
a property is selected in the inspector, and for more detailed help
(or to make sure that the accessor functions really have the same
name) you can invoke the Help | Help On
Selected Symbol command (shortcut F1) while the property or event
handler of interest is selected in the inspector.