]> git.lyx.org Git - lyx.git/blob - src/pspell.h
cosmetics: make the hand-drawn root more similr to what LaTeX does
[lyx.git] / src / pspell.h
1 /**
2  * \file pspell.h
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author Kevin Atkinson
7  * \author John Levon <levon@movementarian.org>
8  */
9
10 #ifndef LYX_PSPELL_H
11 #define LYX_PSPELL_H
12
13 #include "SpellBase.h"
14
15 class PspellManager;
16 class PspellStringEmulation;
17 class PspellCanHaveError;
18
19 class BufferParams;
20
21
22 class PSpell : public SpellBase {
23 public:
24         /**
25          * Initialise the spellchecker with the given buffer params and language.
26          */
27         PSpell(BufferParams const & params, string const & lang);
28
29         virtual ~PSpell();
30
31         /// return true if the spellchecker instance still exists
32         virtual bool alive() { return alive_; }
33
34         /// clean up on messy exit
35         virtual void cleanUp();
36
37         /// check the given word and return the result
38         virtual enum Result check(string const & word);
39
40         /// finish this spellchecker instance
41         virtual void close();
42
43         /// insert the given word into the personal dictionary
44         virtual void insert(string const & word);
45
46         /// accept the given word temporarily
47         virtual void accept(string const & word);
48
49         /// return the next near miss after a MISSED result
50         virtual string const nextMiss();
51
52         /// give an error message on messy exit 
53         virtual string const error();
54
55 private:
56         /// main manager
57         PspellManager * sc;
58         /// FIXME
59         PspellStringEmulation * els;
60         /// FIXME
61         PspellCanHaveError * spell_error_object;
62         /// initialised properly ?
63         bool alive_;
64 };
65
66 #endif // PSPELL_H