3 * \file WorkAreaManager.cpp
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
14 #include "WorkAreaManager.h"
16 #include "Application.h"
23 void WorkAreaManager::add(WorkArea * wa)
25 work_areas_.push_back(wa);
29 void WorkAreaManager::remove(WorkArea * wa)
31 work_areas_.remove(wa);
35 void WorkAreaManager::redrawAll(bool update_metrics)
37 for (WorkArea * wa : work_areas_)
38 wa->scheduleRedraw(update_metrics);
42 void WorkAreaManager::closeAll()
44 while (!work_areas_.empty())
45 // WorkArea is de-registering itself.
46 (*work_areas_.begin())->close();
50 bool WorkAreaManager::unhide(Buffer * buf)
52 if (!work_areas_.empty())
54 return theApp()->unhide(buf);
58 void WorkAreaManager::updateTitles()
60 for (WorkArea * wa : work_areas_)
61 wa->updateWindowTitle();
65 } // namespace frontend