#include <map>
-class LyXView;
-
namespace lyx {
namespace frontend {
-class GuiWorkArea;
-class GuiView;
+class GuiViewBase;
+class LyXView;
/**
* The GuiImplementation class is the interface to all Qt4 components.
*/
-class GuiImplementation: public QObject, public Gui
+class GuiImplementation : public QObject, public Gui
{
Q_OBJECT
GuiImplementation();
virtual ~GuiImplementation() {}
- int newView();
- LyXView& view(int id);
- int newWorkArea(unsigned int width, unsigned int height, int view_id);
- WorkArea& workArea(int id);
+ virtual LyXView& createRegisteredView();
+ virtual bool closeAllViews();
+ virtual bool unregisterView(int id);
-private Q_SLOTS:
- ///
- void cleanupViews(QObject * view);
+ virtual LyXView& view(int id) const;
private:
- ///
- void buildViewIds();
/// Multiple views container.
/**
* Warning: This must not be a smart pointer as the destruction of the
- * object is handled by Qt when the view is closed
+ * object is handled by Qt when the view is closed
* \sa Qt::WA_DeleteOnClose attribute.
*/
- std::map<int, GuiView *> views_;
-
- /// Multiple workareas container.
- /**
- * Warning: This must not be a smart pointer as the destruction of the
- * object is handled by Qt when its parent view is closed.
- */
- std::map<int, GuiWorkArea *> work_areas_;
- ///
- size_t max_view_id_;
- ///
- size_t max_wa_id_;
+ std::map<int, GuiViewBase *> views_;
};
} // namespace frontend