3 * \file ControlSpellchecker.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef CONTROLSPELLCHECKER_H
13 #define CONTROLSPELLCHECKER_H
15 #include <boost/scoped_ptr.hpp>
17 #include "ControlDialog_impl.h"
19 #include "WordLangTuple.h"
23 /** A controller for Spellchecker dialogs.
25 class ControlSpellchecker : public ControlDialogBD {
28 SPELL_PROGRESSED, //< update progress bar
29 SPELL_FOUND_WORD //< found a bad word
32 ControlSpellchecker(LyXView &, Dialogs &);
34 ~ControlSpellchecker();
36 /// replace word with replacement
37 void replace(string const &);
39 /// replace all occurances of word
40 void replaceAll(string const &);
42 /// insert word in personal dictionary
45 /// ignore all occurances of word
48 /// check text until next misspelled/unknown word
49 /// returns true when finished
53 string const getSuggestion() const;
56 string const getWord() const;
58 /// returns progress value
59 int getProgress() const { return oldval_; }
61 /// returns word count
62 int getCount() const { return count_; }
65 /// give error message is spellchecker dies
68 /// start a spell-checking session
71 /// end a spell-checking session
74 /// show count of checked words at normal exit
77 /// set the params before show or update
83 virtual void apply() {}
85 /// current word being checked and lang code
88 /// values for progress
96 /// The actual spellchecker object
97 boost::scoped_ptr<SpellBase> speller_;
100 #endif // CONTROLSPELLCHECKER_H