4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "GuiDialog.h"
17 #include "FancyLineEdit.h"
19 #include "insets/InsetCommandParams.h"
23 class QTreeWidgetItem;
28 class GuiRef : public GuiDialog, public Ui::RefUi
34 /// Dialog inherited methods
36 void enableView(bool enable);
40 void changed_adaptor();
43 void refHighlighted(QTreeWidgetItem *);
44 void selectionChanged();
45 void refTextChanged(QString const &);
46 void refSelected(QTreeWidgetItem *);
51 void dialogRejected();
55 bool isBufferDependent() const { return true; }
56 /** disconnect from the inset when the Apply button is pressed.
57 Allows easy insertion of multiple references. */
58 bool disconnectOnApply() const { return true; }
60 void gotoRef(std::string const &);
64 void closeEvent(QCloseEvent * e);
70 void updateContents();
72 /// is name allowed for this ?
74 /// is type allowed for this ?
76 /// go to current reference
78 /// set go back button
80 /// set goto ref button
82 /// re-enter references
87 bool initialiseParams(std::string const & data);
89 void clearParams() { params_.clear(); }
91 void dispatchParams();
95 InsetCommandParams params_;
97 /// contains the search box
98 FancyLineEdit * filter_;
100 /// went to a reference ?
102 /// the last reference entered or examined
103 QString last_reference_;
104 /// store the buffer settings
105 int restored_buffer_;
106 /// store the last active buffer
109 std::vector<docstring> refs_;
112 } // namespace frontend