O makes use of a number of socalled major menus that expand into minor menus. A maximum of 10 minor menus or commands can be associated with each major menu. A minor menu may always be activated by typing its name (or bits thereof) in the terminal or graphics window.
The Menu_control command controls the display of keywords on the screen.
The screen menu is described in a text datablock called .menu. The contents of this datablock can be changed by the option Menu_control, or by creating a text file using the Write_formatted command, editing the file, and then reading it into the database with the Read_formatted command. Don't forget to change the number of lines in the datablock header.
The keywords appear on the screen with colours that vary according to which major menu the keyword belongs. These colours are defined in the O database, initially from the file menu.o. In the current version of O, menus are added to the screen display by adding the entire major menu in which it appears or one item at a time, using Menu_control. If one adds e.g. the Assorted_1 major menu, it is possible to remove for example the Wait_ID command from the screen by writing to the file system the text datablock .menu, editing it (don't forget to change the number of lines in the datablock header), and then reading it back into O. For example,
O > write .menu q ; O > $ vi q
edit it to your satisfaction and then read it back into your database
O > read q
The Menu_control command can be used directly to add or remove single commands to the menu, e.g.
O > menu wait_id off
accomplishes the task mentioned above.
The arrangement of commands in major menus is not really important to the user of the program, except in that the grouping is made according to functionality. The real advantage of this design is in the ease of adding new groups of commands to the program that do not interfere a lot with what is already there.
In the following sections, the commands will be described according to which major menu they belong. Each section will contain a general description of the major menu, followed by descriptions of the individual commands. It will include examples and macros, where applicable. If the major menu has an associated datablock in the O database, it too will be described in detail.