Next: Specifying the Toolbar, Previous: Creating Toolbar, Up: Toolbar [Contents][Index]
The contents of a toolbar are specified using a toolbar descriptor. The format of a toolbar descriptor is a list of toolbar button descriptors. Each toolbar button descriptor is a vector in one of the following formats:
[glyph-list function enabled-p help]
[:style 2d-or-3d]
[:style 2d-or-3d :size width-or-height]
[:size width-or-height :style 2d-or-3d]
Optionally, one of the toolbar button descriptors may be nil
instead of a vector; this signifies the division between the toolbar
buttons that are to be displayed flush-left, and the buttons to be
displayed flush-right.
The first vector format above specifies a normal toolbar button; the others specify blank areas in the toolbar.
For the first vector format:
make-glyph
) or a symbol whose value is such a list. The first
glyph, which must be provided, is the glyph used to display the toolbar
button when it is in the “up” (not pressed) state. The optional
second glyph is for displaying the button when it is in the “down”
(pressed) state. The optional third glyph is for when the button is
disabled. The last three glyphs are for displaying the button in the
“up”, “down”, and “disabled” states, respectively, but are used
when the user has called for captioned toolbar buttons (using
toolbar-buttons-captioned-p
). The function
toolbar-make-button-list
is useful in creating these glyph lists.
UP: up DOWN: down -> up DISABLED: disabled -> up CAP-UP: cap-up -> up CAP-DOWN: cap-down -> cap-up -> down -> up CAP-DISABLED: cap-disabled -> cap-up -> disabled -> up
call-interactively
, since this is how it is
invoked.
nil
, should be a string.
This string is displayed in the echo area when the mouse passes over the
toolbar button.
For the other vector formats (specifying blank areas of the toolbar):
2d
or 3d
,
indicating whether the area is displayed with shadows (giving it a
raised, 3-d appearance) or without shadows (giving it a flat
appearance).
This function calls make-glyph
on each arg and returns a list of
the results. This is useful for setting the first argument of a toolbar
button descriptor (typically, the result of this function is assigned
to a symbol, which is specified as the first argument of the toolbar
button descriptor).
Verify the syntax of entry button in a toolbar description list.
If you want to verify the syntax of a toolbar description list as a
whole, use check-valid-instantiator
with a specifier type of
toolbar
.
Next: Specifying the Toolbar, Previous: Creating Toolbar, Up: Toolbar [Contents][Index]