The Simulation Menu and Contextual Menus

Menus allow users to trigger events in simulations by selecting menu items. Each simulation has a global simulation menu. This menu is associated with the controller object and is used to trigger actions which effect the entire simulation. Each object in the simulation has its own contextual menu that allows the user to trigger actions in individual instances.

For the controller object, the methods add-menu and add-menu-separator of class Control.tz are used to configure the menus. For the simulation objects, the methods add-menu and add-menu-separator of class Real.tz are used.