]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiImplementation.h
This commit replaces BufferView->LyXView->Gui->[selection,clipboard] with theApp...
[lyx.git] / src / frontends / qt4 / GuiImplementation.h
1 // -*- C++ -*-
2 /**
3  * \file GuiImplementation.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author Abdelrazak Younes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUI_H
14 #define GUI_H
15
16 #include "frontends/Gui.h"
17
18 #include <boost/shared_ptr.hpp>
19
20 #include <map>
21
22 class LyXView;
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiWorkArea;
28 class GuiView;
29
30 /**
31  * The GuiImplementation class is the interface to all Qt4 components.
32  */
33 class GuiImplementation: public Gui
34 {
35 public:
36         GuiImplementation();
37         virtual ~GuiImplementation() {}
38
39         int newView(unsigned int width, unsigned int height);
40         LyXView& view(int id);
41         void destroyView(int id);
42         int newWorkArea(unsigned int width, unsigned int height, int view_id);
43         int newWorkArea(int w, int h);
44         WorkArea& workArea(int id);
45         void destroyWorkArea(int id);
46
47
48 private:
49         ///
50         std::map<int, boost::shared_ptr<GuiView> > views_;
51         ///
52         std::map<int, boost::shared_ptr<GuiWorkArea> > work_areas_;
53         ///
54         size_t max_view_id_;
55         ///
56         size_t max_wa_id_;
57 };
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // GUI_H