All Manuals > Common Lisp Interface Manager 2.0 User's Guide > Chapter 9 Defining Application Frames > 9.9 Frame Managers

NextPrevUpTopContentsIndex

9.9.1 Finding Frame Managers

Most frames need to deal directly with frame managers only to the extent that they need to find a frame manager into which they can insert themselves. Since frames will usually be invoked by some user action that is handled by a frame manager, finding an appropriate frame manager is usually straightforward.

Some frames will support the embedding of other frames within themselves. Such frames not only use frames but also act as frame managers. In this case, the embedded frames are mostly unaware that they are nested within other frames, but only know that they are controlled by a particular frame manager.

The find-frame-manager function provides a flexible means for locating a frame manager to adopt an application's frames. There are a variety of ways that the user or the application can influence where an application's frame is adopted:

An application can establish an application default frame manager using with-frame-manager . A frame's top-level loop automatically establishes the frame's frame manager.

The programmer or user can influence what frame manager is found by setting *default-frame-manager* or *default-server-path* .

find-frame-manager [Function]	

Arguments: &rest options &key port &allow-other-keys

Summary: Finds an appropriate frame manager that conforms to the options, including the port argument. Furthermore, CLIM applications may set up dynamic contexts that affect what find-frame-manager will return.

port defaults to the value returned by find-port applied to the remaining options.

A frame manager is found using the following rules in the order listed:

If a current frame manager has been established via an invocation of with-frame-manager , as is the case within a frame's top-level, and that frame manager conforms to the options, it is returned. The exact definition of "conforming to the options" varies from one port to another, but it may include such things as matching the console number, color or resolution properties, and so forth. If the options are empty, then any frame manager will conform.

If *default-frame-manager* is bound to a currently active frame manager and it conforms to the options, it is returned.

If port is nil , a port is found and an appropriate frame manager is constructed using *default-server-path* .

*default-frame-manager* 

Summary: This variable provides a convenient point for allowing a programmer or user to override the frame manager type that would normally be selected. Most users will not set this variable, since they can set *default-server-path* to indicate which host window system they want to use and are willing to use whatever frame manager is the default for the particular port. However, some users may want to use a frame manager that isn't the typical frame manager. For example, a user may want to use both an OpenLook frame manager and a Motif frame manager on a single port.

with-frame-manager [Macro]	

Arguments: (frame-manager) &body body

Summary: Generates a dynamic context that causes all calls to find-frame-manager to return frame-manager if the where argument passed to it conforms to frame-manager . Nested calls to with-frame-manager shadow outer contexts. body may have zero or more declarations as its first forms.


Common Lisp Interface Manager 2.0 User's Guide - 20 Sep 2011

NextPrevUpTopContentsIndex