LayerAV_Layer
ObjectSpell

Acrobat provides a Spelling plug-in, which exports a Host Function Table (HFT) implementing a spell-check API for use by plug-in developers.

To use the Spelling HFT, a plug-in must include the header file SpellerHFT.h, which includes Speller_Sel.h.

The following is a typical sequence of calls made by a plug-in using the Spelling HFT. During its importReplaceAndRegister() callback, the plug-in should:

During execution, the plug-in should respond to the following callbacks for each domain:

The client may call other Spelling HFT services during execution even if it did not add a domain.

During its unloadCallback, the plug-in should:

Text parameters

Several of the Spelling API methods (SpellCheck(), SpellCheckText(), and SpellCheckWord()) take input strings as parameters, and several methods return strings as output parameters.

Input strings are either big-endian Unicode strings with the bytes 0xFE 0xFF prepended, or strings with PDFDocEncoding. In either case a string is expected to have the appropriate NULL-termination. If a string is UCS-2 it may have embedded language and country information.

Output text is in big-endian UCS-2 format with the bytes 0xFE 0xFF \ prepended. This string can be converted to a host encoded string by using ASTextFromPDText() and ASTextGetEncodedCopy(). For example:

char **altArray = NULL;

ASInt32 altCount = 0;

ASBool status = SpellCheckWord(acd, cWord, NULL, 0, &altArray, &altCount);

if (altCount) {

ASText ast = ASTextFromPDText(altArray[1]);

char* altWord = ASTextGetEncodedCopy(ast, (ASHostEncoding) PDGetHostEncoding() );

}



Define Summary
 Define
 Init_SpellerHFT
 Init_SpellerHFT
 Init_SpellerHFT
 kAddIndexFailed
 kParserCQL
 kParserSimple
 kSCparam_LATEST_VERSION
 kSCparam_VERSION_1
 kSCparam_VERSION_2
 kSCparam_VERSION_3
 kSpellLastBuffer
 kSpellMaxName
 kSpellNotLastBuffer
 kWordCreatorCode
Microsoft Word.
 kWordOptionCase
The search is case-sensitive.
 kWordOptionIgnoreDiacritics
SearchWordOptionsFlags
 kWordOptionIgnoreFH
SearchWordOptionsFlags
 kWordOptionProximity
Consider the proximity of results when using the AND operator to look for more than one word in a document. Without this option, ANDed terms can be anywhere in a document. Searching for "red" and "blue", for example, finds a document where "red" is the first word on the first page and "blue" is the last word on the last page. With this option, however, ANDed terms must be within two or three pages of each other to be found. Also, the closer ANDed terms appear together, the higher the relevance ranking of the document that contains them.
 kWordOptionRefine
Do not search the entire list of indices, but only the documents that matched the previous search. This is used to refine the results of the previous search.
 kWordOptionStemming
Find not only the specified word, but other words that have the same stem (for example, run and ran have the same stem).
 kWordOptionWholeWord
SearchWordOptionsFlags
 SCALEALL_3D_CURSOR
cursorID
 SCROLL_CURSOR
cursorID
 SpellerHFT_LATEST_VERSION
 SpellerHFT_NAME
 SpellerHFT_VERSION_1_1
 SpellerHFT_VERSION_1_2
 SpellerHFT_VERSION_1_3
 SpellerNum_SEL
Typedef Summary
 Typedef
 HyphenationRecord
 HyphenationRecordPtr
 SpellCheckParam
This parameter block is used for communication between the Spelling plug-in and a client plug-in. The client must allocate it, initialize all fields, and pass it to the Spelling plug-in when adding a domain with SpellAddDomain(). Spelling passes it back to the client when the SCEnableProc(), SCGetTextProc(), and SCCompletionProc() are called. It is passed to the client's SCGetTextProc() from the Spelling plug-in when it needs to request a text buffer from the client. After the user has completed the spell check on the scInBuffer, this same parameter block is passed to the client's SCCompletionProc() with the result of the spell check in scOutBuffer. When the SCGetTextProc() is called, scPageNum, scIndex and scAVDoc are filled in by the Spelling plugin.
 SpellCheckParamPtr
