Salome HOME
Dump Bathymetry data to python script (Feature #13).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_AISCurve.h
1 #ifndef HYDROGUI_AIS_CURVE_H
2
3 #define HYDROGUI_AIS_CURVE_H
4
5
6
7 #include <vector>
8
9 #include <list>
10
11
12
13 #include <AIS_InteractiveContext.hxx>
14
15 #include <AIS_Point.hxx>
16
17 #include <AIS_Line.hxx>
18
19 #include <CurveCreator_Listener.hxx>
20
21
22
23 class CurveCreator_Curve;
24
25 class AIS_InteractiveObject;
26
27 class AIS_Point;
28
29 class AIS_Line;
30
31
32
33 class HYDROGUI_AISCurveSection
34
35 {
36
37 public:
38
39   HYDROGUI_AISCurveSection(  Handle_AIS_InteractiveContext theContext, 
40
41     CurveCreator_Curve* theCurve, int theSection );
42
43   virtual ~HYDROGUI_AISCurveSection();
44
45
46
47   void Display();
48
49   void Erase();
50
51
52
53   void  highlight( bool isHL );
54
55 protected:
56
57   virtual void buildSection();
58
59   void    getPoint( int theIndx, double& theX, double& theY, double& theZ );
60
61   Handle_AIS_Point getAISPoint( int theIndx );
62
63   Handle_AIS_Line  getAISLine( int theIndx1, int theIndx2 );
64
65   Quantity_Color getActiveColor();
66
67
68
69 private:
70
71   CurveCreator_Curve*                                 myCurve;
72
73   int                                                 mySection;
74
75   std::vector< Handle_AIS_InteractiveObject >         myObjects;
76
77   Handle_AIS_InteractiveContext                       myContext;
78
79   bool                                                myIsHighlight;
80
81   bool                                                myIsHL;
82
83 };
84
85
86
87 class HYDROGUI_AISCurve : public CurveCreator_Listener
88
89 {
90
91 public:
92
93   HYDROGUI_AISCurve(CurveCreator_Curve* theCurve, Handle_AIS_InteractiveContext theContext );
94
95   ~HYDROGUI_AISCurve(void);
96
97
98
99   void setCurve( CurveCreator_Curve* theCurve );
100
101
102
103   void Display();
104
105
106
107   virtual void pointInserted( int theSection, int theIndx );
108
109
110
111   void  highlightSection( int theSection, bool isHL );
112
113   void  clearSelection();
114
115
116
117 protected:
118
119   virtual void  buildCurve();
120
121   Quantity_Color getActiveColor();
122
123
124
125 private:
126
127   CurveCreator_Curve*                                 myCurve;
128
129   Handle_AIS_InteractiveContext                       myContext;
130
131   std::vector< HYDROGUI_AISCurveSection* >            myCurveRepresentation; 
132
133 };
134
135
136
137 #endif