]> git.lyx.org Git - lyx.git/blob - src/sp_ispell.h
fix typo that put too many include paths for most people
[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     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