The first argument is a string giving the internal name of a menu. If the given name is null, empty, or ``main'', all of the menus in the main window will be searched. The internal menu names are as follows:
|main||Main window menus|
|side||Side Menu buttons|
|top||Top Menu buttons|
|sub1||Wiewport 1 menus|
|sub2||Wiewport 2 menus|
|sub3||Wiewport 3 menus|
|sub4||Wiewport 4 menus|
The second argument is the button name, which is the code name given in the tooltip window which pops up when the mouse pointer rests over the button. In the case of User Menu command buttons, the name is the text which appears on the button. Only buttons and menus visible in the current mode (electrical or physical) can be accessed.
It should be stressed that the string arguments refer to internal names, and not (in general) the label printed on the button. For a button, this is the five character or fewer name that is shown in the tooltip that pops up when the pointer is over the button. The same applies to the menu argument, however these names are not available from running Xic. The internal menu names are provided in the table above.
The identification of the menu is case insensitive. In the lower group of entries, only the first one or two characters have to match. Thus ``Convert'', ``c'', and ``crazy'' would all select the Convert menu, for example. One character is sufficient, except for `e' (Extract and Edit). So, the menu argument can be the menu label, or the internal name, or some simplification at the user's discretion. For the upper group, the entire menu name must be given.
If the third argument is nonzero, the button will be pressed if it is not already engaged. If the third argument is zero, the button will be depressed if it is not already disengaged. The return value is 1 if the button state changed, 0 if the button state did not change, or -1 if the button was not found.
The following four functions send raw events to the window system. They are used primarily for the run time logging in the xic_run.log file. The run log consists entirely of executable statements, thus command scripts can be created by simply performing operations in Xic, and editing the xic_run.log file. Otherwise, these functions are not likely to be of much use to most Xic users.