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