]> git.lyx.org Git - lyx.git/blob - src/sp_ispell.h
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / sp_ispell.h
1 #ifndef SP_ISPELL_H
2 #define SP_ISPELL_H
3
4 #include "sp_base.h"
5
6 class BufferParams;
7
8
9 class ISpell : public SpellBase
10 {
11   public:
12
13     enum ActualSpellChecker {
14                 ASC_ISPELL,
15                 ASC_ASPELL
16     };
17     
18     ISpell();
19     
20     ISpell(BufferParams const & params, string const & lang);
21     
22     ~ISpell();
23
24
25     /// initialize spell checker
26     void initialize(BufferParams const & params, string const & lang);
27
28     bool alive();
29
30     /// clean up after error
31     void cleanUp();
32
33     /// check word
34     enum spellStatus check(string const & word);
35
36     /// close spellchecker
37     void close();
38
39     void insert(string const & word);
40
41     void accept(string const & word);
42
43     /// store replacement
44     void store(string const & mis, string const & cor);
45      
46     void sigchldhandler(pid_t pid, int *status);
47
48     char const * nextMiss();
49
50     char const * error();
51    
52   private:
53
54     ActualSpellChecker actual_spell_checker;   
55
56     /// instream to communicate with ispell
57     FILE * in;
58
59     /// outstream to communicate with ispell
60     FILE * out;
61
62     /// spell error
63     char const * error_;
64
65     /// ?
66     int isp_fd;
67
68     ///
69     char * str;
70     ///
71     spellStatus flag;
72     ///
73     char * b;
74     ///
75     char * e;
76    
77 };
78    
79 #endif
80
81