Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Constraint.h
index dbb66522a715558218f6eeabd0c723d9c9d3d046..632243ba608557cc11ea325f61724794fde566ce 100644 (file)
 #include <ModelAPI_AttributeRefAttr.h>
 #include <list>
 
+const int CONSTRAINT_TEXT_HEIGHT = 28; /// the text height of the constraint
+const int CONSTRAINT_TEXT_SELECTION_TOLERANCE = 20; /// the text selection tolerance
+
+
 /*  Description: 
  *    Each constraint uses a set of parameters. In the SolveSpace library 
  *    these parameters are named "valA", "ptA", "ptB", "entityA", "entityB". 
@@ -28,8 +32,6 @@
 const std::string CONSTRAINT_ATTR_VALUE("ConstraintValue");
 /// The 2D value parameter for the constraint
 const std::string CONSTRAINT_ATTR_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
-/// The value parameter for the constraint
-const std::string CONSTRAINT_ATTR_FLYOUT_VALUE("ConstraintFlyoutValue");
 /// First entity for the constraint
 const std::string CONSTRAINT_ATTR_ENTITY_A("ConstraintEntityA");
 /// Second entity for the constraint
@@ -63,6 +65,12 @@ public:
   SKETCHPLUGIN_EXPORT virtual const void addSub(
     const FeaturePtr& theFeature) {}
 
+  /// \brief Returns the sketch preview
+  SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
+
+  /// Returns the AIS preview
+  SKETCHPLUGIN_EXPORT virtual Handle_AIS_InteractiveObject getAISShape(Handle_AIS_InteractiveObject thePrevious);
+
   /// Moves the feature
   /// \param theDeltaX the delta for X coordinate is moved
   /// \param theDeltaY the delta for Y coordinate is moved