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.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
12 #ifndef GUI_IMPLEMENTATION_H
13 #define GUI_IMPLEMENTATION_H
15 #include "frontends/Gui.h"
16 #include "frontends/LyXView.h"
19 #include "GWorkArea.h"
21 #include "GuiClipboard.h"
22 #include "GuiWorkArea.h"
24 #include <boost/shared_ptr.hpp>
31 typedef GScreen FScreen;
32 typedef GWorkArea FWorkArea;
35 * The Gui class is the interface to all GTK components.
37 class GuiImplementation: public lyx::frontend::Gui
40 GuiImplementation(LyXView & owner): owner_(owner)
44 virtual ~GuiImplementation()
48 lyx::frontend::Clipboard& clipboard()
53 int newWorkArea(int w, int h)
55 old_work_area_.reset(new FWorkArea(owner_, w, h));
56 old_screen_.reset(new FScreen(*old_work_area_.get()));
57 work_area_.reset(new GuiWorkArea(owner_, w, h, old_screen_.get(), old_work_area_.get()));
58 clipboard_.reset(new GuiClipboard(old_work_area_.get()));
59 guiCursor().connect(work_area_.get());
62 lyx::frontend::WorkArea& workArea(int id)
67 void destroyWorkArea(int id)
71 old_work_area_.reset();
77 boost::shared_ptr<GuiClipboard> clipboard_;
79 boost::shared_ptr<GuiWorkArea> work_area_;
81 boost::shared_ptr<FWorkArea> old_work_area_;
83 boost::shared_ptr<FScreen> old_screen_;
88 } // namespace frontend
91 #endif // GUI_IMPLEMENTATION_H