2007-10-02 09:00:08 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file WorkAreaManager.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WORKAREA_MANAGER_H
|
|
|
|
#define WORKAREA_MANAGER_H
|
|
|
|
|
2007-10-02 14:39:48 +00:00
|
|
|
#include <list>
|
2007-10-02 09:00:08 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class WorkArea;
|
|
|
|
|
2007-10-02 14:39:48 +00:00
|
|
|
/// \c WorkArea Manager.
|
|
|
|
/**
|
|
|
|
* This is a helper class designed to avoid signal/slot connections
|
|
|
|
* between a \c Buffer and the potentially multiple \c WorkArea(s)
|
|
|
|
* used to visualize this Buffer contents.
|
|
|
|
*/
|
2007-10-02 09:00:08 +00:00
|
|
|
class WorkAreaManager
|
|
|
|
{
|
|
|
|
public:
|
2007-11-12 22:15:51 +00:00
|
|
|
///
|
2007-10-02 09:00:08 +00:00
|
|
|
WorkAreaManager() {}
|
|
|
|
///
|
2007-10-02 09:12:13 +00:00
|
|
|
void add(WorkArea * wa);
|
2007-10-02 14:39:48 +00:00
|
|
|
///
|
|
|
|
void remove(WorkArea * wa);
|
2007-10-02 09:00:08 +00:00
|
|
|
///
|
2010-01-08 02:03:54 +00:00
|
|
|
void redrawAll(bool update_metrics);
|
2007-10-02 09:00:08 +00:00
|
|
|
///
|
2007-10-02 09:12:13 +00:00
|
|
|
void closeAll();
|
2017-02-28 21:58:44 +00:00
|
|
|
/// Update window titles of all users and the external modifications
|
|
|
|
/// warning.
|
2007-11-12 22:15:51 +00:00
|
|
|
void updateTitles();
|
2007-11-11 22:30:21 +00:00
|
|
|
|
2007-10-02 09:00:08 +00:00
|
|
|
private:
|
2007-11-12 22:15:51 +00:00
|
|
|
typedef std::list<WorkArea *>::iterator iterator;
|
|
|
|
///
|
2007-10-02 14:39:48 +00:00
|
|
|
std::list<WorkArea *> work_areas_;
|
2007-10-02 09:00:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // BASE_WORKAREA_H
|