]> git.lyx.org Git - lyx.git/blob - src/frontends/WorkAreaManager.h
Hack to display section symbol
[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
19 class Buffer;
20
21 namespace frontend {
22
23 class WorkArea;
24
25 /// \c WorkArea Manager.
26 /**
27   * This is a helper class designed to avoid signal/slot connections
28   * between a \c Buffer and the potentially multiple \c WorkArea(s)
29   * used to visualize this Buffer contents.
30   */
31 class WorkAreaManager
32 {
33 public:
34         ///
35         WorkAreaManager() {}
36         ///
37         void add(WorkArea * wa);
38         ///
39         void remove(WorkArea * wa);
40         ///
41         void redrawAll(bool update_metrics);
42         ///
43         void closeAll();
44         /// Update window titles of all users and the external modifications
45         /// warning.
46         void updateTitles();
47         /// Schedule redraw of work areas
48         void scheduleRedraw();
49         /// If there is no work area, create a new one in the current view using the
50         /// buffer buf. Returns false if not possible.
51         bool unhide(Buffer * buf) const;
52
53 private:
54         typedef std::list<WorkArea *>::iterator iterator;
55         ///
56         std::list<WorkArea *> work_areas_;
57 };
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // BASE_WORKAREA_H