Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XmTeFindA(Xm) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 XmTextFindString(Xm)           6 January 1993           XmTextFindString(Xm)


 Name

    XmTextFindString - a Text function that finds the beginning position of a
    text string

 Syntax


    #include <Xm/Xm.h>

    Boolean XmTextFindString (widget, start, string, direction, position)
    Widget  widget;
    XmTextPosition start;
    char  *string;
    XmTextDirection direction;
    XmTextPosition *position;


 Description

    XmTextFindString locates the beginning position of a specified text
    string. This routine searches forward or backward for the first occur-
    rence of the string starting from the given start position.  If it finds
    a match, the function returns the position of the first character of the
    string in position.

    widget  Specifies the Text widget ID.

    start   Specifies the character position from which the search proceeds.
            This is an integer number of characters from the beginning of the
            text buffer. The first character position is 0.

    string  Specifies the search string.

    direction
            Indicates the search direction. It is relative to the primary
            direction of the text. The possible values are:

            +  XmTEXTFORWARD -- the search proceeds toward the end of the
               text buffer.

            +  XmTEXTBACKWARD -- the search proceeds toward the beginning of
               the text buffer.

    position
            Specifies the pointer in which the first character position of
            the string match is returned. This is an integer number of char-
            acters from the beginning of the buffer. The first character
            position is 0. If the function returns False, this value is unde-
            fined.

    For a complete definition of Text and its associated resources, see
    XmText(Xm).

 Return value

    Returns True if a string match is found; otherwise, returns False.

 See also

    XmText(Xm) and XmTextFindStringWcs(Xm).


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026