Salome HOME
Disable sketch input fields unconditionally.
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_HVDirection.h
index 96432d23071a59be989deb477bde3205a5333bed..39bd961a95082f4997ae5a1dcb8c8ab59a450555 100644 (file)
@@ -8,9 +8,7 @@
 #define SketcherPrs_HVDirection_H
 
 #include "SketcherPrs_SymbolPrs.h"
-
-class SketchPlugin_Constraint;
-class SketchPlugin_Sketch;
+#include <ModelAPI_Feature.h>
 
 
 DEFINE_STANDARD_HANDLE(SketcherPrs_HVDirection, SketcherPrs_SymbolPrs)
@@ -26,11 +24,20 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_HVDirection(SketchPlugin_Constraint* theConstraint, 
+  /// \param isHorisontal a flag horizontal or vertical presentation
+  Standard_EXPORT SketcherPrs_HVDirection(ModelAPI_Feature* theConstraint, 
                                          const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                          bool isHorisontal);
 
   DEFINE_STANDARD_RTTI(SketcherPrs_HVDirection)
+
+  /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
+  /// \param theConstraint a constraint feature
+  /// \param thePlane a coordinate plane of current sketch
+  /// \return boolean result value
+  static bool IsReadyToDisplay(ModelAPI_Feature* theConstraint,
+                               const std::shared_ptr<GeomAPI_Ax3>& thePlane);
+
 protected:
   virtual const char* iconName() const { return myIsHorisontal? "horisontal.png" : "vertical.png"; }
 
@@ -41,7 +48,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updatePoints(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep) const;
 
 private:
   bool myIsHorisontal;