// -*- 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 #include "WorkArea.h" #include "WorkAreaManager.h" using std::list; namespace lyx { extern bool quitting; 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::iterator it = work_areas_.begin(); it != work_areas_.end(); ) { (*it)->redraw(); ++it; } } void WorkAreaManager::closeAll() { while (!work_areas_.empty()) // WorkArea is de-registering itself. (*work_areas_.begin())->close(); } void WorkAreaManager::setReadOnly(bool on) { for (list::iterator it = work_areas_.begin(); it != work_areas_.end(); ) { (*it)->setReadOnly(on); ++it; } } void WorkAreaManager::updateTitles() { for (list::iterator it = work_areas_.begin(); it != work_areas_.end(); ) { (*it)->updateWindowTitle(); ++it; } } } // namespace frontend } // namespace lyx