X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSpellChecker.h;h=6d8c77df00f6c174e6bd5fea2621a792f31fe6a5;hb=bb80bd78f981c888efcc030168bd4e366b0ca6cd;hp=b46b97400a715be39e632246a8949af9e1eba6c1;hpb=51978827f4d552ea9cdc7f2392f282be222b956b;p=lyx.git diff --git a/src/SpellChecker.h b/src/SpellChecker.h index b46b97400a..6d8c77df00 100644 --- a/src/SpellChecker.h +++ b/src/SpellChecker.h @@ -20,6 +20,7 @@ namespace lyx { class BufferParams; class WordLangTuple; +class docstring_list; /** * Pure virtual base class of all spellchecker implementations. @@ -37,8 +38,6 @@ public: COMPOUND_WORD, /// word not found UNKNOWN_WORD, - /// not found, with suggestions - SUGGESTED_WORDS, /// number of other ignored "word" IGNORED_WORD }; @@ -47,7 +46,9 @@ public: /// check the given word of the given lang code and return the result virtual enum Result check(WordLangTuple const &) = 0; - + + /// Gives suggestions. + virtual void suggest(WordLangTuple const &, docstring_list & suggestions) = 0; /// insert the given word into the personal dictionary virtual void insert(WordLangTuple const &) = 0; @@ -55,9 +56,6 @@ public: /// accept the given word temporarily virtual void accept(WordLangTuple const &) = 0; - /// return the next near miss after a SUGGESTED_WORDS result - virtual docstring const nextMiss() = 0; - /// give an error message on messy exit virtual docstring const error() = 0; }; @@ -66,6 +64,10 @@ public: /// Implemented in LyX.cpp SpellChecker * theSpellChecker(); +/// Set the singleton SpellChecker engine. +/// Implemented in LyX.cpp +void setSpellChecker(); + } // namespace lyx #endif // SPELL_BASE_H