part of Common Lisp Interface Manager (CLIM)
by Jason Kantz
What are the characteristics and components of application frames?
How are application frames defined and constructed?
How are application frames displayed?
run-frame-top-level [Generic Function]
are the central abstraction of an application
are displayed as top-level window
may also be displayed as regions embedded within other applications
control the screen real estate managed by an application
contain a hierarchy of panes -- from a library of standard panes,
or custom defined panes
are managed by special application called a frame manager
keep track of Lisp state variables that contain the state of the
are used to access command-loop, gadgets, and look-and-feel-independence
analogous to the windows, gadgets, or widgets of other toolkits
layout panes organize space
extended stream panes present application-specific information
gadget panes display data and obtain user input
control the realization of the look and feel of a frame
interpret the specification of the application frame in the context
of the available window system facilities
take care of attaching the pane hierarchy of an application frame
to an appropriate place in a window hierarchy
Kinds of Frame Managers
desktop manager or window manager
allows a user to manipulate the frames of other applications
is usually a non-Lisp application
acts as a mediator between the Lisp application and the host
application acting as frame managers
allow frames of other applications to be displayed within the
Constructing Application Frames
Before you can construct an actual instance of an application
frame, you have to name it and define it by calling
define-application-frame (name superclasses slots &rest options)
This is a macro that helps you define a direct sub-class of the class
standard-application-frame. The &rest options is where
much of the action is because this is where one specifies command
tables, panes for display, and the layout of the panes.
The following code makes and runs a minimal application frame:
(define-application-frame word ;name
(:panes ;panes option
(title ;pane name
:application) ;pane type
(document ;pane name
:application)) ;pane type
(:layouts ;layouts option
(default ;layout name
(vertically () ;layout macros
(run-frame-top-level (make-application-frame 'word :height 300 :width 300))
- Load the CLIM package within your Lisp, and switch to the
- Define, make, and run a minimal CLIM application frame.
- At the toplevel type
Look for the panes and the command table.
(inspect (make-application-frame 'word :height 300 :width 300))
- Macro Expand your call to define-application-frame. Find the
call to defclass.
- Write a utility called make-and-run-frame
that makes and runs an application frame.
Next: CLIM Panes