]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormThesaurus.h
Add fl_set_input_return to input_paperoption.
[lyx.git] / src / frontends / xforms / FormThesaurus.h
1 // -*- C++ -*-
2 /**
3  * \file FormThesaurus.h
4  * Copyright 2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author John Levon
8  */
9
10 #ifndef FORMTHESAURUS_H
11 #define FORMTHESAURUS_H
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "FormBase.h"
18
19 class ControlThesaurus;
20 struct FD_form_tabbed_thesaurus;
21 struct FD_form_noun;
22 struct FD_form_verb;
23 struct FD_form_adjective;
24 struct FD_form_adverb;
25 struct FD_form_other;
26
27 /** This class provides an XForms implementation of the Thesaurus dialog.
28  */
29 class FormThesaurus : public FormCB<ControlThesaurus, FormDB<FD_form_tabbed_thesaurus> > {
30 public:
31         ///
32         FormThesaurus(ControlThesaurus &);
33  
34 private:
35         /// not needed.
36         virtual void apply() {}
37         /// Build the dialog
38         virtual void build();
39         /// update dialog
40         virtual void update();
41         /// redraw
42         virtual void redraw();
43
44         /// set the replace word properly
45         void setReplace(const string & templ, const string & nstr);
46
47         /// update browser entries
48         void updateEntries(const string & str);
49
50         /// Filter the inputs
51         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
52  
53         /// Fdesign generated methods
54         FD_form_tabbed_thesaurus  * build_tabbed_thesaurus();
55         FD_form_noun * build_noun();
56         FD_form_verb * build_verb();
57         FD_form_adjective * build_adjective();
58         FD_form_adverb * build_adverb();
59         FD_form_other * build_other();
60
61         /// Real GUI implementations of sub-forms
62         boost::scoped_ptr<FD_form_noun> noun_;
63         boost::scoped_ptr<FD_form_verb> verb_;
64         boost::scoped_ptr<FD_form_adjective> adjective_;
65         boost::scoped_ptr<FD_form_adverb> adverb_;
66         boost::scoped_ptr<FD_form_other> other_;
67
68         /// for double click handling
69         int clickline_;
70
71         /// current string
72         string str_;
73 };
74
75 #endif // FORMTHESAURUS_H