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"
26 * Pure virtual base class of all spellchecker implementations.
31 /// the result from checking a single word
35 /// root of given word was found
37 /// word found through compound formation
41 /// number of other ignored "word"
45 virtual ~SpellChecker() {}
47 /// check the given word of the given lang code and return the result
48 virtual enum Result check(WordLangTuple const &) = 0;
50 /// Gives suggestions.
51 virtual void suggest(WordLangTuple const &, docstring_list & suggestions) = 0;
53 /// insert the given word into the personal dictionary
54 virtual void insert(WordLangTuple const &) = 0;
56 /// accept the given word temporarily
57 virtual void accept(WordLangTuple const &) = 0;
59 /// give an error message on messy exit
60 virtual docstring const error() = 0;
63 /// Access to the singleton SpellChecker.
64 /// Implemented in LyX.cpp
65 SpellChecker * theSpellChecker();
67 /// Set the singleton SpellChecker engine.
68 /// Implemented in LyX.cpp
69 void setSpellChecker();
73 #endif // SPELL_BASE_H