mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
f0402e69c6
* Switch WorkAreaManager to std::list instead of vector. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20664 a592a061-630c-0410-9148-cb99ea01b6c8
59 lines
934 B
C++
59 lines
934 B
C++
// -*- 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"
|
|
|
|
using std::list;
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
void WorkAreaManager::add(WorkArea * wa)
|
|
{
|
|
work_areas_.push_back(wa);
|
|
}
|
|
|
|
|
|
void WorkAreaManager::remove(WorkArea * wa)
|
|
{
|
|
work_areas_.remove(wa);
|
|
}
|
|
|
|
|
|
void WorkAreaManager::redrawAll()
|
|
{
|
|
for (list<WorkArea *>::iterator it = work_areas_.begin();
|
|
it != work_areas_.end(); ) {
|
|
(*it)->redraw();
|
|
++it;
|
|
}
|
|
}
|
|
|
|
|
|
void WorkAreaManager::closeAll()
|
|
{
|
|
for (list<WorkArea *>::iterator it = work_areas_.begin();
|
|
it != work_areas_.end(); ) {
|
|
(*it)->close();
|
|
if (work_areas_.empty())
|
|
break;
|
|
++it;
|
|
}
|
|
}
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|