NextPrevUpTopContentsIndex

1.3 How CLIM Helps You Achieve a Portable User Interface

Portability is one of the features that sets CLIM apart from other interface managers.

CLIM provides a uniform interface to the standard compositional toolkits available in many environments. By defining user interfaces in terms of CLIM objects rather than by accessing windows and widgets of a given windowing system directly, you are able to achieve a highly portable interface. In addition to CLIM functionality, you may also incorporate aspects of Common Lisp and CLOS into your program. The dependencies of your application are outlined in Figure 1..

 

Figure 1. The Foundation of a Portable Application

The portability of your code comes from the fact that it is written in terms of standardized packages: Common Lisp, CLOS, and CLIM. From the perspective of your application, the details of the host windowing system, host operating system, and host computer should be invisible. CLIM handles the interaction with the underlying windowing system. Figure 2. shows the elements of the host environment from which CLIM insulates your application.

 

Figure 2. How CLIM Is Layered Over the Host System

CLIM shields you from the details of any one window system by making abstractions of the concepts that many window systems have in common. In using CLIM, you specify the appearance of your application's interface in general, high-level terms. CLIM then turns your high-level description into the appearance appropriate for a given host environment. For example, a request for a scroll bar pane would be interpreted as a request for the scroll bar widget in the current windowing system.

In some cases, you may prefer to have more explicit control over the appearance of your application. At the expense of portability, you may, at any time, bypass CLIM abstract interface objects and directly use functions provided by the underlying windowing system.


CommonLisp Interface Manager 2.0 User's Guide - 18 Mar 2005

NextPrevUpTopContentsIndex