NextPrevUpTopContentsIndex

cocoa-default-application-interface

Class
Summary

A class from which the Macintosh application interface should inherit.

Package

capi

Superclasses

interface

Initargs

:message-callback

A function or nil .

:application-menu

nil , a menu, or the name of a slot containing a menu in the application interface.

:dock-menu

nil , a menu, or a function designator.

Accessors

application-interface-message-callback
application-interface-application-menu
application-interface-dock-menu

Description

The class cocoa-default-application-interface supports application messages and the application menu for a Cocoa application.

When non- nil , message-callback should be a function with signature

interface message &rest args

message-callback will be called for various application messages. The interface argument will be the application interface and the message argument will be a keyword. The only currently defined message is :open-file . In this case args will contain the name of the file to open. This message is invoked when the user double-clicks on a document associated with the application or drags a document into the application icon.

application-menu controls the application's main menu. If this is nil , then a minimal application menu will be made using the title of the application interface, otherwise it should be a menu containing the usual items or the name of a slot containing such a menu in the application interface.

dock-menu provides a menu for use by the Mac OS X Dock icon. If the value is nil (the default), then the standard menu is used. If dock-menu is a function designator, it is called with the application interface as its argument when the menu is popped up and should return a menu. Otherwise dock-menu should be a menu, which is used directly. The Dock will add the standard items such as Quit to the end of the menu you supply.

interface initargs are interpreted as follows:

The application interface also allows you to control aspects of the application. In particular:

The display-state value can one of:

:normal

Show the application and activate it

:restore

Show the application again without activating it

:hidden

Hide

:others-hidden

Hide Others

: all-normal

Show All

To make your application use your cocoa-default-application-interface , do not display it explicitly, but call set-application-interface.

Note: cocoa-default-application-interface is implemented only in LispWorks for Macintosh with the Cocoa IDE.

Examples:

See the examples in

examples/capi/applications/cocoa-application.lisp

examples/delivery/macos/simple-application.lisp

examples/delivery/macos/full-application.lisp

See also

set-application-interface


LispWorks CAPI Reference Manual - 17 Mar 2008

NextPrevUpTopContentsIndex