]> git.lyx.org Git - lyx.git/blob - src/frontends/WorkAreaManager.cpp
Clarify "Save compressed by default" feature (bug 7822)
[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 "WorkAreaManager.h"
15
16 #include "WorkArea.h"
17
18
19 namespace lyx {
20 namespace frontend {
21
22 void WorkAreaManager::add(WorkArea * wa)
23 {
24         work_areas_.push_back(wa);
25 }
26
27
28 void WorkAreaManager::remove(WorkArea * wa)
29 {
30         work_areas_.remove(wa);
31 }
32
33
34 void WorkAreaManager::redrawAll(bool update_metrics)
35 {
36         iterator it = work_areas_.begin();
37         iterator const en = work_areas_.end();
38         for (; it != en; ++it)
39                 (*it)->redraw(update_metrics);
40 }
41
42
43 void WorkAreaManager::closeAll()
44 {
45         while (!work_areas_.empty())
46                 // WorkArea is de-registering itself.
47                 (*work_areas_.begin())->close();
48 }
49
50
51 void WorkAreaManager::updateTitles()
52 {
53         iterator it = work_areas_.begin();
54         iterator const en = work_areas_.end();
55         for (; it != en; ++it)
56                 (*it)->updateWindowTitle();
57 }
58
59 } // namespace frontend
60 } // namespace lyx
61