Salome HOME
Preview was added to Polyline operation
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_AISCurve.h
1 #ifndef HYDROGUI_AIS_CURVE_H\r
2 #define HYDROGUI_AIS_CURVE_H\r
3 \r
4 #include <vector>\r
5 #include <list>\r
6 \r
7 #include <AIS_InteractiveContext.hxx>\r
8 #include <AIS_Point.hxx>\r
9 #include <AIS_Line.hxx>\r
10 #include <CurveCreator_Listener.hxx>\r
11 \r
12 class CurveCreator_Curve;\r
13 class AIS_InteractiveObject;\r
14 class AIS_Point;\r
15 class AIS_Line;\r
16 \r
17 class HYDROGUI_AISCurveSection\r
18 {\r
19 public:\r
20   HYDROGUI_AISCurveSection(  Handle_AIS_InteractiveContext theContext, \r
21     CurveCreator_Curve* theCurve, int theSection );\r
22   virtual ~HYDROGUI_AISCurveSection();\r
23 \r
24   void Display();\r
25   void Erase();\r
26 \r
27   void  highlight( bool isHL );\r
28 protected:\r
29   virtual void buildSection();\r
30   void    getPoint( int theIndx, double& theX, double& theY, double& theZ );\r
31   Handle_AIS_Point getAISPoint( int theIndx );\r
32   Handle_AIS_Line  getAISLine( int theIndx1, int theIndx2 );\r
33   Quantity_Color getActiveColor();\r
34 \r
35 private:\r
36   CurveCreator_Curve*                                 myCurve;\r
37   int                                                 mySection;\r
38   std::vector< Handle_AIS_InteractiveObject >         myObjects;\r
39   Handle_AIS_InteractiveContext                       myContext;\r
40   bool                                                myIsHighlight;\r
41   bool                                                myIsHL;\r
42 };\r
43 \r
44 class HYDROGUI_AISCurve : public CurveCreator_Listener\r
45 {\r
46 public:\r
47   HYDROGUI_AISCurve(CurveCreator_Curve* theCurve, Handle_AIS_InteractiveContext theContext );\r
48   ~HYDROGUI_AISCurve(void);\r
49 \r
50   void setCurve( CurveCreator_Curve* theCurve );\r
51 \r
52   void Display();\r
53 \r
54   virtual void pointInserted( int theSection, int theIndx );\r
55 \r
56   void  highlightSection( int theSection, bool isHL );\r
57   void  clearSelection();\r
58 \r
59 protected:\r
60   virtual void  buildCurve();\r
61   Quantity_Color getActiveColor();\r
62 \r
63 private:\r
64   CurveCreator_Curve*                                 myCurve;\r
65   Handle_AIS_InteractiveContext                       myContext;\r
66   std::vector< HYDROGUI_AISCurveSection* >            myCurveRepresentation; \r
67 };\r
68 \r
69 #endif