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();
44 void refHighlighted(QTreeWidgetItem *);
45 void selectionChanged();
46 void refTextChanged(QString const &);
47 void refSelected(QTreeWidgetItem *);
50 void on_buttonBox_clicked(QAbstractButton *);
53 void dialogRejected();
57 bool isBufferDependent() const { return true; }
58 /** disconnect from the inset when the Apply button is pressed.
59 Allows easy insertion of multiple references. */
60 bool disconnectOnApply() const { return true; }
62 void gotoRef(std::string const &);
66 void closeEvent(QCloseEvent * e);
72 void updateContents();
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