Name

glutMenuStatusFunc - sets the global menu status callback.

Python Specification

glutMenuStateFunc
	glutMenuStateFunc(func) -> None
glutMenuStatusFunc
	glutMenuStatusFunc(func) -> None

C Specification

void glutMenuStatusFunc(void (*func)(int status, int x, int y));
void glutMenuStateFunc(void (*func)(int status));

Parameters

func      The new menu status (or  state)  callback  func-
          tion.

Description

glutMenuStatusFunc sets the global menu status callback so
a GLUT program can determine when a menu is in use or not.
When  a  menu  status  callback  is registered, it will be
called with  the  value  GLUT_MENU_IN_USE  for  its  value
parameter  when  pop-up  menus are in use by the user; and
the   callback   will   be   called   with    the    value
GLUT_MENU_NOT_IN_USE  for its status parameter when pop-up
menus are no longer in use. The x and y  parameters  indi-
cate  the  location  in  window  coordinates of the button
press that caused the menu to go into use, or the location
where  the  menu was released (may be outside the window).
The func parameter  names  the  callback  function.  Other
callbacks  continue  to operate (except mouse motion call-
backs) when pop-up menus are in use  so  the  menu  status
callback  allows  a  program to suspend animation or other
tasks when menus are in use. The cascading  and  unmapping
of sub-menus from an initial pop-up menu does not generate
menu status callbacks. There is a single menu status call-
back for GLUT.

When  the menu status callback is called, the current menu
will be set  to  the  initial  pop-up  menu  in  both  the
GLUT_MENU_IN_USE  and GLUT_MENU_NOT_IN_USE cases. The cur-
rent window will be set to the window from which the  ini-
tial menu was popped up from, also in both cases.

Passing NULL to glutMenuStatusFunc disables the generation
of the menu status callback.

glutMenuStateFunc is a deprecated  version  of  the  glut-
MenuStatusFunc  routine. The only difference is glutMenuS-
tateFunc callback prototype does not deliver the two addi-
tional x and y coordinates.

See Also

glutCreateMenu, glutCreateWindow

Author

Mark J. Kilgard (mjk@nvidia.com)

:: Documentation :: References :: GLUT ::
:: Index (n/a) ::