ETI menus

Checking an item's visibility

A menu item is visible if it appears in the subwindow of the posted menu to which it is connected. (Connecting and posting menus is described below.) Function item_visible enables your application program to determine if an item is visible.

SYNOPSIS

 int item_visible (item)
 ITEM * item;
If the item is connected to a posted menu and it appears in the menu subwindow, item_visible returns TRUE. Otherwise, it returns FALSE.

To check if the first menu item is currently visible on the display, you can write

 int at_top (m) /* check visibility of first menu item */
 MENU * m;
 {
 	ITEM ** i = menu_items (m);
 	ITEM * firstitem = i[0];
 

return item_visible (firstitem); }

For another example, see ``Counting the number of menu items''.
Next topic: Changing the current default values for item attributes
Previous topic: Setting item options

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004

AltStyle によって変換されたページ (->オリジナル) /