Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XmText(3X)

XmTextFindStringWcs(3X)

XmTextFindString(3X)  —  Subroutines

OSF/Motif

NAME

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

SYNOPSIS

#include <Xm/Xm.h>
Boolean XmTextFindString (widget, start, string, direction,
position)
Widgetwidget;
XmTextPositionstart;
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 occurrence 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. 

widgetSpecifies the Text widget ID. 

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

stringSpecifies the search string. 

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

XmTEXT_FORWARD
The search proceeds toward the end of the text buffer.

XmTEXT_BACKWARD
The search proceeds toward the beginning of the text buffer.

positionSpecifies the pointer in which the first character position of the string match is returned.  This is an integer number of characters from the beginning of the buffer.  The first character position is 0.  If the function returns False, this value is undefined. 

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

RETURN VALUE

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

RELATED INFORMATION

XmText(3X) and XmTextFindStringWcs(3X). 

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