]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/WorkAreaManager.cpp
GuiIdListModel: ignore DecorationRole (icons of available list)
[lyx.git] / src / frontends / WorkAreaManager.cpp
index 7970bfaf26a2dc7b6c3aa6c8d91c71c7cabbb450..c79f08bef7d018787d059958b652a867e08df2c4 100644 (file)
 
 #include <config.h>
 
-#include "WorkArea.h"
-
 #include "WorkAreaManager.h"
 
-using std::list;
-
-namespace lyx {
+#include "Application.h"
+#include "WorkArea.h"
 
-extern bool quitting;
 
+namespace lyx {
 namespace frontend {
 
 void WorkAreaManager::add(WorkArea * wa)
@@ -35,26 +32,36 @@ void WorkAreaManager::remove(WorkArea * wa)
 }
 
 
-void WorkAreaManager::redrawAll()
+void WorkAreaManager::redrawAll(bool update_metrics)
 {
-       for (list<WorkArea *>::iterator it = work_areas_.begin();
-               it != work_areas_.end(); ) {
-               (*it)->redraw();
-               ++it;
-       }
+       for (WorkArea * wa : work_areas_)
+               wa->scheduleRedraw(update_metrics);
 }
 
 
 void WorkAreaManager::closeAll()
 {
-       if (quitting)
-               return;
-
        while (!work_areas_.empty())
                // WorkArea is de-registering itself.
                (*work_areas_.begin())->close();
 }
 
+
+bool WorkAreaManager::unhide(Buffer * buf)
+{
+       if (!work_areas_.empty())
+               return true;
+       return theApp()->unhide(buf);
+}
+
+
+void WorkAreaManager::updateTitles()
+{
+       for (WorkArea * wa : work_areas_)
+               wa->updateWindowTitle();
+}
+
+
 } // namespace frontend
 } // namespace lyx