]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/WorkAreaManager.h
Fix crash in selection manager
[lyx.git] / src / frontends / WorkAreaManager.h
index 7ff32127bbe4510e80b6eba73f0b503c2982848a..0434074ab45769fa9944972a304f1c4bbf5e0c87 100644 (file)
 #ifndef WORKAREA_MANAGER_H
 #define WORKAREA_MANAGER_H
 
-#include <vector>
+#include <list>
 
 namespace lyx {
+
+class Buffer;
+
 namespace frontend {
 
 class WorkArea;
 
+/// \c WorkArea Manager.
+/**
+  * This is a helper class designed to avoid signal/slot connections
+  * between a \c Buffer and the potentially multiple \c WorkArea(s)
+  * used to visualize this Buffer contents.
+  */
 class WorkAreaManager
 {
 public:
+       ///
        WorkAreaManager() {}
-
        ///
        void add(WorkArea * wa);
-
        ///
-       void redrawAll();
-
+       void remove(WorkArea * wa);
+       ///
+       void redrawAll(bool update_metrics);
        ///
        void closeAll();
+       /// Update window titles of all users and the external modifications
+       /// warning.
+       void updateTitles();
+       /// If there is no work area, create a new one in the current view using the
+       /// buffer buf. Returns false if not possible.
+       bool unhide(Buffer * buf);
 
 private:
-       std::vector<WorkArea *> work_areas_;
+       typedef std::list<WorkArea *>::iterator iterator;
+       ///
+       std::list<WorkArea *> work_areas_;
 };
 
 } // namespace frontend