Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtMenuGetMenuItem(3)	    Library Functions Manual	   XmtMenuGetMenuItem(3)

NAME
     XmtMenuGetMenuItem(), XmtMenuItemGetSubmenu(), XmtMenuItemGetWidget(), Xmt-
     MenuItemSetSensitivity(),	XmtMenuItemGetState(),	XmtMenuItemSetState()  -
     look up items in an XmtMenu widget by name, and manipulate them.

SYNOPSIS
     #include <Xmt/Menu.h>

     XmtMenuItem *XmtMenuGetMenuItem(Widget w, String name)

     Widget XmtMenuItemGetSubmenu(XmtMenuItem *item)

     Widget XmtMenuItemGetWidget(XmtMenuItem *item)

     void XmtMenuItemSetSensitivity(XmtMenuItem *item, Boolean sensitive)

     Boolean XmtMenuItemGetState(XmtMenuItem *item)

     void XmtMenuItemSetState(XmtMenuItem *item, Boolean state, Boolean notify)

ARGUMENTS
     INPUTS

	  w	 An XmtMenu widget in which an item is to be looked up by name.

	  name	 The name of the item to look up in w.

	  item	 The menu item to manipulate.

	  sensitive
		 For XmtMenuItemSetSensitivity(),  whether  the  specified  item
		 should be made sensitive (True) or insensitive (False).

	  state  For  XmtMenuItemSetState(),  the  state to set on the specified
		 toggle button item. Specify True to set the button and False to
		 unset it.

	  notify For XmtMenuItemSetState(), this argument specifies whether  the
		 XmNvalueChangedCallback  of  the  specified  toggle button item
		 should be invoked in response to the change.

     RETURNS

	  XmtMenuGetMenuItem() returns the named menu item, or NULL if it  could
	  not be found.

	  XmtMenuItemGetSubmenu()  returns the XmtMenu widget that is associated
	  with the specified cascade button menu item.

	  XmtMenuItemGetWidget() returns the widget associated with  the  speci-
	  fied menu item.

	  XmtMenuItemGetState() returns True if the specified toggle button menu
	  item is selected an False if it is unselected.

DESCRIPTION
     The  items in an XmtMenu widget are described by XmtMenuItem structures. If
     you specify your menu in C code, then you will declare and initialize these
     structures explicitly. If you specify your menu in a resource file, you can
     use XmtMenuGetMenuItem() to look up the XmtMenuItem structure  of	a  named
     item. The other functions described here perform various manipulations on a
     specified menu item.

     XmtMenuGetMenuItem()  searches  for and returns the menu item named name in
     the XmtMenu widget w, and also recursively searches any pulldown and  pull-
     right  menus  attached to w. You can specify a name for a menu item created
     in C code by setting the name field of the XmtMenuItem structure.	You  can
     specify  a  name for a menu item described in a resource file by specifying
     the name followed by a colon as the first element in the menu item descrip-
     tion. See Chapter 20, Easy Menu Creation, for more information.

     For menu items that are cascade  buttons,	XmtMenuItemGetSubmenu()  returns
     the  XmtMenu  widget that forms the menu pane attached to that cascade but-
     ton. If you call this function for a menu item that is not a  cascade  but-
     ton, it will print an error message.

     XmtMenuItemGetWidget()  returns  the  widget associated with any menu item.
     This may be an XmPushButton, an XmToggleButton, an XmCascadeButton, an  Xm-
     Label, or an XmSeparator.

     XmtMenuItemSetSensitivity()  lets	you  set the sensitivity of a menu item.
     Like XtSetSensitive(), the second argument  to  XmtMenuItemSetSensitivity()
     is  a Boolean. If True, the item will be made sensitive; if False, the item
     will be made insensitive, and will be grayed out. Unlike  XtSetSensitive(),
     however, XmtMenuItemSetSensitivity() keeps a count of how many times it has
     been  called  for an item. If the function is called twice for an item with
     the sensitive argument of False, then the item will  not  become  sensitive
     again until the function is called twice with the argument True.

     XmtMenuItemGetState()  returns  True  if the specified toggle button is se-
     lected, and False otherwise. This function will print a warning message  if
     called for a menu item that is not a toggle button.

     XmtMenuItemSetState() sets the button state as specified by the state argu-
     ment, and if notify is True, it calls any callbacks registered for the tog-
     gle button. This function will print a warning message if called for a menu
     item that is not a toggle button.

SEE ALSO
     Chapter 20, Easy Menu Creation,
     XmtMenu, XmtMenuActivateProcedure(), XmtMenuInactivateProcedure().

Xmt				   Motif Tools		   XmtMenuGetMenuItem(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtMenuItemGetWidget&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help