1 // File: XGUI_Displayer.h
2 // Created: 20 Apr 2014
3 // Author: Natalia ERMOLAEVA
5 #ifndef XGUI_Displayer_H
6 #define XGUI_Displayer_H
11 #include <boost/shared_ptr.hpp>
13 #include <TopoDS_Shape.hxx>
16 class ModelAPI_Feature;
18 /**\class XGUI_Displayer
20 * \brief Displayer. Provides mechanizm of display/erase of objects in the viewer
22 class XGUI_EXPORT XGUI_Displayer
26 /// \param theViewer the viewer
27 XGUI_Displayer(XGUI_Viewer* theViewer);
29 virtual ~XGUI_Displayer();
31 /// Display the feature. Obtain the visualized object from the feature.
32 /// \param theFeature a feature instance
33 /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
34 void Display(boost::shared_ptr<ModelAPI_Feature> theFeature, const bool isUpdateViewer = true);
36 /// Display the feature and a shape. This shape would be associated to the given feature
37 /// \param theFeature a feature instance
38 /// \param theShape a shape
39 /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
40 void Display(boost::shared_ptr<ModelAPI_Feature> theFeature, const TopoDS_Shape& theShape,
41 const bool isUpdateViewer = true);
43 /// Display the shape and activate selection of sub-shapes
44 /// \param theFeature a feature instance
45 /// \param theShape a shape
46 /// \param theMode a local selection mode
47 /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
48 void LocalSelection(boost::shared_ptr<ModelAPI_Feature> theFeature, const TopoDS_Shape& theShape,
49 const int theMode, const bool isUpdateViewer = true);
51 /// Erase the feature and a shape.
52 /// \param theFeature a feature instance
53 /// \param theFeature a shape
54 /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
55 void Erase(boost::shared_ptr<ModelAPI_Feature> theFeature, const TopoDS_Shape& theShape,
56 const bool isUpdateViewer = true);
58 /// Deactivates selection of sub-shapes
59 /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
60 void GlobalSelection(const bool isUpdateViewer = true);
63 XGUI_Viewer* myViewer; ///< the viewer where the objects should be visualized