WORDEXTFLAGS Enum

Definition

Specifies options for determining the extent of a word.

This enumeration supports a bitwise combination of its member values.

public enum class WORDEXTFLAGS
public enum class WORDEXTFLAGS
enum WORDEXTFLAGS
[System.Flags]
public enum WORDEXTFLAGS
[<System.Flags>]
type WORDEXTFLAGS = 
Public Enum WORDEXTFLAGS
Inheritance
WORDEXTFLAGS
Attributes

Fields

Name Value Description
WORDEXT_CURRENT 0

Finds a word or token containing a specified position, if any such word or token exists.

WORDEXT_FINDWORD 0

Finds words only. See Remarks.

WORDEXT_PREVIOUS 1

Finds the nearest word or token whose last character is less than a specified position.

WORDEXT_NEXT 2

Finds the nearest word or token whose first character is greater than a specified position.

WORDEXT_MOVETYPE_MASK 3

Flag to mask WORDEXT_PREVIOUS and WORDEXT_NEXT.

WORDEXT_NEAREST 3

Finds the word or token nearest to a specified position.

WORDEXT_FINDTOKEN 4

Finds words and tokens. See Remarks.

WORDEXT_FINDEXPRESSION 8

Find simple expressions, like *pFoo.

Remarks

For the WORDEXT_FINDWORD value, "FINDWORD" refers any of the following:

  • keyword

  • identifier

  • number

For the WORDEXT_FINDTOKEN value, "FINDTOKEN" refers to any of the following:

  • keyword, identifier, or number

  • operator (for example, ++ or %)

  • delimiter (for example, quotation marks (") or comment marks (// or /))

  • white space

Thus, by specifying a value of WORDEXT_FINDWORD, you return a word extent that corresponds to a keyword, a number, or an identifier. For example, if the text were "a[1]," the "a" or the "1" could be returned, but the whole expression would not be returned. However, if you specify a value of WORDEXT_FINDTOKEN, then you would return any keyword, number, or identifier, or you would return operators, delimiters, or white space. Thus, if the text were "a[1] ", any single character of the string could match, but any larger portion of the string would not.

Note

The term "token" is not related to a language token in compiler terminology.

COM Signature

From textmgr.idl:

typedef enum _wordextflags  
{  
   WORDEXT_MOVETYPE_MASK  = 0x0003,  
   WORDEXT_CURRENT        = 0x0000,  
   WORDEXT_PREVIOUS       = 0x0001,  
   WORDEXT_NEXT           = 0x0002,  
   WORDEXT_NEAREST        = 0x0003,  
   WORDEXT_FINDWORD       = 0x0000,  
   WORDEXT_FINDTOKEN      = 0x0004,  
   WORDEXT_FINDEXPRESSION = 0x0008,  
} WORDEXTFLAGS;  

Applies to