]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/WorkAreaManager.cpp
Next camel
[lyx.git] / src / frontends / WorkAreaManager.cpp
index a8c90309fd7ee804fad56dbc65cb621d625f7dfb..b0eaaac6b1270f539671d005ba6cd5550aceee69 100644 (file)
 
 #include <config.h>
 
-#include "WorkArea.h"
-
 #include "WorkAreaManager.h"
 
-using std::list;
+#include "WorkArea.h"
+
 
 namespace lyx {
 namespace frontend {
@@ -34,23 +33,30 @@ void WorkAreaManager::remove(WorkArea * wa)
 
 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