]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GSpellchecker.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GSpellchecker.h
1 // -*- C++ -*-
2 /**
3  * \file GSpellchecker.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Spray
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GSPELLCHECKER_H
13 #define GSPELLCHECKER_H
14
15 #include "GViewBase.h"
16
17 namespace lyx {
18 namespace frontend {
19
20 class ControlSpellchecker;
21
22 /** This class provides a GTK+ implementation of the FormSpellchecker Dialog.
23  */
24 class GSpellchecker
25         : public GViewCB<ControlSpellchecker, GViewGladeB> {
26 public:
27
28         GSpellchecker(Dialog &);
29 private:
30         // not needed.
31         virtual void apply() {}
32         // Build the dialog
33         virtual void doBuild();
34
35         virtual void update() {}
36
37         virtual void show();
38
39         // Fill in unknown word, suggestions, progress from backend
40         virtual void partialUpdate(int);
41
42         Glib::RefPtr<Gtk::ListStore> suggestionsstore_;
43         Glib::RefPtr<Gtk::TreeSelection> suggestionssel_;
44
45         Gtk::TreeModelColumn<Glib::ustring> listCol_;
46         Gtk::TreeModel::ColumnRecord listCols_;
47
48         Gtk::TreeView * suggestionsview_;
49         Gtk::Entry * replacemententry_;
50         Gtk::Entry * unknownentry_;
51         Gtk::ProgressBar * progress_;
52         Gtk::Button * ignorebutton_;
53
54         // Replace button
55         void onReplace(bool const all);
56         // Suggestion list single click
57         void onSuggestionSelection();
58         // Suggestion list double click
59         void onSuggestionActivate(Gtk::TreeModel::Path const & path, Gtk::TreeViewColumn * col);
60         // Ignore button
61         void onIgnore();
62         // Ignore All button
63         void onIgnoreAll();
64         // Add button
65         void onAdd();
66 };
67
68 } // namespace frontend
69 } // namespace lyx
70
71 #endif // GSPELLCHECKER_H