]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QRef.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / QRef.h
1 // -*- C++ -*-
2 /**
3  * \file QRef.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 Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef QREF_H
13 #define QREF_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "Qt2Base.h"
20 #include <vector>
21 #include "LString.h"
22
23 class ControlRef;
24 class QRefDialog;
25
26
27 class QRef
28         : public Qt2CB<ControlRef, Qt2DB<QRefDialog> >
29 {
30 public:
31         friend class QRefDialog;
32
33         QRef();
34 private:
35         /// apply changes
36         virtual void apply();
37         /// build dialog
38         virtual void build_dialog();
39         /// update dialog
40         virtual void update_contents();
41
42         /// is name allowed for this ?
43         bool nameAllowed();
44
45         /// is type allowed for this ?
46         bool typeAllowed();
47
48         /// go to current reference
49         void gotoRef();
50
51         /// set go back button
52         void setGoBack();
53
54         /// set goto ref button
55         void setGotoRef();
56
57         /// re-enter references
58         void redoRefs();
59
60         /// update references
61         void updateRefs();
62
63         /// sort or not persistent state
64         bool sort_;
65
66         /// at a reference ?
67         bool at_ref_;
68
69         /// the references
70         std::vector<string> refs_;
71 };
72
73 #endif // QREF_H