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"
24 class PspellStringEmulation;
25 class PspellCanHaveError;
31 class PSpell : public SpellBase {
34 * Initialise the spellchecker with the given buffer params and language.
36 PSpell(BufferParams const & params, std::string const & lang);
41 * return true if the spellchecker instance still exists
42 * Always true for pspell, since there is no separate process
44 virtual bool alive() { return true; }
46 /// check the given word and return the result
47 virtual enum Result check(WordLangTuple const &);
49 /// insert the given word into the personal dictionary
50 virtual void insert(WordLangTuple const &);
52 /// accept the given word temporarily
53 virtual void accept(WordLangTuple const &);
55 /// return the next near miss after a SUGGESTED_WORDS result
56 virtual std::string const nextMiss();
58 /// give an error message on messy exit
59 virtual docstring const error();
62 /// add a manager of the given language
63 void addManager(std::string const & lang);
66 PspellManager * manager;
67 PspellConfig * config;
70 typedef std::map<std::string, struct Manager> Managers;
76 PspellStringEmulation * els;
78 PspellCanHaveError * spell_error_object;
84 #endif // LYX_PSPELL_H