]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
3517 ShowNPoints actual Point
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / WidgetShowNPoints.h
1
2 #ifndef __WidgetShowNPoints_h_INCLUDED__
3 #define __WidgetShowNPoints_h_INCLUDED__
4
5 #include "ModelShowNPoints.h"
6 #include "ViewShowNPoints.h"
7
8 #include <wx/panel.h>
9 #include <wx/textctrl.h>
10 #include <wx/slider.h>
11 #include <wx/stattext.h>
12 #include <wx/checkbox.h>
13
14
15 class WidgetShowNPoints : public wxPanel
16 {
17   public:
18           WidgetShowNPoints( wxWindow *parent , int type );
19           ~WidgetShowNPoints();
20       void StopAutoAddPoints();
21       void AutoAddPoints();
22       void OnAutoAddPoints_tool();
23       void OnAutoAddPoints_();
24       void OnAutoAddPoints(wxCommandEvent& event);
25           void OnAddPoint(wxCommandEvent &event);
26       void OnAddPoint_();
27       void OnAddPoint__();
28           void OnInsertPoint(wxCommandEvent& event);//CFT
29       void OnSetPoint_();
30           void OnSetPoint(wxCommandEvent& event);
31       void OnTrackPoint(wxCommandEvent& event);
32       void OnTrackPoint_();
33       void OnTrackPoint_tool();
34       void TrackingPoint();
35       void StopTrackPoint();
36       void DetectCollectionActive();
37
38           void OnRenamePoint(wxCommandEvent& event);
39       void OnErasePoint_();
40           void OnErasePoint(wxCommandEvent& event);
41           void OnEraseLastPoint(wxCommandEvent &event); 
42       void DeleteAllPoints_();
43       void OnDeleteAllPoints_();
44           void OnDeleteAllPoints(wxCommandEvent &event);
45
46           void OnSavePoints(wxCommandEvent &event);   
47           void OnLoadPoints(wxCommandEvent &event);
48
49           virtual void UpdatePoints(wxCommandEvent &event);
50       void UpdatePoints_();
51
52       void InsertCollection();
53       void InsertCollectionBefore_();
54       void OnInsertCollectionBefore_();
55       void OnInsertCollectionBefore(wxCommandEvent &event);
56       void InsertCollectionAfter_();
57       void OnInsertCollectionAfter_();
58       void OnInsertCollectionAfter(wxCommandEvent &event);
59       void OnDeleteCollection_();
60       void OnDeleteCollection(wxCommandEvent &event);
61       void DeleteCollection_();
62       void OnBackCollection(wxCommandEvent &event);
63       void OnNextCollection(wxCommandEvent &event);
64       void OnSaveCollections(wxCommandEvent &event);
65       void OnSaveCollections_( std::string filename );
66       void OnLoadCollections(wxCommandEvent &event);
67       void OnLoadCollections_( std::string filename );
68       void ResetCollections_();
69       void OnResetCollections_();
70       void OnResetCollections(wxCommandEvent &event);
71       void GetCollectionPoint(int idCol,int idPoint, double *pPoint);
72       
73       void SetCollectionPoint(int idCol, int idPoint, std::vector<double> modPoint);
74       void SetActualCollection( int actual );
75     
76       void OnUndo(wxCommandEvent &event);
77       void OnRedo(wxCommandEvent &event);
78       void UndoRedo_SaveCollection();
79       std::string GetUndoRedoFileName();
80
81
82       void RefreshCollectionText();
83       void RefreshColourCollection();
84       void InvertLstPoints_();
85       void OnInvertLstPoints_();
86
87       // EED 2022-05-19
88           //void RefreshPoint(int id);
89       //void RefreshPoints();
90       //void AddVtkPoint();
91
92           void SetColour(std::vector<double> colour);
93           void SetOpacity(double opacity);
94           void SetRadio(double radio);
95           void SetImage(vtkImageData *image);
96           void SetRenderer(vtkRenderer *renderer);
97           void SetReferencePoint(std::vector<double> point);
98
99           void AddPoint(double x, double y, double z, std::string label);
100       void OnInsertPoint_();
101           void InsertPoint(double x, double y, double z, std::string label);//CFT
102
103       int GetLstModelShowNPointsSize();
104           ModelShowNPoints* GetModelShowNPoints();
105           ModelShowNPoints* GetModelShowNPoints(int id);
106       ViewShowNPoints* GetViewShowNPoints();
107           void SetInitLstPoints( std::vector<double> initLstPointsX,  std::vector<double> initLstPointsY, std::vector<double> initLstPointsZ, std::vector<std::string> initLstLabels,  std::vector<int> initLstIndexs );
108
109       void          SetType(int type);
110       int           GetType();
111       double        GetRadio();
112       double        GetOpacity();
113       virtual void  SetOutputBox();
114       void          ErasePoint(int id);
115
116       std::vector<double>       GetLstPointsX();
117       std::vector<double>       GetLstPointsY();
118       std::vector<double>       GetLstPointsZ();
119       std::vector<std::string>  GetLstLabels();
120       std::vector<int>          GetLstIndexs();
121
122   protected:
123   private:
124       std::vector<ViewShowNPoints*>       lstViewShowNPoints;
125           //NTU: For updating points
126           wxStaticText                              * askPointLabel;
127           wxTextCtrl                                * textCtrl;
128       wxStaticText                      * txtNrCollections;
129       wxStaticText                          * txtNrPoints;
130           wxSlider                                  * sdrOpacity;
131           wxSlider                                  * sdrRadio;
132       wxCheckBox                        * cbTrackPoint;
133       wxCheckBox                        * cbAutoAddPoints;
134
135       std::vector<ModelShowNPoints*>    lstModelShowNPoints;
136           int                                                       mtype;
137       int                               mActualCollection;
138       int                               idTrack;
139       int                               idUndoRedo;
140       int                               maxUndoRedo;
141       std::string                       UndoRedoDir;
142 };
143
144
145
146
147
148
149 #endif // __WidgetShowNPoints_h_INCLUDED__
150