]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GuiImplementation.h
make it compile again
[lyx.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 "GuiWorkArea.h"
22
23 #include <boost/shared_ptr.hpp>
24
25 namespace lyx {
26 namespace frontend {
27
28 /**
29  * The Gui class is the interface to all GTK components.
30  */
31 class GuiImplementation: public lyx::frontend::Gui
32 {
33 public:
34         GuiImplementation()
35         {
36         }
37
38         virtual ~GuiImplementation()
39         {
40         }
41
42         int newView(unsigned int w, unsigned int h);
43
44         LyXView & view(int /*id*/)
45         {
46                 return *view_;
47         }
48
49         void destroyView(int /*id*/)
50         {
51                 view_.reset();
52         }
53
54         int newWorkArea(unsigned int w, unsigned int h, int /*view_id*/);
55
56         lyx::frontend::WorkArea & workArea(int /*id*/)
57         {
58                 return *work_area_;
59         }
60
61         void destroyWorkArea(int /*id*/);
62
63 private:
64         ///
65         boost::shared_ptr<GuiWorkArea> work_area_;
66         ///
67         boost::shared_ptr<LyXView> view_;
68         ///
69         boost::shared_ptr<GWorkArea> old_work_area_;
70         ///
71         boost::shared_ptr<GScreen> old_screen_;
72 };
73
74 } // namespace frontend
75 } // namespace lyx
76
77 #endif // GUI_IMPLEMENTATION_H