Salome HOME
Copyright update 2021
[modules/shaper.git] / src / ModuleBase / ModuleBase_IViewer.h
index 77c10a45c230c8979cf5615156aa9ba47a1b8af3..17c3723afa8b602ffca77c6e3d23dc42e482dfb1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -21,6 +21,7 @@
 #define ModuleBase_IViewer_H
 
 #include "ModuleBase.h"
+
 #include <QObject>
 #include <QMap>
 #include <AIS_InteractiveContext.hxx>
@@ -31,6 +32,11 @@ class QMouseEvent;
 class QKeyEvent;
 class QContextMenuEvent;
 class ModuleBase_IViewWindow;
+#ifdef HAVE_SALOME
+class OCCViewer_Fitter;
+#else
+class AppElements_Fitter;
+#endif
 
 /**
  * \ingroup GUI
@@ -181,8 +187,27 @@ Q_OBJECT
   // \param theText is a title
   virtual void setColorScaleTitle(const QString& theText) = 0;
 
+  /// Switches On additional highlight for objects preselection
+  void showSelectionHighlight() {
+    myShowHighlight = true;
+  }
+
+  /// Switches Off additional highlight for objects preselection
+  void hideSelectionHighlight() {
+    myShowHighlight = false;
+  }
+
+#ifdef HAVE_SALOME
+  virtual void setFitter(OCCViewer_Fitter* theFitter) = 0;
+  virtual OCCViewer_Fitter* fitter() const = 0;
+#else
+  virtual void setFitter(AppElements_Fitter* theFitter) = 0;
+  virtual AppElements_Fitter* fitter() const = 0;
+#endif
+
   static Handle(Prs3d_Drawer) DefaultHighlightDrawer;
 
+
 signals:
   /// Signal emited when last view window is closed
   void lastViewClosed();
@@ -235,6 +260,8 @@ signals:
     QMap<Handle(V3d_View), double> myWindowScale;
 
     bool myIs2dMode;
+
+    bool myShowHighlight;
 };
 
 #endif