]> git.lyx.org Git - lyx.git/blob - src/sp_ispell.h
some more changes
[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         /// initialize spell checker
27         void initialize(BufferParams const & params, string const & lang);
28         ///
29         bool alive();
30         /// clean up after error
31         void cleanUp();
32         /// check word
33         enum spellStatus check(string const & word);
34         /// close spellchecker
35         void close();
36         ///
37         void insert(string const & word);
38         ///
39         void accept(string const & word);
40         /// store replacement
41         void store(string const & mis, string const & cor);
42         ///
43         char const * nextMiss();
44         ///
45         char const * error();
46
47 private:
48         ///
49         ActualSpellChecker actual_spell_checker;
50         /// instream to communicate with ispell
51         FILE * in;
52         /// outstream to communicate with ispell
53         FILE * out;
54         /// spell error
55         char const * error_;
56         /// ?
57         int isp_fd;
58         ///
59         char * str;
60         ///
61         spellStatus flag;
62         ///
63         char * b;
64         ///
65         char * e;
66
67 };
68
69 #endif