2007-10-02 09:00:08 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file WorkAreaManager.cpp
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "WorkArea.h"
|
|
|
|
|
|
|
|
#include "WorkAreaManager.h"
|
|
|
|
|
2007-10-02 14:39:48 +00:00
|
|
|
using std::list;
|
|
|
|
|
2007-10-02 09:00:08 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-10-02 09:12:13 +00:00
|
|
|
void WorkAreaManager::add(WorkArea * wa)
|
2007-10-02 09:00:08 +00:00
|
|
|
{
|
|
|
|
work_areas_.push_back(wa);
|
|
|
|
}
|
|
|
|
|
2007-10-02 14:39:48 +00:00
|
|
|
|
|
|
|
void WorkAreaManager::remove(WorkArea * wa)
|
|
|
|
{
|
|
|
|
work_areas_.remove(wa);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-10-02 09:12:13 +00:00
|
|
|
void WorkAreaManager::redrawAll()
|
2007-10-02 09:00:08 +00:00
|
|
|
{
|
2007-10-02 14:39:48 +00:00
|
|
|
for (list<WorkArea *>::iterator it = work_areas_.begin();
|
|
|
|
it != work_areas_.end(); ) {
|
|
|
|
(*it)->redraw();
|
|
|
|
++it;
|
|
|
|
}
|
2007-10-02 09:00:08 +00:00
|
|
|
}
|
|
|
|
|
2007-10-02 14:39:48 +00:00
|
|
|
|
2007-10-02 09:12:13 +00:00
|
|
|
void WorkAreaManager::closeAll()
|
2007-10-02 09:00:08 +00:00
|
|
|
{
|
2007-10-02 14:39:48 +00:00
|
|
|
for (list<WorkArea *>::iterator it = work_areas_.begin();
|
|
|
|
it != work_areas_.end(); ) {
|
|
|
|
(*it)->close();
|
|
|
|
if (work_areas_.empty())
|
|
|
|
break;
|
|
|
|
++it;
|
|
|
|
}
|
2007-10-02 09:00:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|