]> git.lyx.org Git - lyx.git/blob - src/frontends/WorkAreaManager.h
thrid attempt at changing the naming pattern of the intermediated 'mocced' files
[lyx.git] / src / frontends / WorkAreaManager.h
1 // -*- C++ -*-
2 /**
3  * \file WorkAreaManager.h
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 #ifndef WORKAREA_MANAGER_H
13 #define WORKAREA_MANAGER_H
14
15 #include <list>
16
17 namespace lyx {
18 namespace frontend {
19
20 class WorkArea;
21
22 /// \c WorkArea Manager.
23 /**
24   * This is a helper class designed to avoid signal/slot connections
25   * between a \c Buffer and the potentially multiple \c WorkArea(s)
26   * used to visualize this Buffer contents.
27   */
28 class WorkAreaManager
29 {
30 public:
31         ///
32         WorkAreaManager() {}
33         ///
34         void add(WorkArea * wa);
35         ///
36         void remove(WorkArea * wa);
37         ///
38         void redrawAll();
39         ///
40         void closeAll();
41         /// This function is called when the buffer readonly status change.
42         void setReadOnly(bool);
43         /// Update window titles of all users.
44         void updateTitles();
45
46 private:
47         typedef std::list<WorkArea *>::iterator iterator;
48         ///
49         std::list<WorkArea *> work_areas_;
50 };
51
52 } // namespace frontend
53 } // namespace lyx
54
55 #endif // BASE_WORKAREA_H