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

FreeBSD Manual Pages

  
 
  

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

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

SYNOPSIS
     #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)

ARGUMENTS
     INPUTS

	  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 up.

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

     RETURNS

	  See below.

DESCRIPTION
     XmtChooserLookupItemName() returns the label associated with the  specified
     item   in	the  XmtNstrings  resource  of	the  XmtChooser  widget.  If  no
     XmtNstrings resource has been specified for the widget then  this	function
     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  currently
     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  re-
     source,  or  if  no  match is found, it returns -1. XmtChooserLookupItemBy-
     Value() treats string values as a special case. If  the  XmtNvalueType  re-
     source  is XtRString, then the contents of the strings are compared, rather
     than simply comparing the pointers

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

Xmt				   Motif Tools	     XmtChooserLookupItemName(3)

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

home | help