]> git.lyx.org Git - lyx.git/blob - src/frontends/Gui.h
merge the two parts of the implementation of frontends::Dialogs
[lyx.git] / src / frontends / Gui.h
1 // -*- C++ -*-
2 /**
3  * \file Gui.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  * \author Abdelrazak Younes
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef BASE_GUI_H
15 #define BASE_GUI_H
16
17 #include <vector>
18
19 namespace lyx {
20 namespace frontend {
21
22 class LyXView;
23
24
25 /**
26  * A Gui class manages the different frontend elements.
27  */
28 class Gui
29 {
30 public:
31         virtual ~Gui() {}
32
33         ///
34         virtual int createRegisteredView() = 0;
35         ///
36         virtual bool unregisterView(int id) = 0;
37         ///
38         virtual bool closeAllViews() = 0;
39
40         ///
41         virtual LyXView & view(int id) const = 0;
42         ///
43         std::vector<int> const & viewIds() { return view_ids_; }
44
45 protected:
46         ///
47         std::vector<int> view_ids_;
48 };
49
50 } // namespace frontend
51 } // namespace lyx
52
53 #endif // BASE_GUI_H