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 "SpellBase.h"
18 #include "support/docstring.h"
24 class AspellStringEnumeration;
25 class AspellCanHaveError;
33 class ASpell : public SpellBase {
36 * Initialise the spellchecker with the given buffer params and language.
38 ASpell(BufferParams const & params, std::string const & lang);
43 * return true if the spellchecker instance still exists
44 * Always true for aspell, since there is no separate process
46 virtual bool alive() { return true; }
48 /// check the given word and return the result
49 virtual enum Result check(WordLangTuple const &);
51 /// insert the given word into the personal dictionary
52 virtual void insert(WordLangTuple const &);
54 /// accept the given word temporarily
55 virtual void accept(WordLangTuple const &);
57 /// return the next near miss after a SUGGESTED_WORDS result
58 virtual std::string const nextMiss();
60 /// give an error message on messy exit
61 virtual docstring const error();
64 /// add a speller of the given language
65 void addSpeller(std::string const & lang);
68 AspellSpeller * speller;
69 AspellConfig * config;
72 typedef std::map<std::string, Speller> Spellers;
78 AspellStringEnumeration * els;
80 AspellCanHaveError * spell_error_object;
86 #endif // LYX_ASPELL_H