]> git.lyx.org Git - lyx.git/blob - src/sp_pspell.h
dont delere recursively, return a value from event_cb
[lyx.git] / src / sp_pspell.h
1 #ifndef SP_PSPELL_H
2 #define SP_PSPELL_H
3
4 #include "sp_base.h"
5
6 class PspellManager;
7 class PspellStringEmulation;
8 class PspellCanHaveError;
9
10 class BufferParams;
11
12
13 class PSpell : public SpellBase
14 {
15   public:
16
17     PSpell();
18     
19     PSpell(BufferParams const & params, string const & lang);
20     
21     ~PSpell();
22
23     /// initialize spell checker
24     void initialize(BufferParams const & params, string const & lang);
25
26     bool alive() { return alive_; }
27
28     /// clean up after error
29     void cleanUp();
30
31     /// check word
32     enum spellStatus check(string const & word);
33
34     /// close spellchecker
35     void close();
36
37     void insert(string const & word);
38
39     void accept(string const & word);
40
41     /// store replacement
42     void store(string const & mis, string const & cor);
43      
44     char const * nextMiss();
45
46     char const * error();
47    
48   private:
49
50     PspellManager * sc;
51     
52     PspellStringEmulation * els;
53
54     PspellCanHaveError * spell_error_object;
55
56     spellStatus flag;
57
58     const char * error_;
59
60     bool alive_;
61 };
62    
63 #endif
64
65