Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-Filemenu_ienable()menu_icheck()Menu Librarymenu_bar() AESSyntaxWORD menu_bar( tree, mode )
OBJECT *tree;
WORD mode;
Function menu_bar() displays a specialized OBJECT tree on the screen
as the application menu. It can also be used to determine
the owner of the currently displayed menu bar in
a multitasking AES.
Opcode 30 (0x1E)
Availability All AESversions.
Parameters tree is a pointer to an OBJECT tree which has been
formatted for use as a system menu (for more information on
the OBJECT format of a menu see the discussion on objects in this chapter).
mode is a flag indicating the action to take as follows:
Name mode Meaning
MENU_REMOVE 0 Erase the menu bar specified in tree.
MENU_INSTALL 1 Display the menu bar specified in tree.
MENU_INQUIRE -1 Return the AES application identifier of
the process which owns the currently
displayed system menu. tree can be set
to NULL. The AES version must be greater
than 4.0 and appl_getinfo() must
indicate that this is feature is
supported.
Binding intin[0] = mode;
addrin[0] = tree;
return crys_if(0x1E);
Return Value If mode is MENU_REMOVE (0) or MENU_INSTALL (1), the return
value indicates an error condition where >0 means no
error and 0 means an error occurred. In inquiry mode (mode
= MENU_INQUIRE (-1)), menu_bar() returns the application
identified of the process which owns the currently
displayed menu bar.
Comments The safest way to redraw an application's menu bar is to
redraw it only if you are sure it is currently the active
menu bar. In a non-multitasking AES, this is a certainty,
however, in a multitasking AES you should first inquire the
menu bar's owner within the scope of a wind_update(
BEG_UPDATE ) call to prevent the system from swapping
active menu bars while in the process of redrawing.
See Also menu_ienable(), menu_icheck()Group Menu Library