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
|
|
|
|
|
2007-11-15 22:30:16 +00:00
|
|
|
#include "support/strfwd.h"
|
|
|
|
|
2006-10-23 16:29:24 +00:00
|
|
|
#include <vector>
|
2006-06-26 16:55:35 +00:00
|
|
|
|
2007-11-15 22:30:16 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
2007-11-15 22:30:16 +00:00
|
|
|
|
|
|
|
class Buffer;
|
|
|
|
class Inset;
|
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
namespace frontend {
|
|
|
|
|
2007-08-14 09:54:59 +00:00
|
|
|
class LyXView;
|
2006-06-20 08:39:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A Gui class manages the different frontend elements.
|
|
|
|
*/
|
|
|
|
class Gui
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~Gui() {}
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
///
|
2007-11-13 15:29:15 +00:00
|
|
|
virtual int 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
|
|
|
///
|
2007-11-13 23:00:36 +00:00
|
|
|
virtual bool closeAllViews() = 0;
|
2006-12-02 17:39:31 +00:00
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
///
|
2007-11-13 23:00:36 +00:00
|
|
|
virtual LyXView & view(int id) const = 0;
|
2006-10-24 15:01:07 +00:00
|
|
|
///
|
2007-11-13 23:00:36 +00:00
|
|
|
std::vector<int> const & viewIds() { return view_ids_; }
|
2006-10-23 16:29:24 +00:00
|
|
|
|
2007-11-15 22:30:16 +00:00
|
|
|
///
|
|
|
|
virtual void hideDialogs(std::string const & name, Inset * inset) const = 0;
|
|
|
|
///
|
|
|
|
virtual Buffer const * updateInset(Inset const * inset) const = 0;
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
protected:
|
2007-11-13 23:00:36 +00:00
|
|
|
///
|
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
|