TRVACustomSpellInterface

<< Click to display table of contents >>

TRVACustomSpellInterface

A base class for RichViewActions spelling check interface components.

Unit RVADownloadInterface;

TRVACustomDownloadInterface = class (TComponent);

hmtoggle_arrow1Hierarchy

Description

This component is not used directly. Instead, use one of the following components inherited from it:

TRVAAddictSpellInterface (to use Addict)

TRVAASpellInterface (to use ASpell)

TRVADXSpellInterface (to use ExpressSpellChecker)

TRVAHunSpellInterface (to use HunSpell)

TRVAPolarSpellInterface (to use Polar SpellChecker)

To use a spelling check interface component, assign it to SpellInterface property of TRVAControlPanel component.

Then you can:

use TrvActionSpellingCheck action

use TrvActionThesaurus action (if the chosen interface component supports a thesaurus)

call its AutoCorrectInKeyDown in the editor's OnKeyDown event and AutoCorrectInKeyPress in the editor's OnKeyPress (in OnUTF8KeyPress for Lazarus) event to perform auto-correction on typing (if the chosen interface component supports an auto-correction)

assign the inverted result of its IsWordValid method to the Misspelled parameter of the editor's OnSpellingCheck event to perform a live spelling check.

Methods [VCL]

function AutoCorrectInKeyDown(Editor: TCustomRichViewEdit;

  Key: Word): Boolean;
function AutoCorrectInKeyPress(Editor: TCustomRichViewEdit;

  Key: Char): Boolean;
function IsWordValid(const S: TRVUnicodeString;

  rv: TCustomRichView; StyleNo: Integer): Boolean; 

  virtualabstract;

Methods [FPC]

For Lazarus, the methods are the same, with the small difference:

function AutoCorrectInKeyPress(Editor: TCustomRichViewEdit;
  Key: TUTF8Char): Boolean;

 

See also:

RichViewActions spelling check interfaces