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

FreeBSD Manual Pages

  
 
  

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

NAME
       XmtMenuGetMenuItem(),  XmtMenuItemGetSubmenu(), XmtMenuItemGetWidget(),
       XmtMenuItemSetSensitivity(),   XmtMenuItemGetState(),   XmtMenuItemSet-
       State()	-  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	speci-
		   fied	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 associ-
	    ated with the specified cascade button menu	item.

	    XmtMenuItemGetWidget()  returns  the  widget  associated  with the
	    specified 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  initial-
       ize 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
       pullright 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	struc-
       ture. 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 description. 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 button. If you call this	function for a menu item that is not a
       cascade button, it will print an	error message.

       XmtMenuItemGetWidget() returns the  widget  associated  with  any  menu
       item.  This may be an XmPushButton, an XmToggleButton, an XmCascadeBut-
       ton, an XmLabel,	or an XmSeparator.

       XmtMenuItemSetSensitivity() lets	you set	 the  sensitivity  of  a  menu
       item.  Like XtSetSensitive(), the second	argument to XmtMenuItemSetSen-
       sitivity() 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
       selected,  and False otherwise. This function will print	a warning mes-
       sage if called for a menu item that is not a toggle button.

       XmtMenuItemSetState() sets the button state as specified	by  the	 state
       argument,  and if notify	is True, it calls any callbacks	registered for
       the toggle 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)

NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtMenuGetMenuItem&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help