Enumeration Summary
 Enumeration
  eHyphenType
The types of hyphenations.
  SpellDialogResult
Possible results of the spell check when the SpellCheck() method is called.
  SpellDomainFlags
SpellingDomainFlags Valid values for the scFlags field of the SpellCheckParam block. For Acrobat 5 and higher, all clients should set this field to kSpellFlagAllDomain. All other bits in this flag are reserved for future use. The spelling client's private data and flags can be stored in the scClientData field.
Variable Summary
 Variable
 gSpellerHFT
Structure Summary
 Structure
 _t_HyphenationRecord
The hyphenation record.
 SpellCheckParam
Spell Check parameters This parameter block is used for communication between the Spelling plug-in and a client plug-in. The client must allocate it, initialize all fields, and pass it to the Spelling plug-in when adding a domain with SpellAddDomain. Spelling passes it back to the client when the SCEnableProc(), SCGetTextProc(), and SCCompletionProc() are called.
Callback Summary
 Callback
 SCChangeProc
Called by the Spelling plug-in each time scOutBufferAStext is about to change. An SCChangeProc() is optional.
 SCCompletionProc
An SCCompletionProc() must be provided for each domain a plug-in registers with SpellAddDomain(). It is called by the Spelling plug-in when the user has completed the spell check.
 SCEnableProc
Called by the Spelling plug-in to determine whether the Spelling menu items and toolbar button should be enabled. An SCEnableProc() must be provided for each domain a plug-in registers with SpellAddDomain().
 SCGetTextProc
This procedure is called by Spelling to request a text buffer to be checked by the user in the Spelling dialog box.
 SCInitProc
 SCRTFChangeProc
Callback proc for SpellCheckRTF. This proc is called each time the user changes something in the original input buffer. This allows the caller of SpellCheckRTF() to track text changes to a rich text buffer and overlay the plain text change onto the rich text spans to perserve formatting.
 SCTermProc
Method Summary
 Method
 
ASBool SpellAddDictionary(char* cName, char* cFile, ASBool bShow)
 
 
ASBool SpellAddWord(char* cWord)
 
char* SpellCheck(AVDoc avd, const char* textBuffer, ASInt16* dialogResult, ASBool bReserved, char** dictionaryArray, ASInt32 dictionaryCount)
 
ASInt32 SpellCheckRTF(AVDoc avd, void* vReserved, ASText astPlainText, char** dictionaryArray, ASInt32 dictionaryCount, SCRTFChangeProc pRTFchangeProc, void* vClientData)
 
ASBool SpellCheckText(AVDoc avd, const char* textBuffer, ASUns32* startOffset, ASUns32* endOffset, char** dictionaryArray, ASInt32 dictionaryCount)
 
ASBool SpellCheckWord(AVDoc avd, const char* cWord, char** dictionaryArray, ASInt32 dictionaryCount, char*** alternativeArrayPtr, ASInt32* alternativeCount)
 
ASInt32 SpellCountKnownWords(const char* textBuffer, ASInt32 dictionaryCount, char** dictionaryArray, ASInt32* counterArray)
 
 
ASBool SpellCustomDictionaryCreate(ASText astName, ASText astLanguage, ASBool bShow)
 
 
ASBool SpellCustomDictionaryExport(ASText astName, ASPathName folderPath, void* reserved)
 
ASBool SpellCustomDictionaryOpen(ASText astName, ASPathName filePath, ASBool bShow)
 
ASBool SpellDictionaryNames(char*** dictionaryArrayPtr, ASInt32* dictionaryCount)
 
ASBool SpellDomainNames(char*** domainArrayPtr, ASInt32* domainCount)
 
