]> git.lyx.org Git - lyx.git/blobdiff - src/SpellChecker.h
Update the GuiLabel view when the document is read-only. Also disable the text field.
[lyx.git] / src / SpellChecker.h
index a1ed9ebc7a515a439b4f0c20a82140c9c130fc5a..6d8c77df00f6c174e6bd5fea2621a792f31fe6a5 100644 (file)
@@ -20,10 +20,10 @@ namespace lyx {
 
 class BufferParams;
 class WordLangTuple;
+class docstring_list;
 
 /**
- * Base class of all spellchecker implementations.
- * The class can be instantiated but will have no functionality.
+ * Pure virtual base class of all spellchecker implementations.
  */
 class SpellChecker {
 public:
@@ -38,8 +38,6 @@ public:
                COMPOUND_WORD,
                /// word not found
                UNKNOWN_WORD,
-               /// not found, with suggestions
-               SUGGESTED_WORDS,
                /// number of other ignored "word"
                IGNORED_WORD
        };
@@ -48,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;
@@ -56,13 +56,17 @@ 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;
 };
 
+/// Access to the singleton SpellChecker.
+/// Implemented in LyX.cpp
+SpellChecker * theSpellChecker();
+
+/// Set the singleton SpellChecker engine.
+/// Implemented in LyX.cpp
+void setSpellChecker();
 
 } // namespace lyx