15 Example: Using The Interface Builder

15.1 Creating the basic layout

This section shows you how to create the basic layout for your interface, without specifying any attributes. Normally, this stage is literally the work of only a few seconds. The process is described in some detail here, to illustrate the way that the interface builder ensures that the most appropriate item is selected in both the Layout hierarchy and Menu hierarchy areas, so as to minimize the steps you need to take when creating an interface.

1. Create an interface builder, if you do not already have one.

2. Choose File > New.

A new, empty, interface skeleton appears.

3. If the Layouts view is not displayed, choose View > Layouts.

To begin, you need to add the main column layout to the interface.

4. In the Layouts area, selectCAPI:COLUMN-LAYOUT and press Return.

A column layout object is added as a child of the interface object. Nothing appears in the interface skeleton yet, since a column layout is a container for other window objects, and cannot itself be displayed. Note that the column layout remains selected in the Layout hierarchy area. This is because column layouts are objects which can themselves have children, and the interface builder assumes that you are going to add some children next.

5. In the Panes area, selectCAPI:GRAPH-PANE and press Return.

The graph pane object is added as the child of the column layout, and a graph pane appears in the interface skeleton.

6. In the Panes area, selectCAPI:DISPLAY-PANE and press Return.

7. In the Panes area, selectCAPI:LIST-PANEL and press Return.

The objects that you specify are added to the interface, and the interface skeleton is updated accordingly. Note that the column layout object remains selected throughout. You have now created the basic layout for the interface.

Next, suppose that you decide to add a title to the left of the display pane. You might want to do this make it clear what information is being shown in the display pane.

To do this, you can create a new row layout, add a title pane to it, and then move the existing display pane into this new row-layout. In addition, you must reorganize some of the elements in the interface.

1. Ensure thatColumn-Layout-1 is still selected in the Layout hierarchy area.

The new row layout needs to be added as a child of the column layout.

2. In the Layouts area, selectCAPI:ROW-LAYOUT and press Return.

Notice that the new row layout remains selected, ready for you to add objects to it.

3. In the Panes area, selectCAPI:TITLE-PANE and press Return.

Next, you must move the display pane you have already created, so that it is contained in the new row layout.

4. In the Layout hierarchy area, selectDisplay-Pane-1 and choose Edit > Cut.

5. SelectRow-Layout-1 and choose Edit > Paste.

The items have already been placed in the row layout in the positions you want them. However, the row layout itself has been added to the bottom of the interface; you want it to be in the same position as the display pane you initially created. To do this, move the list panel to the bottom of the interface.

6. SelectList-Panel-1 and choose Object > Lower.

You have now finished creating the layout for the example interface. The next step is to name the elements of the interface in a sensible fashion.

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

Generated with Harlequin WebMaker