ASBool SpellGetDocDictionaryOrder(AVDoc avd, char*** dictionaryArrayPtr, ASInt32* dictionaryCount)
 
ASBool SpellGetDocLanguageOrder(AVDoc avd, char*** languageArrayPtr, ASInt32* languageCount)
 
ASText SpellGetNextWord(ASConstText inBuffer, ASInt32* nStart, ASInt32* nEnd, ASBool bFilter)
 
ASInt32 SpellHyphenateWord(AVDoc avd, const ASText astWord, char** dictionaryArray, ASInt32 dictionaryCount, HyphenationRecordPtr* hyphenationArrayPtr)
 
ASBool SpellIgnoreAll(AVDoc avd, char* cWord)
 
ASBool SpellLanguages(char*** languageArrayPtr, ASInt32* languageCount)
 
ASBool SpellRemoveDictionary(char* cName)
 
 
ASBool SpellRemoveWord(char* cWord)
 
ASBool SpellSetDocDictionaryOrder(AVDoc avd, char** dictionaryArray, ASInt32 dictionaryCount)
 
ASBool SpellSetDocLanguageOrder(AVDoc avd, char** languageArray, ASInt32 languageCount)
 
ASBool SpellUserDictionaryOrder(char*** dictionaryArrayPtr, ASInt32* dictionaryCount)
 
ASBool SpellUserLanguageOrder(char*** languageArrayPtr, ASInt32* languageCount)
 
ASBool SpellUserWords(ASBool bAdded, char*** wordArrayPtr, ASInt32* wordCount)
Defines Detail
Init_SpellerHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define Init_SpellerHFT ASExtensionMgrGetHFT(ASAtomFromString(SpellerHFT_NAME), SpellerHFT_LATEST_VERSION)

File: SpellerHFT.h
Line: 46
Init_SpellerHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define Init_SpellerHFT ASExtensionMgrGetHFT(ASAtomFromString(SpellerHFT_NAME), SpellerHFT_LATEST_VERSION)

File: SpellerHFTProcs.h
Line: 43
Init_SpellerHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define Init_SpellerHFT ASExtensionMgrGetHFT(ASAtomFromString(SpellerHFT_NAME), SpellerHFT_LATEST_VERSION)

File: SpellerHFTProcs.h
Line: 43
kAddIndexFailed 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAddIndexFailed ((SearchIndexPtr)0)

File: SrchType.h
Line: 235
kParserCQL 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kParserCQL 1

File: SrchType.h
Line: 242
kParserSimple 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kParserSimple 0

File: SrchType.h
Line: 241
kSCparam_LATEST_VERSION 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kSCparam_LATEST_VERSION kSCparam_VERSION_3

File: Speller_Sel.h
Line: 226
kSCparam_VERSION_1 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kSCparam_VERSION_1 0x0001

File: Speller_Sel.h
Line: 223
kSCparam_VERSION_2 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kSCparam_VERSION_2 0x0002

File: Speller_Sel.h
Line: 224
kSCparam_VERSION_3 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kSCparam_VERSION_3 0x0003

File: Speller_Sel.h
Line: 225
kSpellLastBuffer 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kSpellLastBuffer true

File: Speller_Sel.h
Line: 47
kSpellMaxName 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kSpellMaxName 48

File: Speller_Sel.h
Line: 49
kSpellNotLastBuffer 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kSpellNotLastBuffer false

File: Speller_Sel.h
Line: 48
kWordCreatorCode 
Product availability: All
Platform availability: All

Syntax

#define kWordCreatorCode ASFourCharCode('W8BN')

Description

Microsoft Word.


File: ASExpT.h
Line: 1810
kWordOptionCase 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kWordOptionCase 0x00000001L

Description

The search is case-sensitive.


File: SrchType.h
Line: 25
kWordOptionIgnoreDiacritics 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kWordOptionIgnoreDiacritics 0x00000100L

