]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/FormRef.h
small cleanup, doxygen, formatting changes
[lyx.git] / src / frontends / kde / FormRef.h
1 /**
2  * \file FormRef.h
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon
7  */
8
9 #ifndef FORMREF_H
10 #define FORMREF_H
11
12 #include "DialogBase.h"
13 #include "LString.h"
14 #include "boost/utility.hpp"
15 #include "insets/insetcommand.h"
16
17 class Dialogs;
18 class LyXView;
19 class RefDialog;
20
21 class FormRef : public DialogBase, public noncopyable {
22 public: 
23         FormRef(LyXView *, Dialogs *);
24
25         ~FormRef();
26
27         /// double-click a ref
28         void select(char const *);
29         /// highlight a ref
30         void highlight(char const *);
31         /// set sort
32         void set_sort(bool);
33         /// goto a ref (or back)
34         void goto_ref(); 
35         /// update dialog
36         void update(bool = false); 
37         /// update just the refs
38         void do_ref_update();
39         /// Apply changes
40         void apply();
41         /// close the connections
42         void close();
43  
44 private: 
45         enum GotoType {
46                 GOTOREF, GOTOBACK
47         };
48  
49         /// Create the dialog if necessary, update it and display it.
50         void show();
51         /// Hide the dialog.
52         void hide();
53  
54         /// create a Reference inset
55         void createRef(string const &);
56         /// edit a Reference inset
57         void showRef(InsetCommand * const);
58  
59         /// update the keys list
60         void updateRefs(void);
61  
62         /// Real GUI implementation.
63         RefDialog * dialog_;
64
65         /// the LyXView we belong to
66         LyXView * lv_;
67  
68         /// dialogs object
69         Dialogs * d_;
70  
71         /// pointer to the inset if any
72         InsetCommand * inset_;
73         /// insets params
74         InsetCommandParams params;
75         /// is the inset we are reading from a readonly buffer ?
76         bool readonly;
77         
78         /// Hide connection.
79         Connection h_;
80         /// Update connection.
81         Connection u_;
82         /// Inset hide connection.
83         Connection ih_;
84
85         /// to sort or not to sort
86         bool sort;
87  
88         /// where to go
89         GotoType gotowhere;
90  
91         /// available references
92         std::vector< string > refs;
93 };
94
95 #endif // FORMREF_H