1 CAPI Reference Entries

define-contact-pane

Macro

Summary

Thedefine-contact-pane macro is used to place CLUE contacts in CAPI interfaces.

Syntax

define-contact-pane (name contact-name) superclasses 
                    slots &rest options

Description

The macrodefine-contact-pane is a means of placing CLUE contacts in CAPI interfaces, and is provided for backwards compatibility. Portable applications should not be written using CLUE contacts.

The macro creates a CAPI contact pane called name which is a CAPI version of a toolkit contactcontact-name. When an interface containing the contact pane is displayed, the CAPI creates an instance of the contact of classcontact-name (or more accurately, a subclass of the classcontact-name which contains some additional slots to be used by the CAPI).

The macro itself is just an extension todefclass, and the superclasses, slots and options should be specified exactly as when usingdefclass. The one exception is that the option:contact-initargs is recognized, and these will become the default initargs for the contact when used in the CAPI.

The functioncontact-pane-contact is provided as a means of getting hold of the contact from the CAPI pane, and is to be used by code that needs to refer to slots in the contact.

Note that this functionality is only available for LispWorks running under UNIX, and is provided for backwards compatibility. For true portability, CLUE contacts should not be used.

Example

This example creates a CAPI contact pane calledcapi-text-item which is really a toolkit text item.

(capi:define-contact-pane (capi-text-item tk:text-item)
 () ())
(setq text-item (capi:contain
                  (make-instance 'capi-text-item)))

(tk:contact-value (capi:contact-pane-contact text-item))

Example File

capi/elements/contact-pane.lisp

See Also

contact-pane
contact-pane-contact


CAPI Reference Manual, Liquid Common Lisp Version 5.0 - 3 OCT 1997

Generated with Harlequin WebMaker