File: SrchType.h
Line: 64
kWordOptionIgnoreFH 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kWordOptionIgnoreFH 0x00000080L

File: SrchType.h
Line: 59
kWordOptionProximity 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kWordOptionProximity 0x00000010L

Description

Consider the proximity of results when using the AND operator to look for more than one word in a document. Without this option, ANDed terms can be anywhere in a document. Searching for "red" and "blue", for example, finds a document where "red" is the first word on the first page and "blue" is the last word on the last page. With this option, however, ANDed terms must be within two or three pages of each other to be found. Also, the closer ANDed terms appear together, the higher the relevance ranking of the document that contains them.


File: SrchType.h
Line: 44
kWordOptionRefine 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kWordOptionRefine 0x00000020L

Description

Do not search the entire list of indices, but only the documents that matched the previous search. This is used to refine the results of the previous search.


File: SrchType.h
Line: 51
kWordOptionStemming 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kWordOptionStemming 0x00000002L

Description

Find not only the specified word, but other words that have the same stem (for example, run and ran have the same stem).


File: SrchType.h
Line: 30
kWordOptionWholeWord 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kWordOptionWholeWord 0x00000040L

File: SrchType.h
Line: 55
SCALEALL_3D_CURSOR 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SCALEALL_3D_CURSOR 1312

File: AVExpT.h
Line: 4378
SCROLL_CURSOR 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SCROLL_CURSOR 1316

File: AVExpT.h
Line: 4388
SpellerHFT_LATEST_VERSION 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SpellerHFT_LATEST_VERSION SpellerHFT_VERSION_1_3

File: Speller_Sel.h
Line: 45
SpellerHFT_NAME 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SpellerHFT_NAME "Spell"

File: Speller_Sel.h
Line: 41
SpellerHFT_VERSION_1_1 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SpellerHFT_VERSION_1_1 0x00010001

File: Speller_Sel.h
Line: 42
SpellerHFT_VERSION_1_2 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SpellerHFT_VERSION_1_2 0x00010002

File: Speller_Sel.h
Line: 43
SpellerHFT_VERSION_1_3 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SpellerHFT_VERSION_1_3 0x00010003

File: Speller_Sel.h
Line: 44
SpellerNum_SEL 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SpellerNum_SEL SpellerLast_SEL - 1

File: Speller_Sel.h
Line: 40

Typedefs Detail
HyphenationRecord 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_HyphenationRecord HyphenationRecord;

File: Speller_Sel.h
Line: 349
HyphenationRecordPtr 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef HyphenationRecord HyphenationRecordPtr;

File: Speller_Sel.h
Line: 351
SpellCheckParam 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef SpellCheckParam SpellCheckParam;

This parameter block is used for communication between the Spelling plug-in and a client plug-in. The client must allocate it, initialize all fields, and pass it to the Spelling plug-in when adding a domain with SpellAddDomain(). Spelling passes it back to the client when the SCEnableProc(), SCGetTextProc(), and SCCompletionProc() are called. It is passed to the client's SCGetTextProc() from the Spelling plug-in when it needs to request a text buffer from the client. After the user has completed the spell check on the scInBuffer, this same parameter block is passed to the client's SCCompletionProc() with the result of the spell check in scOutBuffer. When the SCGetTextProc() is called, scPageNum, scIndex and scAVDoc are filled in by the Spelling plugin.

The SCGetTextProc should fill in scInBuffer and clear scOutBuffer if it is not already NULL.

When the spell check is completed, SCCompletionProc() is called with scOutBuffer if the user made changes to scInBuffer. Note that the spelling client is responsible for all memory allocated including the scOutBuffer returned from the Spelling plug-in. The client is responsible for all parameters except where indicated.


File: Speller_Sel.h
Line: 118
SpellCheckParamPtr 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef SpellCheckParam SpellCheckParamPtr;

File: Speller_Sel.h
Line: 120

