> <\body> You may define a menu with name either using <\scm-code> (menu-bind . ) or <\scm-code> (tm-menu () . ) Here is a program which represents the entries of the menu. In particular, you may take a look at the files in the directory <\verbatim> \ \ \ \ $TEXMACS_PATH/progs/menu in order to see how the standard menus are defined. In the case of , it is possible to specify additional arguments, which makes it possible to dynamically construct more complex menus which depend on parameters. More precisely, the program > in or is a list of entries of one of the following forms: <\scm-code> (=\ "pulldown menu name" ) (-\ "pullright menu name" ) ("entry" ) --- (if ) (when condition menu-definition) (link ) (former) The constructors > and > are used to create or menus and should contain a program which creates the submenu. In the main (or system) menu bar all root items are pulldown menus and all submenus of these are pullright. Both pulldown and pullright may be used in toolbars or other widgets. The constructor )> creates an ordinary entry, where will be compiled and executed when you click on . Items of a menu may be separated using . The constructor is used for inserting menu items only if a certain is satisfied (for instance, if we are in math mode), whereas always inserts the item but deactivates (e.g. greying it out) it is not met. If you declared a menu , then you may use this menu indirectly using the constructor, thus one may link any such ``indirect'' submenu to as many menus as desired. Finally, new items may be added to any given menu using , as in the following example: <\scm-code> (tm-menu (tools-menu) \ \ (former) \ \ --- \ \ ("New item" (noop))) The main menus are: <\itemize-dot> : contains the root entries of the main menu bar at the top of the window (or desktop under ). It uses to display , , , , , and among others. : contains the main toolbar, which typically features buttons to open and save files, copy and paste text, etc. : contains the icons which depend on the current editing mode, that is: mathematics, text, code, etc. : these icons change with the cursor. One should install here any icons that are specific to a particular tag or context. : custom icons for user extensions. : the menu which pops up when the user right-clicks on a document. Extending or replacing this menu is useful for instance for plugin writers: you may want to display some extra actions while removing others when the user in inside a session for your plugin. >