Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / PartSet / PartSet_TestOCC.h
1 // File:        PartSet_TestOCC.h
2 // Created:     28 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef PartSet_TestOCC_H
6 #define PartSet_TestOCC_H
7
8 #include "PartSet.h"
9
10 class XGUI_Workshop;
11 class Handle_AIS_InteractiveContext;
12 class Handle_V3d_View;
13
14 /*!
15  \class PartSet_TestOCC
16  * \brief The operation to test OCC viewer work
17 */
18 class PARTSET_EXPORT PartSet_TestOCC
19 {
20 public:
21   PartSet_TestOCC() {};
22
23   /// Creates a line feature, select it, modify the line. Check whether the highlight is correct.
24   /// \param the workshop to provide an access to the application information
25   static void testSelection(XGUI_Workshop* theWorkshop);
26
27   /// Creates row OCC presentation, activate in the local context, modify it and check selection
28   /// BUG: The result contains the selection from the first presentation
29   /// \param theContext a viewer interactive context
30   /// \param theContext a view
31   static void local_selection_change_shape(Handle_AIS_InteractiveContext theContext,
32                                            Handle_V3d_View theView);
33
34   /// Creates row OCC presentation, activate in the local context, select it, erase the presentation
35   /// BUG: The selected shape are in the viewer even after erase
36   /// \param theContext a viewer interactive context
37   /// \param theContext a view
38   static void local_selection_erase(Handle_AIS_InteractiveContext theContext,
39                                     Handle_V3d_View theView);
40
41 private:
42
43   /// Creates a temporary line
44   /// \param the workshop to get the operation manager and the displayer
45   static void createTestLine(XGUI_Workshop* theWorkshop);
46
47   /// Changes a temporary line
48   /// \param the workshop to get the operation manager and the displayer
49   static void changeTestLine(XGUI_Workshop* theWorkshop);
50
51   /// Emulates the mouse moving in the viewer
52   static void moveMouse(Handle_AIS_InteractiveContext theContext, Handle_V3d_View theView);
53 };
54
55 #endif