GetSys

ReadMenuId

Return the result of the last menu of the READ

Syntax

Signature
int ReadMenuId( void );

Arguments

None.

Return value

The id of the menu item that the last MenuModal() of the READ gave, -1 when the menu ended with Esc or with a Get, or 0 when the menu has not run since the READ started.

Description

Include xdev-wtui-classes.h. ReadModal() with a top bar menu runs MenuModal() for Alt with the accelerator letter of a top bar item or a click on it; ReadMenuId() gives its result. The value is set to 0 when a READ starts and stays after the READ ends, so a menu item can call ReadKill( T ) and the program can check ReadMenuId() after ReadModal(). The result of the shortcut keys of the menu is not kept.

See also