All Manuals > LispWorks IDE User Guide > 21 Example: Using The Interface Builder

NextPrevUpTopContentsIndex

21.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.

  1. Click the Menus tab in the Interface Builder to switch to the menus view.
  2. 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.

  3. Select the Menu-Bar object in the Menu hierarchy area.
  4. Click the Menu button (near the bottom of the Interface Builder) to create the menu, then click Item twice to create the two items in the menu.
  5. 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 quick process.

    Next, you need to name the objects you have created. As with the layouts, this is achieved by specifying attribute values.

  6. Make sure that the Menu-1 menu is still selected, and use the Object > Attributes menu command to display its Attributes dialog.
  7. Change its Name attribute to selection-menu. Do not click OK yet.
  8. 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.

  9. Click on the Title tab in the Attributes dialog.
  10. The Attributes dialog changes to appear as shown in Displaying title attributes for a menu.

    Figure 21.5 Displaying title attributes for a menu

  11. In the Title tab view of the Attributes dialog, change the Title attribute to "Selection". Click OK .
  12. 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.

  13. Select the "Item-1" object and press Return.
  14. In the Attributes dialog, change the Title attribute to "Graph" and the Name attribute to graph-command. Click OK .
  15. Double-click on the "Item-2" object to display its Attributes dialog and change the Title attribute to "List Panel" and the Name attribute to list-panel-command. Click OK .

You have now finished the basic definition of the menu system for your example interface.


LispWorks IDE User Guide (Unix version) - 12 Feb 2015

NextPrevUpTopContentsIndex