![]() |
![]()
| ![]() |
![]()
NAMEXmtChooserLookupItemName(), XmtChooserLookupItemValue(), XmtChooserLookupItemByName(), 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) ARGUMENTSINPUTS
RETURNS See below. DESCRIPTIONXmtChooserLookupItemName() 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 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 SEE ALSOChapter 27, Presenting Choices,XmtChooser, XmtChooserGetValue(), XmtChooserSetItemValue().
|