]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GThesaurus.h
Extracted from r14281
[lyx.git] / src / frontends / gtk / GThesaurus.h
1 // -*- C++ -*-
2 /**
3  * \file GThesaurus.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Bernhard Reiter
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GTHESAURUS_H
13 #define GTHESAURUS_H
14
15 #include "GViewBase.h"
16
17 namespace lyx {
18 namespace frontend {
19
20 class ControlThesaurus;
21
22 /** This class provides a GTK+ implementation of the Thesaurus Dialog.
23  */
24 class GThesaurus : public GViewCB<ControlThesaurus, GViewGladeB> {
25 public:
26         GThesaurus(Dialog & parent);
27 private:
28         virtual void apply();
29         virtual void doBuild();
30         virtual void update();
31
32         /// updates the synonym list (e.g. when the keyword is changed)
33         void update_lists();
34         /// enables the apply button if a synonym is selected from the list
35         void selection_changed();
36         /// changes the keyword entry content to the synonym double-clicked on
37         void meaningsview_activated(const Gtk::TreeModel::Path&, Gtk::TreeViewColumn*);
38
39         /** apply() won't act when this is true.
40             true if no text is selected when the thesaurus dialog is opened
41          */
42         bool applylock_;
43
44         Gtk::Button * cancelbutton_;
45         Gtk::Button * okbutton_;
46         Gtk::Button * applybutton_;
47         Gtk::Entry * keywordentry_;
48         Gtk::TreeView * meaningsview_;
49         Glib::RefPtr<Gtk::TreeStore> synTreeStore_;
50
51 };
52
53 } // namespace frontend
54 } // namespace lyx
55
56 #endif // GTHESAURUS_H