Enumeration Detail
eHyphenType
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum eHyphenType {
 kHyphen_all = -1,
 
 kHyphenType_preferred = 0,
 
 kHyphenType_normal,
 
 kHyphenType_nonpreferred
}

File: Speller_Sel.h
Line: 322

SpellDialogResult 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum SpellDialogResult {
 kSpellDone = 0,
 
 kSpellCompleted,
 
 kSpellFailed = -1,
 
 kSpellResultLast
}

See Also


File: Speller_Sel.h
Line: 55

Elements
kSpellDone  

The user clicked the Done button to dismiss the dialog box and did not complete the spell check, but may have made changes to the text buffer.

 
kSpellCompleted  

The user completed spell checking the input buffer, or all words were correct. A new text buffer is returned if corrections where made.

 
kSpellFailed  

The spell check dialog box failed due to an internal error.

 
SpellDomainFlags 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum SpellDomainFlags {
 kSpellFlagNone = 0x0000,
 
 kSpellFlagAllDomain = 0x0001,
 
 kSpellCheckStart = 0x0002,
 
 kSpellFlagLast = 0xFFFF
}

File: Speller_Sel.h
Line: 82

Elements
kSpellFlagNone  

Default domain behavior.

 
kSpellFlagAllDomain  

For Acrobat 5 and later, all registered spelling domains should set this flag. Only the All domains are called by spelling when the user clicks the Start button on the Spell Check dialog box.

 
kSpellCheckStart  

Announce to the client that the spell dialog box has just been popped.

 
Variables Detail
gSpellerHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

HFT gSpellerHFT;

File: SpellerHFT.h
Line: 38

Structure Detail
_t_HyphenationRecord
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _t_HyphenationRecord {
 eHyphenType eType; 
 
 ASInt32 nPosition; 
 
 ASText astLeft; 
 
 ASText astRight; 
}

The hyphenation record.

One of these is returned by HyphenateWord() in the optional hyphenation array for each known hyphenation.


File: Speller_Sel.h
Line: 338

Elements
eType  

The type of hyphenation: preferred, normal, or non-preferred.

 
nPosition  

The hyphen index. The hyphen should follow this character.

 
astLeft  

The word part before the hyphen.

 
astRight  

The word part after the hyphen.

SpellCheckParam 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct SpellCheckParam {
 ASInt16 scVersion; 
 
 ASInt16 scFlags; 
 
 char scName[kSpellMaxName]; 
 
 SCEnableProc scEnableProc; 
 
 SCGetTextProc scGetTextProc; 
 
 SCCompletionProc scCompletionProc; 
 
 AVDoc scAVDoc; 
 
 ASInt32 scPageNum; 
 
 ASInt32 scIndex; 
 
 char* scInBuffer; 
 
 char* scOutBuffer; 
 
 void* scClientData; 
 
 ASText scInBufferASText; 
 
 ASConstText scOutBufferAStext; 
 
 SCChangeProc scChangeProc; 
 
 ASConstText scChangeText; 
 
 ASInt32 scChangeStart; 
 
 ASInt32 scChangeEnd; 
 
 ASConstText scMenuTitle; 
}

Spell Check parameters This parameter block is used for communication between the Spelling plug-in and a client plug-in. The client must allocate it, initialize all fields, and pass it to the Spelling plug-in when adding a domain with SpellAddDomain. Spelling passes it back to the client when the SCEnableProc(), SCGetTextProc(), and SCCompletionProc() are called.

It is passed to the client's SCGetTextProc() from the Spelling plug-in when it needs to request a text buffer from the client. After the user has completed the spell check on the scInBuffer, this same parameter block is passed to the client's SCCompletionProc() with the result of the spell check in scOutBuffer. When the SCGetTextProc() is called, scPageNum, scIndex and scAVDoc are filled in by the Spelling plugin.

The SCGetTextProc should fill in scInBuffer and clear scOutBuffer if it is not already NULL.

