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-10-12 22:30:42 +00:00
|
|
|
virtual int newView() = 0;
|
2006-06-20 08:39:16 +00:00
|
|
|
///
|
2006-06-26 16:55:35 +00:00
|
|
|
virtual LyXView & view(int id) = 0;
|
|
|
|
|
|
|
|
///
|
|
|
|
virtual int newWorkArea(unsigned int width, unsigned int height, int view_id) = 0;
|
|
|
|
///
|
|
|
|
virtual WorkArea & workArea(int id) = 0;
|
2006-10-23 16:29:24 +00:00
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
///
|
2006-10-23 16:29:24 +00:00
|
|
|
std::vector<int> const & viewIds() { return view_ids_; };
|
2006-06-20 08:39:16 +00:00
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
protected:
|
|
|
|
/// view of a buffer. Eventually there will be several.
|
|
|
|
std::map<int, boost::shared_ptr<BufferView> > buffer_views_;
|
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
|