4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
16 #include "support/strfwd.h"
25 * Pure virtual base class of all spellchecker implementations.
30 /// the result from checking a single word
34 /// root of given word was found
36 /// word found through compound formation
40 /// not found, with suggestions
42 /// number of other ignored "word"
46 virtual ~SpellChecker() {}
48 /// check the given word of the given lang code and return the result
49 virtual enum Result check(WordLangTuple const &) = 0;
52 /// insert the given word into the personal dictionary
53 virtual void insert(WordLangTuple const &) = 0;
55 /// accept the given word temporarily
56 virtual void accept(WordLangTuple const &) = 0;
58 /// return the next near miss after a SUGGESTED_WORDS result
59 virtual docstring const nextMiss() = 0;
61 /// give an error message on messy exit
62 virtual docstring const error() = 0;
65 /// Access to the singleton SpellChecker.
66 /// Implemented in LyX.cpp
67 SpellChecker * theSpellChecker();
71 #endif // SPELL_BASE_H