Salome HOME
Issue #1393. An attempt to make infinite lines and use the edges' direction vectors.
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_DimensionStyleListener.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_DimensionStyleListener.h
4 // Created:     31 March 2016
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef SketcherPrs_DimensionStyleListener_H
8 #define SketcherPrs_DimensionStyleListener_H
9
10 #include <Events_Listener.h>
11
12 #include <ModelAPI_AttributeDouble.h>
13
14 #include "SketcherPrs_Tools.h"
15
16 #include <Standard.hxx>
17
18 /**
19 * \ingroup GUI
20 * A class for representation of linear dimension constraint.
21 * It supports SketchPlugin_ConstraintLength and SketchPlugin_ConstraintDistance features.
22 */
23 class SketcherPrs_DimensionStyleListener : public Events_Listener
24 {
25 public:
26   /// Constructor
27   /// \param theConstraint a constraint feature
28   /// \param thePlane a coordinate plane of current sketch
29   Standard_EXPORT SketcherPrs_DimensionStyleListener();
30
31   /// Destructor
32   Standard_EXPORT ~SketcherPrs_DimensionStyleListener();
33
34   /// Process the ModelAPI_DocumentCreatedMessage to fulfill a document
35   /// from the message with origin and planes
36   virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
37
38   /// Redefinition of virtual function
39   Standard_EXPORT void updateDimensions(AIS_Dimension* theDimension,
40                                         const AttributeDoublePtr& theAttributeValue);
41
42 private:
43   /// Style how the parameter of dimension should be visualized
44   SketcherPrs_ParameterStyleMessage::ParameterStyle myStyle;
45 };
46
47 #endif