Next Prev Up Top Contents Index

18.1 Overview of Window Facilities

A central notion in organizing user interfaces is allocating screen regions to particular tasks and recursively subdividing these regions into subregions. The windowing layer of CLIM defines an extensible framework for constructing, using, and managing such hierarchies of interactive regions . This framework allows uniform treatment of the following things:

Window objects like those in X or NeWS

Lightweight gadgets typical of toolkit layers, such as Motif or OpenLook

Structured graphics such as output records and an application's presentation objects

Objects that act as Lisp handles for windows or gadgets implemented in a different language (such as OpenLook gadgets implemented in C)

From the perspective of most CLIM users, CLIM's windowing layer plays the role of a window system. However, CLIM usually uses the services of a window system platform to provide efficient windowing, input, and output facilities. We will refer to such window system platforms as host window systems or as display servers.

The fundamental window abstraction defined by CLIM is called a sheet . A sheet can participate in a relationship called a windowing relationship . This relationship is one in which one sheet called the parent provides space to a number of other sheets called children . Support for establishing and maintaining this kind of relationship is the essence of what window systems provide. At any point in time, CLIM allows a sheet to be a child in one relationship and a parent in another relationship.

Programmers can manipulate unrooted hierarchies of sheets (those without a connection to any particular display server). However, a sheet hierarchy must be attached to a display server to make it visible. Ports and grafts provide the functionality for managing this capability. A port is an abstract connection to a display service that is responsible for managing host display server resources and for processing input events received from the host display server. A graft is a special kind of sheet that represents a host window, typically a root window (that is, a screen-level window). A sheet is attached to a display by making it a child of a graft, which represents an appropriate host window. The sheet will then appear to be a child of that host window. In other words, a sheet is put onto a particular screen by making it a child of an appropriate graft and enabling it. Ports and grafts are described in detail in Chapter 19, Ports, Grafts, and Mirrored Sheets

As has been discussed previously, CLIM users will typically be dealing with panes , rather than with sheets, ports, grafts, or mediums, as a call to make-application-frame automatically results in a port specification, a graft instantiation, and the allocation of a medium, to which output directed to the pane will be forwarded.

18.1.1 Properties of Sheets

18.1.2 Sheet Protocols


CommonLisp Interface Manager 2.0 User's Guide - 8 Aug 2003

Next Prev Up Top Contents Index