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

FreeBSD Manual Pages


home | help
XmtChooserLookupItemName(3)Library Functions ManualXmtChooserLookupItemName(3)

       XmtChooserLookupItemName(),   XmtChooserLookupItemValue(),  XmtChooser-
       LookupItemByName(), XmtChooserLookupItemByValue() -  lookup  XmtChooser
       item name and value by index or index by	name and value.

       #include	<Xmt/Chooser.h>

       String XmtChooserLookupItemName(Widget w, int item)

       XtPointer XmtChooserLookupItemValue(Widget w, int item)

       int XmtChooserLookupItemByName(Widget w,	String name)

       int XmtChooserLookupItemByValue(Widget w, XtPointer valuep)


	    w	   An XmtChooser widget.

	    item   The	index  of  the	item  in w that	is to have its name or
		   value looked	up.

	    name   The name of an item in w that is to have its	 index	looked

	    valuep The address of a value associated with an item in w.


	    See	below.

       XmtChooserLookupItemName() returns the label associated with the	speci-
       fied item in the	XmtNstrings resource of	the XmtChooser widget.	If  no
       XmtNstrings  resource has been specified	for the	widget then this func-
       tion returns NULL. The returned string is owned by the widget and  must
       not be modified or freed	by the application.

       XmtChooserLookupItemValue() returns the address of the value associated
       with the	item item in the XmtChooser w. Note  that  this	 differs  from
       XmtChooserGetValue()  which  returns the	value associated with the cur-
       rently selected item.

       XmtChooserLookupItemByName() looks  for	an  item  in  the  XmtNstrings
       resource	 of  the XmtChooser widget w that matches the specified	label.
       If it finds one,	it returns the index  of  the  matching	 item.	If  no
       XmtNstrings  resource  was specified for	the widget, or if no match was
       found, it returns -1.

       XmtChooserLookupItemByValue() compares the value	pointed	to  by	valuep
       with  each  of the values in its	XmtNvalues resource, and if a match is
       found, it returns the index of the item that matched. If	w has  a  NULL
       XmtNvalues   resource,  or  if  no  match  is  found,  it  returns  -1.
       XmtChooserLookupItemByValue() treats string values as a	special	 case.
       If  the	XmtNvalueType  resource	is XtRString, then the contents	of the
       strings are compared, rather than simply	comparing the pointers

       Chapter 27, Presenting Choices,
       XmtChooser, XmtChooserGetValue(), XmtChooserSetItemValue().

Xmt				  Motif	Tools	   XmtChooserLookupItemName(3)


Want to link to this manual page? Use this URL:

home | help