]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlRef.h
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlRef.h
1 // -*- C++ -*-
2 /**
3  * \file ControlRef.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CONTROLREF_H
13 #define CONTROLREF_H
14
15
16 #include "ControlCommand.h"
17 #include <vector>
18
19 namespace lyx {
20 namespace frontend {
21
22 /** A controller for the Ref Dialog.
23  */
24 class ControlRef : public ControlCommand {
25 public:
26         ///
27         ControlRef(Dialog &);
28         ///
29         std::vector<std::string> const getLabelList(std::string const &) const;
30         ///
31         void gotoRef(std::string const &);
32         ///
33         void gotoBookmark();
34         ///
35         std::vector<std::string> const getBufferList() const;
36         ///
37         int getBufferNum() const;
38         ///
39         std::string const getBufferName(int num) const;
40 private:
41         /** disconnect from the inset when the Apply button is pressed.
42          Allows easy insertion of multiple references. */
43         virtual bool disconnectOnApply() const { return true; }
44 };
45
46 } // namespace frontend
47 } // namespace lyx
48
49 #endif // CONTROLREF_H