Salome HOME
The local selection restore for a feature vertex (it is checked on the line feature)
[modules/shaper.git] / src / XGUI / XGUI_Displayer.h
index 7fbbd814d07e758e733545588f25d6b9d2407f9e..154e4b0206178a826d45e694302ab64662820f94 100644 (file)
@@ -56,13 +56,6 @@ class XGUI_EXPORT XGUI_Displayer
   /// Display the given AIS object. To hide this object use corresponde erase method
   void displayAIS(AISObjectPtr theAIS, bool isUpdate = true);
 
-  /// Stop the current selection and color the given features to the selection color
-  /// \param theFeatures a list of features to be disabled
-  /// \param theToStop the boolean state whether it it stopped or non stopped
-  /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
-  void stopSelection(const QObjectPtrList& theFeatures, const bool isStop,
-                     const bool isUpdateViewer);
-
   /**
    * Add presentations which corresponds to the given features to current selection
    * \param theFeatures a list of features to be selected
@@ -86,13 +79,6 @@ class XGUI_EXPORT XGUI_Displayer
   /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
   void eraseAll(const bool isUpdateViewer = true);
 
-  /// Erase AIS interactive objects, which has an empty feature in the internal map
-  /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
-  void eraseDeletedResults(const bool isUpdateViewer = true);
-
-  /// Opens local context. Does nothing if it is already opened.
-  void openLocalContext();
-
   /// Deactivates selection of sub-shapes
   /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
   void closeLocalContexts(const bool isUpdateViewer = true);
@@ -103,11 +89,18 @@ class XGUI_EXPORT XGUI_Displayer
 
   void removeFilters();
 
+  /**
+   * Sets a flag to the displayer whether the internal viewer can be updated by 
+   * the updateViewer method call. If it is not enabled, this method do nothing
+   * \param isEnabled a boolean value
+   */
+  bool enableUpdateViewer(const bool isEnabled);
+
   /// Updates the viewer
   void updateViewer();
 
   /// Searches the interactive object by feature
-  /// \param theFeature the feature or NULL if it not visualized
+  /// \param theFeature the object or presentable feature
   /// \return theIO an interactive object
   AISObjectPtr getAISObject(ObjectPtr theFeature) const;
 
@@ -124,6 +117,11 @@ class XGUI_EXPORT XGUI_Displayer
   /// \param theModes - modes on which it has to be activated (can be empty)
   void activate(ObjectPtr theFeature, const QIntList& theModes);
 
+  /// Returns the modes of activation
+  /// \param theFeature the feature or NULL if it not visualized
+  /// \param theModes - modes on which it is activated (can be empty)
+  void getModesOfActivation(ObjectPtr theObject, QIntList& theModes);
+
   /// Activates the given object with default modes
   void activate(ObjectPtr theFeature);
 
@@ -182,6 +180,9 @@ class XGUI_EXPORT XGUI_Displayer
    */
   void redisplay(ObjectPtr theObject, bool isUpdateViewer = true);
 
+  /// Opens local context. Does nothing if it is already opened.
+  void openLocalContext();
+
  protected:
   XGUI_Workshop* myWorkshop;
 
@@ -191,9 +192,11 @@ class XGUI_EXPORT XGUI_Displayer
   ResultToAISMap myResult2AISObjectMap;
 
   // A flag of initialization of external objects selection
-  bool myUseExternalObjects;
+  //bool myUseExternalObjects;
   // Selection modes installed for external objects in local context
   QIntList myActiveSelectionModes;
+
+  bool myEnableUpdateViewer;  /// the enable update viewer flag
 };
 
 #endif