2006-06-20 08:39:16 +00:00
|
|
|
// -*- 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
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
|
|
#include <map>
|
2006-10-23 16:29:24 +00:00
|
|
|
#include <vector>
|
2006-06-26 16:55:35 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
class LyXView;
|
2006-07-08 22:55:22 +00:00
|
|
|
class BufferView;
|
2006-06-26 16:55:35 +00:00
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class WorkArea;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A Gui class manages the different frontend elements.
|
|
|
|
*/
|
|
|
|
class Gui
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~Gui() {}
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
///
|
2006-12-02 17:39:31 +00:00
|
|
|
virtual LyXView& createRegisteredView() = 0;
|
2006-06-20 08:39:16 +00:00
|
|
|
///
|
2006-12-02 17:39:31 +00:00
|
|
|
virtual bool unregisterView(int id) = 0;
|
2006-06-26 16:55:35 +00:00
|
|
|
///
|
2006-12-02 17:39:31 +00:00
|
|
|
virtual bool closeAllViews()= 0;
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
///
|
2006-12-02 17:39:31 +00:00
|
|
|
virtual LyXView& view(int id) const = 0;
|
2006-10-24 15:01:07 +00:00
|
|
|
///
|
2007-05-28 22:27:45 +00:00
|
|
|
std::vector<int> const & viewIds()
|
|
|
|
{
|
|
|
|
return view_ids_;
|
2006-12-02 17:39:31 +00:00
|
|
|
}
|
2006-10-23 16:29:24 +00:00
|
|
|
|
2006-12-02 17:39:31 +00:00
|
|
|
|
|
|
|
virtual int newWorkArea(unsigned int width, unsigned int height, int view_id) = 0;
|
2006-06-20 08:39:16 +00:00
|
|
|
///
|
2006-12-02 17:39:31 +00:00
|
|
|
virtual WorkArea & workArea(int id) = 0;
|
2006-06-20 08:39:16 +00:00
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
protected:
|
2006-10-23 16:29:24 +00:00
|
|
|
|
|
|
|
std::vector<int> view_ids_;
|
2006-06-20 08:39:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // BASE_GUI_H
|