]> git.lyx.org Git - lyx.git/blob - src/frontends/WorkAreaManager.cpp
Move Color::color enum to ColorCode.h
[lyx.git] / src / frontends / WorkAreaManager.cpp
1 // -*- C++ -*-
2 /**
3  * \file WorkAreaManager.cpp
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "WorkArea.h"
15
16 #include "WorkAreaManager.h"
17
18 using std::list;
19
20 namespace lyx {
21
22 extern bool quitting;
23
24 namespace frontend {
25
26 void WorkAreaManager::add(WorkArea * wa)
27 {
28         work_areas_.push_back(wa);
29 }
30
31
32 void WorkAreaManager::remove(WorkArea * wa)
33 {
34         work_areas_.remove(wa);
35 }
36
37
38 void WorkAreaManager::redrawAll()
39 {
40         for (list<WorkArea *>::iterator it = work_areas_.begin();
41                 it != work_areas_.end(); ) {
42                 (*it)->redraw();
43                 ++it;
44         }
45 }
46
47
48 void WorkAreaManager::closeAll()
49 {
50         while (!work_areas_.empty())
51                 // WorkArea is de-registering itself.
52                 (*work_areas_.begin())->close();
53 }
54
55 } // namespace frontend
56 } // namespace lyx
57