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"
27 * Pure virtual base class of all spellchecker implementations.
32 /// the result from checking a single word
36 /// root of given word was found
38 /// word found through compound formation
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;
51 /// Gives suggestions.
52 virtual void suggest(WordLangTuple const &, docstring_list & suggestions) = 0;
54 /// insert the given word into the personal dictionary
55 virtual void insert(WordLangTuple const &) = 0;
57 /// accept the given word temporarily
58 virtual void accept(WordLangTuple const &) = 0;
60 /// check if dictionary exists
61 virtual bool hasDictionary(Language const *) const = 0;
63 /// give an error message on messy exit
64 virtual docstring const error() = 0;
67 /// Access to the singleton SpellChecker.
68 /// Implemented in LyX.cpp
69 SpellChecker * theSpellChecker();
71 /// Set the singleton SpellChecker engine.
72 /// Implemented in LyX.cpp
73 void setSpellChecker();
77 #endif // SPELL_BASE_H