When the spell check is completed, SCCompletionProc() is called with scOutBuffer if the user made changes to scInBuffer.

Note that the spelling client is responsible for all memory allocated including the scOutBuffer returned from the Spelling plug-in. The client is responsible for all parameters except where indicated.


File: Speller_Sel.h
Line: 252

Elements
scVersion  

Version number of this structure (kSCparam_LATEST_VERSION).

 
scFlags  

Domain control flags; see SpellDomainFlags. It should normally be set to kSpellFlagAllDomain.

 
scName  

This name will be returned by SpellDomainNames().

 
scAVDoc  

(Passed by Spelling plug-in) The active AVDoc during this Spell Check session.

 
scPageNum  

(Passed by Spelling plug-in) The 0-based PDDoc page number of scAVDoc.

 
scIndex  

(Passed by Spelling plug-in) The 0-based index of this domain item. The Spelling plug-in will set scIndex to zero to start or restart, and request the first text buffer from this domain on scPageNum.

The Spelling plug-in will increment scIndex after each call to scGetTextProc. The client can increment scIndex if desired to track non-sequential domain items.

 
scInBuffer  

The text buffer from the client to the Spelling plug-in when scGetTextProc() is called by the Spelling plug-in.

 
scOutBuffer  

(Passed by Spelling plug-in) The buffer returned from the Spelling plug-in to scCompletionProc(). Note that the client must release this memory.

 
scClientData  

Can be used by the client to store private state data. The client is responsible for allocating memory where necessary.

 
scInBufferASText  

The text buffer from the client to the Spelling plug-in when scGetTextProc is called by the Spelling plug-in. Note that the client must release this memory.

 
scOutBufferAStext  

Returned buffer from Spelling PI to scCompletionProc().

 
scChangeProc  

This optional callback will be invoked each time scOutBufferAStext is about to change.

 
scChangeText  

New text that will replace the text from scChangeStart to scChangeEnd.

 
scChangeStart  

Character offset of the start of the change when scChangeProc() is called

 
scChangeEnd  

Character offset of the end of the change when scChangeProc() is called

 
scMenuTitle  

The menu title in case this is the only enabled domain (for example, "In Form Fields..." or "In Comments...").

Callbacks Detail
SCChangeProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*SCChangeProc)(SpellCheckParamPtr scp)

Called by the Spelling plug-in each time scOutBufferAStext is about to change. An SCChangeProc() is optional.

See Also

Exceptions

None

File: Speller_Sel.h
Line: 206
SCCompletionProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*SCCompletionProc)(SpellCheckParamPtr scp)

An SCCompletionProc() must be provided for each domain a plug-in registers with SpellAddDomain(). It is called by the Spelling plug-in when the user has completed the spell check.

See Also


File: Speller_Sel.h
Line: 188
SCEnableProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*SCEnableProc)(SpellCheckParamPtr scp)

Called by the Spelling plug-in to determine whether the Spelling menu items and toolbar button should be enabled. An SCEnableProc() must be provided for each domain a plug-in registers with SpellAddDomain().

See Also


File: Speller_Sel.h
Line: 145
SCGetTextProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*SCGetTextProc)(SpellCheckParamPtr scp)

This procedure is called by Spelling to request a text buffer to be checked by the user in the Spelling dialog box.

See Also


File: Speller_Sel.h
Line: 167
SCInitProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*SCInitProc)(void *clientData)

File: Speller_Sel.h
Line: 125
SCRTFChangeProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*SCRTFChangeProc)(void *vReserved, ASConstText astNewText, ASInt32 nStartIndex, ASInt32 nEndIndex, void *vData)

Callback proc for SpellCheckRTF. This proc is called each time the user changes something in the original input buffer. This allows the caller of SpellCheckRTF() to track text changes to a rich text buffer and overlay the plain text change onto the rich text spans to perserve formatting.

See Also


