#ifndef WORKAREA_MANAGER_H
#define WORKAREA_MANAGER_H
-#include <vector>
+#include <list>
namespace lyx {
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();
+ /// This function is called when the buffer readonly status change.
+ void setReadOnly(bool);
+ /// Update window titles of all users.
+ void updateTitles();
private:
- std::vector<WorkArea *> work_areas_;
+ typedef std::list<WorkArea *>::iterator iterator;
+ ///
+ std::list<WorkArea *> work_areas_;
};
} // namespace frontend