+ /// Searches the feature by interactive object
+ /// \param theIO an interactive object
+ /// \return corresponded object or NULL if it not found
+ ObjectPtr getObject(const Handle(AIS_InteractiveObject)& theIO) const;
+
+ /// Deactivates the given objects (not allow selection)
+ /// \param theObjList - list of objects which has to be deactivated.
+ /// \param theUpdateViewer update viewer flag
+ void deactivateObjects(const QObjectPtrList& theObjList,
+ const bool theUpdateViewer = true);
+
+ /// Returns the modes of activation
+ /// \param theObject 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);
+
+ /// Returns true if the given object can be selected
+ /// \param theObject object to check
+ bool isActive(ObjectPtr theObject) const;
+
+ /// Activates in local context displayed outside of the context.
+ /// \param theModes - modes on which it has to be activated (can be empty)
+ /// \param theObjList - list of objects which has to be activated.
+ /// \param theUpdateViewer an update viewer flag
+ void activateObjects(const QIntList& theModes, const QObjectPtrList& theObjList,
+ const bool theUpdateViewer = true);
+
+ /// Sets display mode for the given object if this object is displayed
+ void setDisplayMode(ObjectPtr theObject, DisplayMode theMode, bool theUpdateViewer = true);
+
+ /// Returns current display mode for the given object.
+ /// If object is not dis played then returns NoMode.
+ /// \param theObject object to check
+ DisplayMode displayMode(ObjectPtr theObject) const;
+
+ /// Displays only objects listed in the list
+ /// \param theList list of objects
+ void showOnly(const QObjectPtrList& theList);
+
+ /// Returns number of displayed objects
+ int objectsCount() const { return myResult2AISObjectMap.size(); }
+
+ /// Returns list of displayed objects
+ QObjectPtrList displayedObjects() const { return myResult2AISObjectMap.keys(); }
+
+ /// Returns list of displayed objects
+ QList<AISObjectPtr> displayedPresentations() const { return myResult2AISObjectMap.values(); }
+
+ /// Returns true if the given object can be shown in shaded mode
+ /// \param theObject object to check
+ bool canBeShaded(ObjectPtr theObject) const;
+
+ /// Set color on presentation of an object if it is displayed
+ /// \param theObject an object
+ /// \param theColor a color which has to be set
+ /// \param theUpdateViewer update viewer flag
+ /// \return previously defined color on the object
+ QColor setObjectColor(ObjectPtr theObject, const QColor& theColor, bool theUpdateViewer = true);
+
+ /// Returns Trihedron object if it is displayed
+ Handle(AIS_InteractiveObject) getTrihedron() const;
+
+ /// Set trihedron active (used in selection) or non active
+ void activateTrihedron(bool theIsActive);
+
+ /// Displays/erases thrihedron in current modes. It will be activated or deactivated
+ /// depending on the trihedron visible state and displayer active trihedron state
+ void displayTrihedron(bool theToDisplay) const;
+
+ /// Returns true if the trihedron should be activated in current selection modes
+ bool isTrihedronActive() const { return myIsTrihedronActive; }
+
+ /// Returns list of currently active selection modes
+ /// Selection modes will be returned according to TopAbs_ShapeEnum
+ QIntList activeSelectionModes() const;
+
+#ifdef TINSPECTOR
+ void setCallBack(const Handle(VInspectorAPI_CallBack)& theCallBack)
+ { myVCallBack = theCallBack; }
+ Handle(VInspectorAPI_CallBack) getCallBack() const { return myVCallBack; }
+#endif
+ /// Converts shape type (TopAbs_ShapeEnum) to selection mode
+ /// \param theShapeType a shape type from TopAbs_ShapeEnum
+ static int getSelectionMode(int theShapeType);
+
+ /// Return true if the object is visible. If the object is feature, it returns true
+ /// if all results of the feature are shown
+ /// \param theDisplayer a displayer
+ /// \param theObject an object
+ /// \return a boolean value
+ static bool isVisible(XGUI_Displayer* theDisplayer, const ObjectPtr& theObject);
+
+signals:
+ /// Signal on object display
+ /// \param theObject a data object
+ /// \param theAIS a presentation object
+ void objectDisplayed(ObjectPtr theObject, AISObjectPtr theAIS);
+
+ /// Signal on before object erase
+ /// \param theObject a data object
+ /// \param theAIS a presentation object
+ void beforeObjectErase(ObjectPtr theObject, AISObjectPtr theAIS);
+
+ protected: