]> git.lyx.org Git - lyx.git/blob - src/frontends/Gui.h
Clean up quit code.
[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 <boost/shared_ptr.hpp>
18
19 #include <map>
20 #include <vector>
21
22 namespace lyx {
23
24 class LyXView;
25 class BufferView;
26
27 namespace frontend {
28
29 class WorkArea;
30
31
32 /**
33  * A Gui class manages the different frontend elements.
34  */
35 class Gui
36 {
37 public:
38         virtual ~Gui() {}
39
40         ///
41         virtual LyXView& createRegisteredView() = 0;
42         ///
43         virtual bool unregisterView(int id) = 0;
44         ///
45         virtual bool closeAllViews()= 0;
46
47         ///
48         virtual LyXView& view(int id) const = 0;
49         ///
50         std::vector<int> const & viewIds() 
51         { 
52                 return view_ids_; 
53         }
54
55
56         virtual int newWorkArea(unsigned int width, unsigned int height, int view_id) = 0;
57         ///
58         virtual WorkArea & workArea(int id) = 0;
59
60 protected:
61
62         std::vector<int> view_ids_;
63 };
64
65 } // namespace frontend
66 } // namespace lyx
67
68 #endif // BASE_GUI_H