lyx_mirror/src/frontends/Gui.h
Abdelrazak Younes 1356543c45 The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas:
* Buffer:
- get rid of cursor_ and anchor_
- ~Buffer(): update the labels of its master buffer before closing
- closing(): pass the Buffer address.

* BufferView():
- BufferView(): needs a valid Buffer (should be const in the future.
- most of the change is about removing all test of buffer_ nullity.
- resize(): deleted.
- setBuffer(): deleted.

* Application:
- newLyXView(): simplification
- updated design description in Application.h

* Gui/GuiImplementation: remove all WorkAreas and BufferView creation/Deletion. Workareas are directly handled by  LyXView/GuiView and BufferView is created/delete by WorkArea.

* LyXView/GuiView: implement the new design

What is not working yet:
- the close tab button: it is implemented but does not show up.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19686 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 07:33:46 +00:00

64 lines
947 B
C++

// -*- C++ -*-
/**
* \file Gui.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author unknown
* \author John Levon
* \author Abdelrazak Younes
*
* Full author contact details are available in file CREDITS.
*/
#ifndef BASE_GUI_H
#define BASE_GUI_H
#include <boost/shared_ptr.hpp>
#include <map>
#include <vector>
namespace lyx {
class BufferView;
namespace frontend {
class LyXView;
class WorkArea;
/**
* A Gui class manages the different frontend elements.
*/
class Gui
{
public:
virtual ~Gui() {}
///
virtual LyXView& createRegisteredView() = 0;
///
virtual bool unregisterView(int id) = 0;
///
virtual bool closeAllViews()= 0;
///
virtual LyXView& view(int id) const = 0;
///
std::vector<int> const & viewIds()
{
return view_ids_;
}
protected:
std::vector<int> view_ids_;
};
} // namespace frontend
} // namespace lyx
#endif // BASE_GUI_H