Status PEXElementSearch( Display *display, PEXStructure structure, int whence, long offset, int direction, unsigned long incl_count, unsigned short *incl_list, unsigned long excl_count, unsigned short *excl_list, unsigned long *elem_offset_return )
Zero if unsuccessful; non-zero otherwise. The non-zero value is either PEXFound or PEXNotFound depending upon the result of the search.
Invoke PEXElementSearch to search for the first occurrence of the specified element type in the specified structure. The search always includes the starting element.
If the computed starting offset is less than zero, then it is set to zero before the search is performed. If the computed starting offset is greater than the number of elements in the structure, then it is set to the offset of the last element in the structure.
An element is selected if its element type is contained in the inclusion list (incl_list) and is not contained in the exclusion list (excl_list). An element type of PEXOCAll selects all element types, including OCNil. OCNil refers to the type of the implicit element at position 0. If a structure element type is in both the inclusion list and exclusion list, it is excluded.
The search terminates if a match is found or if the limits of the structure are reached. The search progresses from the start point in the specified direction (PEXForward or PEXBackward). This is a non-descending search; that is, the search does not include any referenced structures. If the search finds a match, then the function returns a return status of PEXFound and the offset of the matching element. If the search is unsuccessful, then the function returns a return status of PEXNotFound.
The element pointer position of structure is not changed, regardless of the returned search status.
For a list of all Structure functions and related topics, see Structures.