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