Next Previous Up Top Contents Index

1 CAPI Reference Entries

toolbar-button

Class

Summary

This class is used to create instances of toolbar buttons.

Superclasses

item
toolbar-object

Slots

callback

A function that is called when the toolbar button is pressed.

image

A slot specifying the image to use for the toolbar button.

tooltip

An optional string which is displayed when the mouse moves over the button.

Description

Toolbar buttons may be placed within toolbars and toolbar components. However, there is usually no need to create toolbar buttons explicitly; instead, the:callbacks,:images and:tooltips arguments totoolbar ortoolbar-component can be used.
Theimage may be one of the following:
A pathname or string

This specifies the filename of a file suitable for loading withgp:load-image. Currently this must be a bitmap file.

A symbol

The symbol must have been previously registered by means of a call togp:register-image-translation.

An image object, as returned by gp:load-image.

An image locator object

This allows a single bitmap to be created which contains several button images side by side. Seemake-image-locator for more information. On Windows, this also allows access to bitmaps stored as resources in a DLL.

An integer

This is a zero-based index into the default-image-set of the toolbar or toolbar component in which the toolbar button is used.

The image should be of the correct size for the toolbar. By default, this is 16 pixels wide and 15 pixels high.
See also

make-image-locator
toolbar
toolbar-component

LispWorks CAPI Reference Manual - 17 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker