]> git.lyx.org Git - features.git/blob - src/frontends/gtk/GuiImplementation.h
* remove various xforms relicts, in particular:
[features.git] / src / frontends / gtk / GuiImplementation.h
1 // -*- C++ -*-
2 /**
3  * \file gtk/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 Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUI_IMPLEMENTATION_H
13 #define GUI_IMPLEMENTATION_H
14
15 #include "frontends/Gui.h"
16 #include "frontends/LyXView.h"
17
18 #include "GScreen.h"
19 #include "GWorkArea.h"
20
21 #include "GuiClipboard.h"
22 #include "GuiWorkArea.h"
23
24 #include <boost/shared_ptr.hpp>
25
26 namespace lyx {
27 namespace frontend {
28
29 /**
30  * The Gui class is the interface to all GTK components.
31  */
32 class GuiImplementation: public lyx::frontend::Gui
33 {
34 public:
35         GuiImplementation()
36         {
37         }
38
39         virtual ~GuiImplementation()
40         {
41         }
42
43         lyx::frontend::Clipboard & clipboard()
44         {
45                 return *clipboard_;
46         }
47
48         int newView(unsigned int w, unsigned int h);
49
50         LyXView & view(int /*id*/)
51         {
52                 return *view_;
53         }
54
55         void destroyView(int /*id*/)
56         {
57                 view_.reset();
58         }
59
60         int newWorkArea(unsigned int w, unsigned int h, int /*view_id*/);
61
62         lyx::frontend::WorkArea & workArea(int /*id*/)
63         {
64                 return *work_area_;
65         }
66
67         void destroyWorkArea(int /*id*/);
68
69 private:
70         ///
71         boost::shared_ptr<GuiClipboard> clipboard_;
72         ///
73         boost::shared_ptr<GuiWorkArea> work_area_;
74         ///
75         boost::shared_ptr<LyXView> view_;
76         ///
77         boost::shared_ptr<GWorkArea> old_work_area_;
78         ///
79         boost::shared_ptr<GScreen> old_screen_;
80 };
81
82 } // namespace frontend
83 } // namespace lyx
84
85 #endif // GUI_IMPLEMENTATION_H