Salome HOME
oubli
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.h
index 904b82132671fdd1dc329b2ed8d697ff6fcf7f40..83a1e010ef4a0e9676105322008018e9d0ffc829 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2021  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  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
@@ -51,7 +51,7 @@ MODELAPI_EXPORT std::shared_ptr<GeomAPI_Shape> shape(
  */
 MODELAPI_EXPORT std::string getFeatureError(const std::shared_ptr<ModelAPI_Feature>& theFeature);
 
-MODELAPI_EXPORT struct ResultBaseAlgo {
+struct ResultBaseAlgo {
   std::shared_ptr<ModelAPI_ResultBody> resultBody;
   std::shared_ptr<GeomAPI_Shape> baseShape;
   std::shared_ptr<GeomAlgoAPI_MakeShape> makeShape;
@@ -304,6 +304,14 @@ MODELAPI_EXPORT void showIsoLines(std::shared_ptr<ModelAPI_Result> theResult, bo
 
 MODELAPI_EXPORT bool isShownIsoLines(std::shared_ptr<ModelAPI_Result> theResult);
 
+/*! Set visibility of edges direction
+* \param[in] theResult a result object
+* \param[in] theShow is a visibility flag
+*/
+MODELAPI_EXPORT void showEdgesDirection(std::shared_ptr<ModelAPI_Result> theResult, bool theShow);
+
+MODELAPI_EXPORT bool isShowEdgesDirection(std::shared_ptr<ModelAPI_Result> theResult);
+
 /*! Returns current transparency in the given result
 * \param theResult a result object
 * \return a transparency value or -1 if it was not defined
@@ -356,6 +364,16 @@ MODELAPI_EXPORT bool isInResults(AttributeSelectionListPtr theSelection,
 */
 MODELAPI_EXPORT void findRandomColor(std::vector<int>& theValues, bool theReset = false);
 
+/*!
+* Checks the movement of features possibility. The feature cannot appear before the feature
+* depended on it. Used in drag and drop part features.
+* \param theAfter feature after which the moved features are placed, or null for the first place
+* \param theMoved ordered list of the moved features
+* \returns string with error text, dependencies that do not allow make movement or empty string
+*/
+MODELAPI_EXPORT std::wstring validateMovement(
+  const FeaturePtr& theAfter, const std::list<FeaturePtr> theMoved);
+
 }
 
 #endif