#include <config.h>
-#include "WorkArea.h"
-
#include "WorkAreaManager.h"
-using std::list;
+#include "WorkArea.h"
+
namespace lyx {
namespace frontend {
void WorkAreaManager::redrawAll()
{
- for (list<WorkArea *>::iterator it = work_areas_.begin();
- it != work_areas_.end(); ) {
+ for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it)
(*it)->redraw();
- ++it;
- }
}
void WorkAreaManager::closeAll()
{
- for (list<WorkArea *>::iterator it = work_areas_.begin();
- it != work_areas_.end(); ) {
- (*it)->close();
- if (work_areas_.empty())
- break;
- ++it;
- }
+ while (!work_areas_.empty())
+ // WorkArea is de-registering itself.
+ (*work_areas_.begin())->close();
+}
+
+
+void WorkAreaManager::setReadOnly(bool on)
+{
+ for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it)
+ (*it)->setReadOnly(on);
+}
+
+
+void WorkAreaManager::updateTitles()
+{
+ for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it)
+ (*it)->updateWindowTitle();
}
} // namespace frontend