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 "QWorkArea.h"
21 #include "GuiClipboard.h"
22 #include "GuiWorkArea.h"
24 #include <boost/shared_ptr.hpp>
29 typedef QScreen FScreen;
30 typedef QWorkArea FWorkArea;
33 * The Gui class is the interface to all Qt3 components.
35 class GuiImplementation: public lyx::frontend::Gui
38 GuiImplementation(LyXView & owner): owner_(owner)
42 virtual ~GuiImplementation()
46 lyx::frontend::Clipboard& clipboard()
51 int newWorkArea(int w, int h)
53 old_work_area_.reset(new FWorkArea(owner_, w, h));
54 old_screen_.reset(new FScreen(*old_work_area_.get()));
55 work_area_.reset(new GuiWorkArea(owner_, w, h, old_screen_.get(), old_work_area_.get()));
56 clipboard_.reset(new GuiClipboard(old_work_area_.get()));
57 guiCursor().connect(work_area_.get());
61 lyx::frontend::WorkArea& workArea(int id)
66 void destroyWorkArea(int id)
70 old_work_area_.reset();
76 boost::shared_ptr<GuiClipboard> clipboard_;
78 boost::shared_ptr<GuiWorkArea> work_area_;
80 boost::shared_ptr<FWorkArea> old_work_area_;
82 boost::shared_ptr<FScreen> old_screen_;
87 } // namespace frontend
90 #endif // GUI_IMPLEMENTATION_H