if (aPrevState != theState) {
/// call all sketch features redisplay, the expression state will be corrected in customize
/// of distance presentation
- SketcherPrs_Tools::
- sendExpressionShownEvent(myIsConstraintsShown[PartSet_Tools::Expressions]);
+ SketcherPrs_Tools::ParameterStyle aStyle = myIsConstraintsShown[PartSet_Tools::Expressions] ?
+ SketcherPrs_Tools::ParameterText : SketcherPrs_Tools::ParameterValue;
+ SketcherPrs_Tools::setParameterStyle(aStyle);
Events_ID anEventId = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
PartSet_Tools::sendSubFeaturesEvent(myCurrentSketch, anEventId);
}
SketcherPrs.h
SketcherPrs_Coincident.h
SketcherPrs_Collinear.h
- SketcherPrs_DimensionStyleListener.h
+ SketcherPrs_DimensionStyle.h
SketcherPrs_Factory.h
SketcherPrs_Parallel.h
SketcherPrs_Tools.h
SET(PROJECT_SOURCES
SketcherPrs_Coincident.cpp
SketcherPrs_Collinear.cpp
- SketcherPrs_DimensionStyleListener.cpp
+ SketcherPrs_DimensionStyle.cpp
SketcherPrs_Factory.cpp
SketcherPrs_Parallel.cpp
SketcherPrs_Tools.cpp
//
#include "SketcherPrs_Angle.h"
-#include "SketcherPrs_DimensionStyleListener.h"
+#include "SketcherPrs_DimensionStyle.h"
#include "SketcherPrs_Tools.h"
#include <SketchPlugin_ConstraintAngle.h>
SetDimensionAspect(myAspect);
- myStyleListener = new SketcherPrs_DimensionStyleListener();
+ myStyleListener = new SketcherPrs_DimensionStyle();
}
SketcherPrs_Angle::~SketcherPrs_Angle()
#include <AIS_AngleDimension.hxx>
#include <Standard_DefineHandle.hxx>
-#include <SketcherPrs_DimensionStyleListener.h>
+#include <SketcherPrs_DimensionStyle.h>
DEFINE_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension)
Handle(Prs3d_DimensionAspect) myAspect;
/// Listener to update dimension visualization style
- SketcherPrs_DimensionStyleListener* myStyleListener;
+ SketcherPrs_DimensionStyle* myStyleListener;
/// container of values obtained from the constraint, which are necessary to fill the presentation
gp_Pnt myFirstPoint; ///< the dimension first point for measured geometry
gp_Pnt myCenterPoint; ///< the dimension center point for measured geometry
gp_Pnt myFlyOutPoint; ///< the dimension fly out point for measured geometry
- SketcherPrs_DimensionStyleListener::DimensionValue myValue; /// the structure filled by constraint
+ SketcherPrs_DimensionStyle::DimensionValue myValue; /// the structure filled by constraint
};
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "SketcherPrs_DimensionStyle.h"
+#include <Prs3d_DimensionAspect.hxx>
+#include "SketcherPrs_Tools.h"
+
+#include <Events_Loop.h>
+
+#include <AIS_Dimension.hxx>
+#include <TCollection_ExtendedString.hxx>
+
+//#ifndef WNT
+// #define COMPILATION_CORRECTION
+//#endif
+
+// it is not possible to use 0x2211 as summ symbol because it is not supported by
+// debian Linux platform
+static const Standard_ExtCharacter MyEmptySymbol(' ');
+static const Standard_ExtCharacter MySigmaSymbol('=');//0x03A3); // using equal instead of sigma
+
+
+SketcherPrs_DimensionStyle::DimensionValue::DimensionValue(double theDoubleValue,
+ bool theHasParameters, const std::string& theTextValue)
+: myDoubleValue(theDoubleValue),
+ myHasParameters(theHasParameters),
+ myTextValue(theTextValue)
+{
+}
+
+void SketcherPrs_DimensionStyle::DimensionValue::init(
+ const AttributeDoublePtr& theAttributeValue)
+{
+ myDoubleValue = theAttributeValue->value();
+ myHasParameters = theAttributeValue->usedParameters().size() > 0;
+ myTextValue = theAttributeValue->text();
+}
+
+SketcherPrs_DimensionStyle::SketcherPrs_DimensionStyle()
+{
+}
+
+SketcherPrs_DimensionStyle::~SketcherPrs_DimensionStyle()
+{
+}
+
+void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension,
+ const SketcherPrs_DimensionStyle::DimensionValue& theDimensionValue)
+{
+ if (!theDimension)
+ return;
+ updateDimensions(theDimension, theDimensionValue.myHasParameters,
+ theDimensionValue.myTextValue, theDimensionValue.myDoubleValue);
+}
+
+void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension,
+ const bool theHasParameters,
+ const std::string& theTextValue,
+ const double theDoubleValue)
+{
+ if (!theDimension)
+ return;
+
+ /// do not show special symbols of dimension:
+ /// previous implementation did not allow to unite them
+ theDimension->SetSpecialSymbol(MyEmptySymbol);
+ theDimension->SetDisplaySpecialSymbol(AIS_DSS_No);
+
+ TCollection_ExtendedString aCustomValue;
+ if (theHasParameters) {
+ //bool isParameterTextStyle = myStyle == SketcherPrs_ParameterStyleMessage::ParameterText;
+ bool isParameterTextStyle =
+ SketcherPrs_Tools::parameterStyle() == SketcherPrs_Tools::ParameterText;
+
+ if (isParameterTextStyle)
+ aCustomValue = theTextValue.c_str();
+ else {
+ // format value string using "sprintf"
+ TCollection_AsciiString aFormatStr =
+ theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
+ char aFmtBuffer[256];
+ sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
+ aCustomValue = TCollection_ExtendedString (aFmtBuffer);
+
+ aCustomValue.Insert (1, MySigmaSymbol);
+ }
+ }
+ else {
+ // format value string using "sprintf"
+ TCollection_AsciiString aFormatStr =
+ theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
+ char aFmtBuffer[256];
+ sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
+ aCustomValue = TCollection_ExtendedString (aFmtBuffer);
+ }
+#ifdef COMPILATION_CORRECTION
+ theDimension->SetCustomValue(theDoubleValue);
+#else
+ theDimension->SetCustomValue(aCustomValue);
+#endif
+}
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef SketcherPrs_DimensionStyleListener_H
+#define SketcherPrs_DimensionStyleListener_H
+
+//#include <Events_Listener.h>
+
+#include <ModelAPI_AttributeDouble.h>
+
+#include "SketcherPrs_Tools.h"
+
+#include <Standard.hxx>
+
+#include <string>
+
+/**
+* \class SketcherPrs_DimensionStyleListener
+* \ingroup GUI
+* A class for representation of linear dimension constraint.
+* It supports SketchPlugin_ConstraintLength and SketchPlugin_ConstraintDistance features.
+*/
+class SketcherPrs_DimensionStyle
+{
+public:
+ class DimensionValue {
+ public:
+ DimensionValue(double theDoubleValue, bool theHasParameters, const std::string& theTextValue);
+ /// Fills internal fields by the given attribute
+ /// \param theAttributeValue a model attribute
+ void init(const AttributeDoublePtr& theAttributeValue);
+
+ public:
+ double myDoubleValue; ///< the angle value to be shown as custom value of presentation
+ bool myHasParameters; ///< true if the atrribute value has used parameters
+ std::string myTextValue; ///< the angle value depending on angle type
+ };
+
+public:
+ /// Constructor
+ Standard_EXPORT SketcherPrs_DimensionStyle();
+
+ /// Destructor
+ Standard_EXPORT ~SketcherPrs_DimensionStyle();
+
+ /// Visualizes the dimension text or dimension value depending on the has parameters state
+ /// \param theDimension a modified dimension
+ /// \param theDimensionValue container filled by the model double attribute
+ Standard_EXPORT void updateDimensions(AIS_Dimension* theDimension,
+ const DimensionValue& theDimensionValue);
+
+private:
+ /// Visualizes the dimension text or dimension value depending on the has parameters state
+ /// \param theDimension a modified dimension
+ /// \param theHasParameters if true, the text is shown, else digit
+ /// \param theTextValue a dimension text value
+ /// \param theDoubleValue a dimension digit value
+ void updateDimensions(AIS_Dimension* theDimension,
+ const bool theHasParameters,
+ const std::string& theTextValue,
+ const double theDoubleValue);
+};
+
+#endif
\ No newline at end of file
+++ /dev/null
-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "SketcherPrs_DimensionStyleListener.h"
-#include <Prs3d_DimensionAspect.hxx>
-#include "SketcherPrs_Tools.h"
-
-#include <Events_Loop.h>
-
-#include <AIS_Dimension.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-//#ifndef WNT
-// #define COMPILATION_CORRECTION
-//#endif
-
-// it is not possible to use 0x2211 as summ symbol because it is not supported by
-// debian Linux platform
-static const Standard_ExtCharacter MyEmptySymbol(' ');
-static const Standard_ExtCharacter MySigmaSymbol('=');//0x03A3); // using equal instead of sigma
-
-SketcherPrs_DimensionStyleListener::DimensionValue::DimensionValue(double theDoubleValue,
- bool theHasParameters, const std::string& theTextValue)
-: myDoubleValue(theDoubleValue),
- myHasParameters(theHasParameters),
- myTextValue(theTextValue)
-{
-}
-
-void SketcherPrs_DimensionStyleListener::DimensionValue::init(
- const AttributeDoublePtr& theAttributeValue)
-{
- myDoubleValue = theAttributeValue->value();
- myHasParameters = theAttributeValue->usedParameters().size() > 0;
- myTextValue = theAttributeValue->text();
-}
-
-SketcherPrs_DimensionStyleListener::SketcherPrs_DimensionStyleListener()
-{
- Events_Loop* aLoop = Events_Loop::loop();
- const Events_ID kDocCreatedEvent =
- SketcherPrs_ParameterStyleMessage::eventId();
- aLoop->registerListener(this, kDocCreatedEvent, NULL, false);
-}
-
-SketcherPrs_DimensionStyleListener::~SketcherPrs_DimensionStyleListener()
-{
- Events_Loop* aLoop = Events_Loop::loop();
- aLoop->removeListener(this);
-}
-
-void SketcherPrs_DimensionStyleListener::processEvent(
- const std::shared_ptr<Events_Message>& theMessage)
-{
- const Events_ID kParameterStyleEvent = SketcherPrs_ParameterStyleMessage::eventId();
- if (theMessage->eventID() == kParameterStyleEvent) {
- std::shared_ptr<SketcherPrs_ParameterStyleMessage> aMessage = std::dynamic_pointer_cast<
- SketcherPrs_ParameterStyleMessage>(theMessage);
- myStyle = aMessage->style();
- }
-}
-
-void SketcherPrs_DimensionStyleListener::updateDimensions(AIS_Dimension* theDimension,
- const SketcherPrs_DimensionStyleListener::DimensionValue& theDimensionValue)
-{
- if (!theDimension)
- return;
- updateDimensions(theDimension, theDimensionValue.myHasParameters,
- theDimensionValue.myTextValue, theDimensionValue.myDoubleValue);
-}
-
-void SketcherPrs_DimensionStyleListener::updateDimensions(AIS_Dimension* theDimension,
- const bool theHasParameters,
- const std::string& theTextValue,
- const double theDoubleValue)
-{
- if (!theDimension)
- return;
-
- /// do not show special symbols of dimension: previous implementation did not allow to unite them
- theDimension->SetSpecialSymbol(MyEmptySymbol);
- theDimension->SetDisplaySpecialSymbol(AIS_DSS_No);
-
- TCollection_ExtendedString aCustomValue;
- if (theHasParameters) {
- bool isParameterTextStyle = myStyle == SketcherPrs_ParameterStyleMessage::ParameterText;
-
- if (isParameterTextStyle)
- aCustomValue = theTextValue.c_str();
- else {
- // format value string using "sprintf"
- TCollection_AsciiString aFormatStr =
- theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
- char aFmtBuffer[256];
- sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
- aCustomValue = TCollection_ExtendedString (aFmtBuffer);
-
- aCustomValue.Insert (1, MySigmaSymbol);
- }
- }
- else {
- // format value string using "sprintf"
- TCollection_AsciiString aFormatStr =
- theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
- char aFmtBuffer[256];
- sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
- aCustomValue = TCollection_ExtendedString (aFmtBuffer);
- }
-#ifdef COMPILATION_CORRECTION
- theDimension->SetCustomValue(theDoubleValue);
-#else
- theDimension->SetCustomValue(aCustomValue);
-#endif
-}
-
+++ /dev/null
-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef SketcherPrs_DimensionStyleListener_H
-#define SketcherPrs_DimensionStyleListener_H
-
-#include <Events_Listener.h>
-
-#include <ModelAPI_AttributeDouble.h>
-
-#include "SketcherPrs_Tools.h"
-
-#include <Standard.hxx>
-
-#include <string>
-
-/**
-* \class SketcherPrs_DimensionStyleListener
-* \ingroup GUI
-* A class for representation of linear dimension constraint.
-* It supports SketchPlugin_ConstraintLength and SketchPlugin_ConstraintDistance features.
-*/
-class SketcherPrs_DimensionStyleListener : public Events_Listener
-{
-public:
- class DimensionValue {
- public:
- DimensionValue(double theDoubleValue, bool theHasParameters, const std::string& theTextValue);
- /// Fills internal fields by the given attribute
- /// \param theAttributeValue a model attribute
- void init(const AttributeDoublePtr& theAttributeValue);
-
- public:
- double myDoubleValue; ///< the angle value to be shown as custom value of presentation
- bool myHasParameters; ///< true if the atrribute value has used parameters
- std::string myTextValue; ///< the angle value depending on angle type
- };
-
-public:
- /// Constructor
- Standard_EXPORT SketcherPrs_DimensionStyleListener();
-
- /// Destructor
- Standard_EXPORT ~SketcherPrs_DimensionStyleListener();
-
- /// Process the ModelAPI_DocumentCreatedMessage to fulfill a document
- /// from the message with origin and planes
- virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
-
- /// Visualizes the dimension text or dimension value depending on the has parameters state
- /// \param theDimension a modified dimension
- /// \param theDimensionValue container filled by the model double attribute
- Standard_EXPORT void updateDimensions(AIS_Dimension* theDimension,
- const DimensionValue& theDimensionValue);
-
-private:
- /// Visualizes the dimension text or dimension value depending on the has parameters state
- /// \param theDimension a modified dimension
- /// \param theHasParameters if true, the text is shown, else digit
- /// \param theTextValue a dimension text value
- /// \param theDoubleValue a dimension digit value
- void updateDimensions(AIS_Dimension* theDimension,
- const bool theHasParameters,
- const std::string& theTextValue,
- const double theDoubleValue);
-private:
- /// Style how the parameter of dimension should be visualized
- SketcherPrs_ParameterStyleMessage::ParameterStyle myStyle;
-};
-
-#endif
\ No newline at end of file
#include "SketcherPrs_LengthDimension.h"
#include "SketcherPrs_Tools.h"
-#include "SketcherPrs_DimensionStyleListener.h"
+#include "SketcherPrs_DimensionStyle.h"
#include <SketchPlugin_Constraint.h>
#include <SketchPlugin_ConstraintLength.h>
myValue(0., false, "")
{
SetDimensionAspect(createDimensionAspect());
- myStyleListener = new SketcherPrs_DimensionStyleListener();
+ myStyleListener = new SketcherPrs_DimensionStyle();
setDirection(theConstraint, plane());
}
#include <gp_Pln.hxx>
#include <string>
-#include <SketcherPrs_DimensionStyleListener.h>
+#include <SketcherPrs_DimensionStyle.h>
DEFINE_STANDARD_HANDLE(SketcherPrs_LengthDimension, AIS_LengthDimension)
//Handle(Prs3d_DimensionAspect) myAspect;
/// Listener to update dimension visualization style
- SketcherPrs_DimensionStyleListener* myStyleListener;
+ SketcherPrs_DimensionStyle* myStyleListener;
/// container of values obtained from the constraint, which are necessary
/// to fill the presentation
double myDistance; ///< the flyout distance
/// the structure filled by constraint
- SketcherPrs_DimensionStyleListener::DimensionValue myValue;
+ SketcherPrs_DimensionStyle::DimensionValue myValue;
};
#endif
\ No newline at end of file
#include "SketcherPrs_Radius.h"
#include "SketcherPrs_Tools.h"
-#include "SketcherPrs_DimensionStyleListener.h"
+#include "SketcherPrs_DimensionStyle.h"
#include <SketchPlugin_ConstraintRadius.h>
#include <SketchPlugin_Constraint.h>
myValue(1, false, "")
{
SetDimensionAspect(createDimensionAspect());
- myStyleListener = new SketcherPrs_DimensionStyleListener();
+ myStyleListener = new SketcherPrs_DimensionStyle();
}
SketcherPrs_Radius::~SketcherPrs_Radius()
#include <AIS_RadiusDimension.hxx>
#include <Standard_DefineHandle.hxx>
-#include <SketcherPrs_DimensionStyleListener.h>
+#include <SketcherPrs_DimensionStyle.h>
DEFINE_STANDARD_HANDLE(SketcherPrs_Radius, AIS_RadiusDimension)
SketchPlugin_Sketch* mySketcher;
/// Listener to update dimension visualization style
- SketcherPrs_DimensionStyleListener* myStyleListener;
+ SketcherPrs_DimensionStyle* myStyleListener;
/// container of values obtained from the constraint, which are necessary to fill the presentation
gp_Circ myCircle; ///< the radius circle
gp_Pnt myAnchorPoint; ///< an ancor for the radius value visualization
- SketcherPrs_DimensionStyleListener::DimensionValue myValue; /// the structure filled by constraint
+ SketcherPrs_DimensionStyle::DimensionValue myValue; /// the structure filled by constraint
};
#endif
\ No newline at end of file
namespace SketcherPrs_Tools {
+static ParameterStyle MyStyle = ParameterValue;
+
+void setParameterStyle(ParameterStyle theStyle)
+{
+ MyStyle = theStyle;
+}
+
+ParameterStyle parameterStyle()
+{
+ return MyStyle;
+}
+
AttributePtr getAttribute(ModelAPI_Feature* theFeature, const std::string& theAttrName)
{
AttributePtr anAttribute;
return thePlane->to3D(aFlyoutPnt->x(), aFlyoutPnt->y());
}
-void sendExpressionShownEvent(const bool& theState)
-{
- static Events_ID anId = SketcherPrs_ParameterStyleMessage::eventId();
- std::shared_ptr<SketcherPrs_ParameterStyleMessage> aMessage = std::shared_ptr
- <SketcherPrs_ParameterStyleMessage>(new SketcherPrs_ParameterStyleMessage(anId, 0));
- aMessage->setStyle(theState ? SketcherPrs_ParameterStyleMessage::ParameterText
- : SketcherPrs_ParameterStyleMessage::ParameterValue);
- Events_Loop::loop()->send(aMessage);
- Events_Loop::loop()->flush(anId);
-}
-
void sendEmptyPresentationError(ModelAPI_Feature* theFeature, const std::string theError)
{
Events_InfoMessage("SketcherPrs_Tools",
class GeomDataAPI_Point2D;
class AIS_Dimension;
-//#define MyTextHeight 20
+namespace SketcherPrs_Tools {
-/// Message that style of visualization of parameter is changed.
-/// It will be shown as expression or value
-class SketcherPrs_ParameterStyleMessage : public Events_Message
-{
-public:
/// \enum ParameterStyle lists styles of parameter
enum ParameterStyle {
ParameterValue, ///< using symbol with the parameter value
ParameterText ///< using parameter text
};
-public:
- /// Creates an empty message
- SKETCHERPRS_EXPORT SketcherPrs_ParameterStyleMessage(const Events_ID theID,
- const void* theSender = 0)
- : Events_Message(theID, theSender) {}
- /// The virtual destructor
- SKETCHERPRS_EXPORT virtual ~SketcherPrs_ParameterStyleMessage() {}
- /// Static. Returns EventID of the message.
- SKETCHERPRS_EXPORT static Events_ID eventId()
- {
- static const char * MY_EVENT_PARAMETER_STYLE_ID("ParameterStyle");
- return Events_Loop::eventByName(MY_EVENT_PARAMETER_STYLE_ID);
- }
- /// Returns a document stored in the message
- SKETCHERPRS_EXPORT ParameterStyle style() const { return myStyle; }
- /// Sets a document to the message
- SKETCHERPRS_EXPORT void setStyle(ParameterStyle theStyle) { myStyle = theStyle; }
-private:
- ParameterStyle myStyle; /// style of the parameter visualization
-};
+ /// Set dimensions parameters style
+ /// \param theStyle new style
+ SKETCHERPRS_EXPORT void setParameterStyle(ParameterStyle theStyle);
-namespace SketcherPrs_Tools {
+ /// Return dimensions parameters style
+ SKETCHERPRS_EXPORT ParameterStyle parameterStyle();
/// Enumeration with modes for activation of selection custom presentations
enum SelectionModes {
const ModelAPI_Feature* theConstraint,
const std::shared_ptr<GeomAPI_Ax3>& thePlane);
- /// Sends event about expression visualization type is changed for dimension presentations
- /// Sends event to redisplay all sub-features of composite feature
- /// \param theState a new state
- SKETCHERPRS_EXPORT void sendExpressionShownEvent(const bool& theState);
-
/// Throws an exception(in debug mode) and sends a signal about necessity to hide the object
/// \param theFeature a feature where AIS presentation is empty
/// \param theError a debug error information