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"
18 #include "insets/InsetCommandParams.h"
22 class QTreeWidgetItem;
29 class GuiRef : public GuiDialog, public Ui::RefUi
35 /// Dialog inherited methods
37 void enableView(bool enable) override;
41 void changed_adaptor();
45 void refHighlighted(QTreeWidgetItem *);
46 void selectionChanged();
47 void refTextChanged(QString const &);
48 void refSelected(QTreeWidgetItem *);
51 void on_buttonBox_clicked(QAbstractButton *);
54 void dialogRejected();
58 bool isBufferDependent() const override { return true; }
59 /** disconnect from the inset when the Apply button is pressed.
60 Allows easy insertion of multiple references. */
61 bool disconnectOnApply() const override { return true; }
63 void gotoRef(std::string const &);
67 void closeEvent(QCloseEvent * e) override;
69 bool isValid() override;
71 void applyView() override;
73 void updateContents() override;
77 /// go to current reference
79 /// set go back button
81 /// set goto ref button
83 /// re-enter references
88 bool initialiseParams(std::string const & data) override;
90 void clearParams() override { params_.clear(); }
92 void dispatchParams() override;
96 InsetCommandParams params_;
98 /// contains the search box
99 FancyLineEdit * filter_;
101 /// went to a reference ?
103 /// the last reference entered or examined
104 QString last_reference_;
105 /// store the buffer settings
106 int restored_buffer_;
107 /// store the last active buffer
110 std::vector<docstring> refs_;
113 } // namespace frontend