3 * \file GuiImplementation.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
16 #include "frontends/Gui.h"
31 * The GuiImplementation class is the interface to all Qt4 components.
33 class GuiImplementation: public QObject, public Gui
39 virtual ~GuiImplementation() {}
42 virtual LyXView& createRegisteredView();
43 virtual bool closeAllViews();
44 virtual bool unregisterView(int id);
46 virtual LyXView& view(int id) const;
48 virtual int newWorkArea(unsigned int width, unsigned int height, int view_id);
49 virtual WorkArea& workArea(int id);
53 /// Multiple views container.
55 * Warning: This must not be a smart pointer as the destruction of the
56 * object is handled by Qt when the view is closed
57 * \sa Qt::WA_DeleteOnClose attribute.
59 std::map<int, GuiView *> views_;
61 /// Multiple workareas container.
63 * Warning: This must not be a smart pointer as the destruction of the
64 * object is handled by Qt when its parent view is closed.
66 std::map<int, GuiWorkArea *> work_areas_;
69 /// view of a buffer. Eventually there will be several.
70 std::map<int, boost::shared_ptr<BufferView> > buffer_views_;
73 std::vector<int> const & workAreaIds();
75 std::vector<int> work_area_ids_;
78 } // namespace frontend