14.2 Creating an interface layout

14.2.4 Adding new elements to the layout

To add a new element to the layout, select it in one of the Panes, Interfaces, or Layouts areas, and press Return. Alternatively, double-click on the element. The element is added as the child of the currently selected item in the Layout hierarchy area. If nothing is currently selected, the element is added as the child of the last selected item.

Because construction of the interface layout is performed by selecting CAPI elements directly, you must be familiar with the way that these elements are used in the construction of an interface.

For instance, the first element to add to an interface is likely to be a CAPI layout element, such as an instance of therow-layout class orcolumn-layout class. Elements such as buttons or panes (or other layouts) are then added to this layout. In order to generate CAPI interfaces, it is important to know that all window elements must be arranged inside a layout element in this way.

When you add an element to the design, two windows are updated:

When you add an item, an instance of that class is created. By default, the values of certain attributes are set so that the element can be displayed and the hierarchy layout updated in a sensible way. This typically means that name and title attributes are initialized with the name of the element which has been added, together with a numeric suffix. For instance, the first output pane that is added to an interface is calledOUTPUT-PANE-1. You should normally change these attribute values to something more sensible, as well as set the values of other attributes. See Section 14.5 for details about this.

For a practical introduction to the process of creating an interface using the interface builder, see Chapter 15, "Example: Using The Interface Builder".


Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker