]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiImplementation.h
* MSVC Compilation fix: #warning is not supported.
[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 #include "GuiClipboard.h"
18
19 #include <boost/shared_ptr.hpp>
20
21 #include <map>
22
23 class LyXView;
24
25 namespace lyx {
26 namespace frontend {
27
28 class GuiWorkArea;
29 class GuiView;
30
31 /**
32  * The GuiImplementation class is the interface to all Qt4 components.
33  */
34 class GuiImplementation: public Gui
35 {
36 public:
37         GuiImplementation();
38         virtual ~GuiImplementation() {}
39
40         Clipboard& clipboard();
41
42         int newView(unsigned int width, unsigned int height);
43         LyXView& view(int id);
44         void destroyView(int id);
45         int newWorkArea(unsigned int width, unsigned int height, int view_id);
46         int newWorkArea(int w, int h);
47         WorkArea& workArea(int id);
48         void destroyWorkArea(int id);
49
50
51 private:
52         ///
53         GuiClipboard clipboard_;
54         ///
55         std::map<int, boost::shared_ptr<GuiView> > views_;
56         ///
57         std::map<int, boost::shared_ptr<GuiWorkArea> > work_areas_;
58         ///
59         size_t max_view_id_;
60         ///
61         size_t max_wa_id_;
62 };
63
64 } // namespace frontend
65 } // namespace lyx
66
67 #endif // GUI_H