]> git.lyx.org Git - lyx.git/blob - src/frontends/Gui.h
Extracted from r14281
[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
21 class LyXView;
22 class BufferView;
23
24 namespace lyx {
25 namespace frontend {
26
27 class Clipboard;
28 class WorkArea;
29
30
31 /**
32  * A Gui class manages the different frontend elements.
33  */
34 class Gui
35 {
36 public:
37         virtual ~Gui() {}
38
39         ///
40         virtual Clipboard & clipboard() = 0;
41
42         ///
43         virtual int newView(unsigned int width, unsigned int height) = 0;
44         ///
45         virtual LyXView & view(int id) = 0;
46         ///
47         virtual void destroyView(int id) = 0;
48
49         ///
50         virtual int newWorkArea(unsigned int width, unsigned int height, int view_id) = 0;
51         ///
52         virtual WorkArea & workArea(int id) = 0;
53         ///
54         virtual void destroyWorkArea(int id) = 0;
55
56 protected:
57         /// view of a buffer. Eventually there will be several.
58         std::map<int, boost::shared_ptr<BufferView> > buffer_views_;
59 };
60
61 } // namespace frontend
62 } // namespace lyx
63
64 #endif // BASE_GUI_H