Salome HOME
Update classes documentation
[modules/shaper.git] / src / XGUI / XGUI_CustomPrs.h
index 97bc89133bdf4efd3f53b0373ce4fc874c7bad10..c7fe0bc0b1819dd3f40cf5f6aa4f277a8a62cd14 100644 (file)
@@ -12,6 +12,8 @@
 #include <GeomAPI_AISObject.h>
 #include <ModelAPI_Result.h>
 
+class XGUI_Workshop;
+
 /**
 * Interface of a class which can provide specific customization of
 * object presentation
 class XGUI_CustomPrs : public GeomAPI_ICustomPrs
 {
 public:
+  /// Constructor
+  /// \param theWorkshop the current workshop instance
+  XGUI_EXPORT XGUI_CustomPrs(XGUI_Workshop* theWorkshop);
+
   XGUI_EXPORT virtual ~XGUI_CustomPrs() {};
 
   /// Modifies the given presentation in the custom way.
   virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
                                      std::shared_ptr<GeomAPI_ICustomPrs> theCustomPrs);
+
+  /// Returns color of a result object
+  /// \param theResult a result object
+  /// \param theColor a color in form of RGB vector
+  static void getResultColor(ResultPtr theResult, std::vector<int>& theColor);
+
+  /// Returns the default object color. It obtains colorConfigInfo of the object
+  /// and find it in preferences. If there are no this color in preference and an empty
+  /// color is interpreted as invalid, it shows error message
+  /// \param theObject an investigated object
+  /// \param isEmptyColorValid boolean state about interpretation of empty color
+  /// \param theColor the result color
+  static void XGUI_EXPORT getDefaultColor(ObjectPtr theObject, const bool isEmptyColorValid,
+                                          std::vector<int>& theColor);
+
+
+protected:
+  XGUI_Workshop* myWorkshop; ///< the current workshop
 };
 
 #endif