15 Example: Using The Interface Builder
15.3 Creating the menu system Next, you need to create a menu system for the example interface. This section shows you how to create the basic objects which comprise it.
Next, you need to name the objects you have created. As with the layouts, this is achieved by specifying attribute values.
- 1. Choose View > Menus to switch to the menus view.
- A menu bar is created automatically when you create a new interface. To create the menu system for the example interface, you need to add a menu which contains two items.
- 2. Select the
Menu-Bar object in the Menu hierarchy area.
- 3. Click Menu to create the menu, then click Item twice to create the two items in the menu.
- Notice that, as in the layouts view, an object remains selected if it can itself have children. This means that creating the basic menu structure is a very easy process.
- 4. Make sure that the
Menu-1 menu is still selected, and press Return to display its Attributes dialog.
- 5. Change its NAME attribute to
selection-menu. Do not click OK yet.
- As well as specifying the NAME attribute for the menu you created, you need to change the TITLE attribute of each object you created. To do this, you must ensure that the appropriate attribute categories are displayed in the Attributes dialog.
- 6. Click Options in the Attributes dialog.
- The Attributes to View dialog shown in Figure 15.5 appears.
Figure 15.5 Displaying title attributes for a menu
You have now finished the basic definition of the menu system for your example interface.
- 7. Make sure that at least Basic and Title attributes are selected from the list in this dialog (you can select other categories as well if you wish).
- 8. Click OK when you have made your selection.
- 9. In the Attributes dialog, change the TITLE attribute to
"Selection". Click OK.
- The TITLE attribute is used to specify the title of the menu that appears in the interface itself; note the change in the interface skeleton.
- Next, you need to change the attributes of the two menu items.
- 10. Select the
"Item-1" object and press Return.
- 11. In the Attributes dialog, change the TITLE attribute to
"Graph" and the NAME attribute to
graph-command. Click OK.
- 12. Select the
"Item-2" object, display its Attributes dialog and change the TITLE attribute to
"List Panel" and the NAME attribute to
list-panel-command. Click OK.
Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996
Generated with Harlequin WebMaker