All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

toolbar

Class
Summary

This class provides a pane containing toolbar buttons and panes.

Package

capi

Superclasses

collection
simple-pane
titled-object
toolbar-object

Initargs

:dividerp

If t, a divider line is drawn above the toolbar, to separate it from the menu bar. The default value is nil.

:images

A list of images.

:callbacks

A list of callback functions.

:names

A list of names.

:texts

A list of strings.

:tooltips

A list of tooltip strings used on Microsoft Windows.

:button-width

The width of the toolbar buttons.

:button-height

The height of the toolbar buttons.

:stretch-text-p

A generalized boolean.

:image-width

The width of images in the toolbar.

:image-height

The height of images in the toolbar.

:default-image-set

An optional image-set object which can be used to specify images. See image-list, image-set and image-locator for more details.

:flatp

A generalized boolean.

Readers

toolbar-flat-p

Description

The class toolbar inherits from collection, and therefore has a list of items . It behaves in a similar manner to push-button-panel, which inherits from choice.

The items argument may be used to specify a mixture of toolbar-buttons and toolbar-components, or it may contain arbitrary objects as items. The list may also contain CAPI panes, which will appear within the toolbar. This is typically used with text-input-pane, option-pane, and text-input-choice.

For items that are not toolbar buttons or toolbar components, a toolbar button is automatically created, using the appropriate elements of the images , callbacks , names , texts and tooltips lists. If no image is specified, the item itself is used as the image. For more information on acceptable values for images , see toolbar-button.

Each of the images , callbacks , names , texts and tooltips lists should be in one-to-one correspondence with the items. Elements of these lists corresponding to toolbar-button items or toolbar-component items are ignored.

Note: :tooltips is now deprecated. Use the interface help-callback with help-key :tooltip instead.

All toolbar buttons within the item list behave as push buttons. However, toolbar button components may have :single-selection or :multiple-selection interaction. See toolbar-component for further details.

button-width and button-height specify the size of each button in the toolbar. If a button contains text and stretch-text-p is true, then the button stretches to the width of the toolbar if needed.

images , if supplied, must specify images all of the same size.

image-width and image-height must match the sub-image dimensions in default-image-set or the dimensions of the images .

flatp specifies whether the toolbar is 'flat' on Cocoa. If flatp is true, then the buttons do not have a visible outline until the user moves the mouse over them. flatp is only implemented on Cocoa. (On Microsoft Windows, all toolbars are flat. On Motif, no toolbar is flat.) The default value of flatp is :default.

Notes
  1. text-input-pane, option-pane, and text-input-choice and so on cannot contain titles when embedded in a toolbar.
  2. Rather than creating a toolbar explicitly you can add an interface toolbar by supplying the interface initarg :toolbar-items. This has the advantages that the toolbar is automatically positioned correctly within the window and has platform-standard behavior such as folding on Cocoa.
See also

collection
image-set
push-button-panel
toolbar-component
image-list, image-set and image-locator
Non-standard toolbars
Working with images


CAPI User Guide and Reference Manual (Windows version) - 25 Feb 2015

NextPrevUpTopContentsIndex