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 /// is name allowed for this ?
78 /// is type allowed for this ?
80 /// go to current reference
82 /// set go back button
84 /// set goto ref button
86 /// re-enter references
91 bool initialiseParams(std::string const & data);
93 void clearParams() { params_.clear(); }
95 void dispatchParams();
99 InsetCommandParams params_;
101 /// contains the search box
102 FancyLineEdit * filter_;
104 /// went to a reference ?
106 /// the last reference entered or examined
107 QString last_reference_;
108 /// store the buffer settings
109 int restored_buffer_;
110 /// store the last active buffer
113 std::vector<docstring> refs_;
116 } // namespace frontend