4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Kevin Atkinson
10 * Full author contact details are available in file CREDITS.
16 #include "SpellChecker.h"
22 struct AspellStringEnumeration;
23 struct AspellCanHaveError;
31 class ASpell : public SpellChecker {
34 * Initialise the spellchecker with the given buffer params and language.
36 ASpell(BufferParams const & params, std::string const & lang);
40 /// check the given word and return the result
41 virtual enum Result check(WordLangTuple const &);
43 /// insert the given word into the personal dictionary
44 virtual void insert(WordLangTuple const &);
46 /// accept the given word temporarily
47 virtual void accept(WordLangTuple const &);
49 /// return the next near miss after a SUGGESTED_WORDS result
50 virtual docstring const nextMiss();
52 /// give an error message on messy exit
53 virtual docstring const error();
56 /// add a speller of the given language
57 void addSpeller(std::string const & lang);
60 AspellSpeller * speller;
61 AspellConfig * config;
64 typedef std::map<std::string, Speller> Spellers;
70 AspellStringEnumeration * els;
72 AspellCanHaveError * spell_error_object;
78 #endif // LYX_ASPELL_H