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"
30 * The GuiImplementation class is the interface to all Qt4 components.
32 class GuiImplementation: public QObject, public Gui
38 virtual ~GuiImplementation() {}
41 virtual LyXView& createRegisteredView();
42 virtual bool closeAllViews();
43 virtual bool unregisterView(int id);
45 virtual LyXView& view(int id) const;
47 virtual int newWorkArea(unsigned int width, unsigned int height, int view_id);
48 virtual WorkArea& workArea(int id);
52 /// Multiple views container.
54 * Warning: This must not be a smart pointer as the destruction of the
55 * object is handled by Qt when the view is closed
56 * \sa Qt::WA_DeleteOnClose attribute.
58 std::map<int, GuiView *> views_;
60 /// Multiple workareas container.
62 * Warning: This must not be a smart pointer as the destruction of the
63 * object is handled by Qt when its parent view is closed.
65 std::map<int, GuiWorkArea *> work_areas_;
68 /// view of a buffer. Eventually there will be several.
69 std::map<int, boost::shared_ptr<BufferView> > buffer_views_;
72 std::vector<int> const & workAreaIds();
74 std::vector<int> work_area_ids_;
77 } // namespace frontend