diff Framework/Widgets/WorldSceneWidget.h @ 333:08683537a227 am-2

possibility to turn off default mouse events in WorldSceneWidget
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 17 Oct 2018 19:42:56 +0200
parents 50e5ec1bdd46
children 99e31898910e
line wrap: on
line diff
--- a/Framework/Widgets/WorldSceneWidget.h	Wed Oct 17 19:38:39 2018 +0200
+++ b/Framework/Widgets/WorldSceneWidget.h	Wed Oct 17 19:42:56 2018 +0200
@@ -36,6 +36,7 @@
 
     ViewportGeometry       view_;
     IWorldSceneInteractor* interactor_;
+    bool                   hasDefaultMouseEvents_;
 
   protected:
     virtual Extent2D GetSceneExtent() = 0;
@@ -56,8 +57,19 @@
   public:
     WorldSceneWidget(const std::string& name) :
       CairoWidget(name),
-      interactor_(NULL)
+      interactor_(NULL),
+      hasDefaultMouseEvents_(true)
+    {
+    }
+
+    void SetDefaultMouseEvents(bool value)
     {
+      hasDefaultMouseEvents_ = value;
+    }
+
+    bool HasDefaultMouseEvents() const
+    {
+      return hasDefaultMouseEvents_;
     }
 
     void SetInteractor(IWorldSceneInteractor& interactor);