File: Speller_Sel.h
Line: 221
SCTermProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*SCTermProc)(void *clientData)

File: Speller_Sel.h
Line: 127

Method Detail
SpellAddDictionary()
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellAddDictionary(char* cName, char* cFile, ASBool bShow)

Parameters

cName
 
cFile
 
bShow

Returns

File: SpellerHFTProcs.h
Line: 59
SpellAddDomain() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellAddDomain(SpellCheckParamPtr scp)

Parameters

scp

Returns

File: SpellerHFTProcs.h
Line: 55
SpellAddWord() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellAddWord(char* cWord)

Parameters

cWord

Returns

File: SpellerHFTProcs.h
Line: 63
SpellCheck() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

char* SpellCheck(AVDoc avd, const char* textBuffer, ASInt16* dialogResult, ASBool bReserved, char** dictionaryArray, ASInt32 dictionaryCount)

Parameters

avd
 
textBuffer
 
dialogResult
 
bReserved
 
dictionaryArray
 
dictionaryCount

Returns

File: SpellerHFTProcs.h
Line: 50
SpellCheckRTF() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 SpellCheckRTF(AVDoc avd, void* vReserved, ASText astPlainText, char** dictionaryArray, ASInt32 dictionaryCount, SCRTFChangeProc pRTFchangeProc, void* vClientData)

Parameters

avd
 
vReserved
 
astPlainText
 
dictionaryArray
 
dictionaryCount
 
pRTFchangeProc
 
vClientData

Returns

File: SpellerHFTProcs.h
Line: 78
SpellCheckText() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellCheckText(AVDoc avd, const char* textBuffer, ASUns32* startOffset, ASUns32* endOffset, char** dictionaryArray, ASInt32 dictionaryCount)

Parameters

avd
 
textBuffer
 
startOffset
 
endOffset
 
dictionaryArray
 
dictionaryCount

Returns

File: SpellerHFTProcs.h
Line: 51
SpellCheckWord() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellCheckWord(AVDoc avd, const char* cWord, char** dictionaryArray, ASInt32 dictionaryCount, char*** alternativeArrayPtr, ASInt32* alternativeCount)

Parameters

avd
 
cWord
 
dictionaryArray
 
dictionaryCount
 
alternativeArrayPtr
 
alternativeCount

Returns

File: SpellerHFTProcs.h
Line: 52
SpellCountKnownWords() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 SpellCountKnownWords(const char* textBuffer, ASInt32 dictionaryCount, char** dictionaryArray, ASInt32* counterArray)

Parameters

textBuffer
 
dictionaryCount
 
dictionaryArray
 
counterArray

Returns

File: SpellerHFTProcs.h
Line: 70
SpellCustomDictionaryClose() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellCustomDictionaryClose(ASText astName)

Parameters

astName

Returns

File: SpellerHFTProcs.h
Line: 85
SpellCustomDictionaryCreate() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellCustomDictionaryCreate(ASText astName, ASText astLanguage, ASBool bShow)

Parameters

astName
 
astLanguage
 
bShow

Returns

File: SpellerHFTProcs.h
Line: 86
SpellCustomDictionaryDelete() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellCustomDictionaryDelete(ASText astName)

Parameters

astName

Returns

File: SpellerHFTProcs.h
Line: 87
SpellCustomDictionaryExport() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellCustomDictionaryExport(ASText astName, ASPathName folderPath, void* reserved)

Parameters

astName
 
folderPath
 
reserved

Returns

File: SpellerHFTProcs.h
Line: 88
SpellCustomDictionaryOpen() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellCustomDictionaryOpen(ASText astName, ASPathName filePath, ASBool bShow)

Parameters

astName
 
filePath
 
bShow

Returns

File: SpellerHFTProcs.h
Line: 89
SpellDictionaryNames() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellDictionaryNames(char*** dictionaryArrayPtr, ASInt32* dictionaryCount)

