+ /// Returns whether the mouse enter the viewer's window
+ /// \return true if items are added and there is no necessity to provide standard menu
+ bool isMouseOverWindow();
+
+ /// Returns sketch manager object
+ PartSet_SketcherMgr* sketchMgr() const { return mySketchMgr; }
+
+ /// Returns sketch reentrant manager
+ PartSet_SketcherReetntrantMgr* sketchReentranceMgr() { return mySketchReentrantMgr; }
+
+ /// Returns listener of overconstraint signal
+ /// \return the listener
+ PartSet_OverconstraintListener* overconstraintListener() { return myOverconstraintListener; }
+
+ /// Performs functionality on closing document
+ virtual void closeDocument();
+
+ /// Clears specific presentations in the viewer
+ virtual void clearViewer();
+
+ /// Event Listener method
+ /// \param theMessage an event message
+ virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+
+ /// Set the object with the object results are customized
+ /// \param theFeature a feature
+ void setCustomized(const FeaturePtr& theFeature);
+
+ /// Activate custom presentation for the object
+ /// \param theFeature a feature instance
+ /// \param theFlag a flag of level of customization, which means that only part of sub-elements
+ /// \param theUpdateViewer the parameter whether the viewer should be update immediately
+ virtual void activateCustomPrs(const FeaturePtr& theFeature,
+ const ModuleBase_CustomizeFlag& theFlag,
+ const bool theUpdateViewer);
+
+ /// Deactivate custom presentation for the object
+ /// \param theFlag a flag of level of customization, which means that only part of sub-elements
+ /// \param theUpdateViewer the parameter whether the viewer should be update immediately
+ virtual void deactivateCustomPrs(const ModuleBase_CustomizeFlag& theFlag,
+ const bool theUpdateViewer);
+
+ /// Modifies the given presentation in the custom way.
+ virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
+ std::shared_ptr<GeomAPI_ICustomPrs> theCustomPrs);
+
+ /// Update the object presentable properties such as color, lines width and other
+ /// If the object is result with the color attribute value set, it is used,
+ /// otherwise the customize is applyed to the object's feature if it is a custom prs
+ /// \param theObject an object instance
+ /// \param theFlag a flag of level of customization, which means that only part of sub-elements
+ /// should be updated(e.g. only highlighted elements)
+ /// \param theUpdateViewer the parameter whether the viewer should be update immediatelly
+ /// \returns true if the object is modified
+ virtual bool customizeObject(ObjectPtr theObject, const ModuleBase_CustomizeFlag& theFlag,
+ const bool theUpdateViewer);
+
+ /// This method is called on object browser creation for customisation of module specific features
+ /// \param theObjectBrowser a pinter on Object Browser widget
+ virtual void customizeObjectBrowser(QWidget* theObjectBrowser);
+
+ /// Returns the viewer Z layer
+ int getVisualLayerId() const { return myVisualLayerId; }
+
+ //! Returns data object by AIS
+ virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const;
+
+ /// Update state of pop-up menu items in viewer
+ /// \param theStdActions - a map of standard actions
+ virtual void updateViewerMenu(const QMap<QString, QAction*>& theStdActions);
+
+ //! Returns the feature error if the current state of the feature in the module is not correct
+ //! If the feature is correct, it returns an empty value
+ //! \return string value
+ virtual QString getFeatureError(const FeaturePtr& theFeature);
+
+ /// Returns list of granted operation indices
+ virtual void grantedOperationIds(ModuleBase_Operation* theOperation, QStringList& theIds) const;
+
+ /// Validates the current operation and send the state change to sketch manager
+ /// \param thePreviousState the previous widget value state
+ virtual void widgetStateChanged(int thePreviousState);
+
+ /// Returns true if the event is processed. It gives the reentrance manager to process the enter.
+ /// \param thePreviousAttributeID an index of the previous active attribute
+ virtual bool processEnter(const std::string& thePreviousAttributeID);
+
+ /// Performs some GUI actions after an operation transaction is opened
+ /// Default realization is empty
+ virtual void beforeOperationStarted(ModuleBase_Operation* theOperation);
+
+ /// Performs some GUI actions before an operation transaction is stopped
+ /// Default realization is empty
+ virtual void beforeOperationStopped(ModuleBase_Operation* theOperation);
+
+ /// Finds a shape by attribute if it is possible
+ /// \param theAttribute an attribute
+ /// \return a geom shape
+ virtual GeomShapePtr findShape(const AttributePtr& theAttribute);
+
+ /// Finds an attribute by geom shape if it is possible
+ /// \param theObject an object of the attribute
+ /// \param theGeomShape a geom shape
+ /// \return theAttribute
+ virtual AttributePtr findAttribute(const ObjectPtr& theObject, const GeomShapePtr& theGeomShape);
+
+public slots:
+ /// Redefines the parent method in order to customize the next case:
+ /// If the sketch nested operation is active and the presentation is not visualized in the viewer,
+ /// the operation should be always aborted.
+ virtual void onFeatureTriggered();