[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
Motif 2.1 Widget Writer's Guide
XmeGetDirection
A compound string parse procedure to insert a direction component
Format
#include <Xm/XmP.h>
XmIncludeStatus XmeGetDirectionXtPointer
*text_in_outXtPointer
text_endXmTextType typeXmStringTag
tagXmParseMapping entryint
pattern_lengthXmString
*str_includeXtPointer
call_data
DESCRIPTION
XmeGetDirection is a compound string parse procedure (a function of type
XmParseProc). It is suitable for use as an XmNinvokeParseProc procedure in an
XmParseMapping data type.
XmeGetDirection is triggered when the implicit direction of the current
character in text being parsed is different from the direction of the previous
character. The function assumes that text_in_out points to the
character whose direction has changed. It creates a compound string with a
component of type XmSTRING_COMPONENT_DIRECTION that specifies the direction of
the character at the text_in_out position. The argument
text_in_out remains unchanged.
text_in_outSpecifies the text being parsed. The value is a pointer to the first byte
of a character whose implicit direction is different from that of the previous
character. When the parse procedure returns, this argument is not set to a
value different from the input value.
text_endSpecifies a pointer to the end of the text_in_out string. If
text_end is NULL, the string is scanned until a
NULL character is found. Otherwise, the string is scanned up to, but
not including, the character whose address is text_end.
typeSpecifies the type of text and the tag type. For locale text,
type has a value of either XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT. For
charset text, type has a value of XmCHARSET_TEXT.
tagSpecifies the tag to be used in determining the character direction.
entrySpecifies the parse mapping that triggered the call to the parse
procedure.
pattern_lengthSpecifies the number of bytes in the input text that constitute the
matched pattern.
str_includeSpecifies a pointer to a compound string. The parse procedure creates a
compound string to be included in the compound string being constructed. The
parse procedure then returns the compound string in this argument.
call_dataSpecifies data passed by the application to the parsing routine.
RETURN
This function returns XmINSERT, indicating that the parsing routine should
concatenate the result to the compound string being constructed and continue
parsing.
RELATED
XmParseMapping(3), XmParseTable(3),
XmString(3), and XmeGetNextCharacter(3).
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]