Parameters

dictionaryArrayPtr
 
dictionaryCount

Returns

File: SpellerHFTProcs.h
Line: 58
SpellDomainNames() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellDomainNames(char*** domainArrayPtr, ASInt32* domainCount)

Parameters

domainArrayPtr
 
domainCount

Returns

File: SpellerHFTProcs.h
Line: 54
SpellGetDocDictionaryOrder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellGetDocDictionaryOrder(AVDoc avd, char*** dictionaryArrayPtr, ASInt32* dictionaryCount)

Parameters

avd
 
dictionaryArrayPtr
 
dictionaryCount

Returns

File: SpellerHFTProcs.h
Line: 67
SpellGetDocLanguageOrder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellGetDocLanguageOrder(AVDoc avd, char*** languageArrayPtr, ASInt32* languageCount)

Parameters

avd
 
languageArrayPtr
 
languageCount

Returns

File: SpellerHFTProcs.h
Line: 82
SpellGetNextWord() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASText SpellGetNextWord(ASConstText inBuffer, ASInt32* nStart, ASInt32* nEnd, ASBool bFilter)

Parameters

inBuffer
 
nStart
 
nEnd
 
bFilter

Returns

File: SpellerHFTProcs.h
Line: 76
SpellHyphenateWord() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 SpellHyphenateWord(AVDoc avd, const ASText astWord, char** dictionaryArray, ASInt32 dictionaryCount, HyphenationRecordPtr* hyphenationArrayPtr)

Parameters

avd
 
astWord
 
dictionaryArray
 
dictionaryCount
 
hyphenationArrayPtr

Returns

File: SpellerHFTProcs.h
Line: 74
SpellIgnoreAll() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellIgnoreAll(AVDoc avd, char* cWord)

Parameters

avd
 
cWord

Returns

File: SpellerHFTProcs.h
Line: 72
SpellLanguages() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellLanguages(char*** languageArrayPtr, ASInt32* languageCount)

Parameters

languageArrayPtr
 
languageCount

Returns

File: SpellerHFTProcs.h
Line: 80
SpellRemoveDictionary() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellRemoveDictionary(char* cName)

Parameters

cName

Returns

File: SpellerHFTProcs.h
Line: 60
SpellRemoveDomain() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellRemoveDomain(SpellCheckParamPtr scp)

Parameters

scp

Returns

File: SpellerHFTProcs.h
Line: 56
SpellRemoveWord() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellRemoveWord(char* cWord)

Parameters

cWord

Returns

File: SpellerHFTProcs.h
Line: 64
SpellSetDocDictionaryOrder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellSetDocDictionaryOrder(AVDoc avd, char** dictionaryArray, ASInt32 dictionaryCount)

Parameters

avd
 
dictionaryArray
 
dictionaryCount

Returns

File: SpellerHFTProcs.h
Line: 68
SpellSetDocLanguageOrder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellSetDocLanguageOrder(AVDoc avd, char** languageArray, ASInt32 languageCount)

Parameters

avd
 
languageArray
 
languageCount

Returns

File: SpellerHFTProcs.h
Line: 83
SpellUserDictionaryOrder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellUserDictionaryOrder(char*** dictionaryArrayPtr, ASInt32* dictionaryCount)

Parameters

dictionaryArrayPtr
 
dictionaryCount

Returns

File: SpellerHFTProcs.h
Line: 66
SpellUserLanguageOrder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellUserLanguageOrder(char*** languageArrayPtr, ASInt32* languageCount)

Parameters

languageArrayPtr
 
languageCount

Returns

File: SpellerHFTProcs.h
Line: 81
SpellUserWords() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool SpellUserWords(ASBool bAdded, char*** wordArrayPtr, ASInt32* wordCount)

Parameters

bAdded
 
wordArrayPtr
 
wordCount

Returns

File: SpellerHFTProcs.h
Line: 62