sptk2 logo
SPTK Home Page

sptk::CSpellChecker Class Reference
[GUI Classes]

CSpellChecker is a base class for Aspell interface. More...

#include <CEditorSpellChecker.h>

Inheritance diagram for sptk::CSpellChecker:

sptk::CSpellOptions sptk::CDialog sptk::CWindow sptk::CLayoutManager sptk::CWindowShape sptk::CLayoutClient sptk::CEditorSpellChecker

List of all members.

Public Member Functions

 CSpellChecker ()
 Default constructor.
virtual ~CSpellChecker ()
 Destructor.
void selectDictionary (std::string dictionary)
void languageDataDirectory (std::string path)
 Defines the directory where Aspell data (language) files are stored.
void dictionaryDirectory (std::string path)
 Defines the directory where Aspell dictionary files are stored.
void getDictionaries (CStrings &dictionaries)
 Downloads the list of installed dictionaries.
void getOptions (CSpellOptions &options)
 Downloads the Aspell options.
virtual void textStart ()=0
 Resets the spell check position. Purely virtual, should be implemented in the derived class.
virtual bool getNextWord (std::string &w, int &wordStart, int &wordEnd)
 Gets the next word and advances the spell check position. Purely virtual, should be implemented in the derived class.
virtual bool replaceWord (const std::string &w, int wordStart, int wordEnd)
 Replaces the word and advances the spell check position. Purely virtual, should be implemented in the derived class.
bool spellCheck ()
 Spell checks the text. Uses textStart(), getNextWord(), and replaceWord() to go through the text.
CSpellOptionoperator[] (std::string optionName)
 Access (read and write) to the particular Aspell option.

Protected Member Functions

void learnAndClose ()
 Adds a word to personal dictionary and hides window to continue spelling.
void ignoreAndClose ()
 Adds a word to ignore list and hides window to continue spelling.
void checkForError ()
 Checks for error after the operation and throws CException if error is detected.

Static Protected Member Functions

static void cb_learn (Fl_Widget *, void *)
 Callback for the add word button.
static void cb_ignore (Fl_Widget *, void *)
 Callback for the ignore word button.
static void cb_suggest (Fl_Widget *, void *)
 Callback for the suggestion list click.
static void cb_replaceword (Fl_Widget *, void *)
 Callback for the replace word button.


Detailed Description

CSpellChecker is a base class for Aspell interface.

Member Function Documentation

void sptk::CSpellChecker::selectDictionary ( std::string  dictionary  ) 

Sets the dictionary for the spell checking

See also:
getDictionaries for obtaining the list of available dictionaries


The documentation for this class was generated from the following file:

Mon Mar 5 11:56:13 2012: SPTK 3.5.7