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.
18 #include "SpellBase.h"
21 class AspellStringEnumeration;
22 class AspellCanHaveError;
28 class ASpell : public SpellBase {
31 * Initialise the spellchecker with the given buffer params and language.
33 ASpell(BufferParams const & params, std::string const & lang);
38 * return true if the spellchecker instance still exists
39 * Always true for aspell, since there is no separate process
41 virtual bool alive() { return true; }
43 /// check the given word and return the result
44 virtual enum Result check(WordLangTuple const &);
46 /// insert the given word into the personal dictionary
47 virtual void insert(WordLangTuple const &);
49 /// accept the given word temporarily
50 virtual void accept(WordLangTuple const &);
52 /// return the next near miss after a SUGGESTED_WORDS result
53 virtual std::string const nextMiss();
55 /// give an error message on messy exit
56 virtual lyx::docstring const error();
59 /// add a speller of the given language
60 void addSpeller(std::string const & lang);
63 AspellSpeller * speller;
64 AspellConfig * config;
67 typedef std::map<std::string, Speller> Spellers;
73 AspellStringEnumeration * els;
75 AspellCanHaveError * spell_error_object;
78 #endif // LYX_ASPELL_H