]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSurfaceWidget.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / include / wxSurfaceWidget.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxSurfaceWidget.h,v $
5   Language:  C++
6   Date:      $Date: 2009/05/14 13:54:58 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11   
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notice for more information.
15
16 =========================================================================*/
17 #ifndef __WX__3D__SURF__WDG__
18 #define __WX__3D__SURF__WDG__
19
20 #include "vtk3DSurfaceWidget.h"
21 #include <wx/wx.h>
22 #include <wx/slider.h>
23 #include <kernel/marInterface.h>
24
25 //----------------------------------------------------------------------------
26 /**
27  * \brief Panel class composed of a vtk renderwindow with double click available
28  * and add some buttons
29  */
30 class wxSurfaceWidget : public wxPanel , InterfaceVtkPanelWidgets
31 {
32 public:
33   enum ToolBarIDs {
34     ID_TOOL_BAR = 300,
35     ID_BUTTON_NEW_AXIS,
36     ID_BUTTON_DELETE_AXIS,
37     ID_CHECKBOX_ISOVISIBLE,
38     ID_SLIDER_ISOVAL,
39     ID_SLIDER_OPACITY,
40     ID_BUTTON_CHOOSE_COLOR,
41     ID_BUTTON_QUANTIFICATION,
42     ID_BUTTON_MANUAL_AXIS,
43   };
44   
45   enum WidgetsIDs {
46     ID_WORLD3D = 800
47   };
48
49   wxSurfaceWidget( wxWindow* parent, wxWindowID id = -1,
50                   const wxPoint& pos    = wxDefaultPosition,
51                   const wxSize& size    = wxDefaultSize,
52                   long  style                   = 0/*wxScrolledWindowStyle*/,
53                   const wxString& name  = wxPanelNameStr
54                   );
55
56   ~wxSurfaceWidget( );
57
58   void AddAxisActors();
59   void RefreshAxis();
60   void Clean3D();
61
62   //axis toolbar
63   void OnExtractAxis(wxCommandEvent& event);
64   void OnDeleteAxis(wxCommandEvent& event);
65   void OnQuantification(wxCommandEvent& event);
66
67   //surface
68   void OnChooseSurfaceColor(wxCommandEvent& event);
69   void OnIsoVisible(wxCommandEvent& event);
70
71   //slider isovalue
72   void OnSliderIsovalueScrollThumbrelease(wxScrollEvent& event);
73
74   //slider opacity
75   void OnSliderOpacityScrollThumbrelease(wxScrollEvent& event);
76
77   void ShowMARACASData( marInterface* mar );
78
79   void CallBackOnLeftDClick( wxMouseEvent& event );
80   void SetId_toolbar_plans(int _id_toolbar_plans );
81
82   int  GetIsovalue();
83   int  GetOpacity();
84
85   vtk3DSurfaceWidget *GetVtk3DSurfaceWidget();
86         void OnManualAxis(wxCommandEvent& event);
87         void OnRefreshManualAxis(wxCommandEvent& event);
88
89
90   private:
91
92         int                                     _id_toolbar_plans;
93
94     wxButton                    *_bt_new_axis;
95     wxButton                    *_bt_delete_axis;
96     wxButton                    *_bt_call_quantification;
97
98         wxButton                        *_bt_manual_axis; 
99         wxButton                        *_bt_refresh_manual_axis;
100
101     wxStaticText                *_st_cero;
102         wxStaticText            *_st_text;
103     wxStaticText                *_st_one;
104     wxStaticText                *_st_two;
105
106         wxCheckBox                      *_isoVisible;
107         wxSlider                        *_isoValue;
108         wxSlider                        *_opacity;
109         wxButton                        *_surface_color; //mat
110         marInterface            *_mar;
111         vtk3DSurfaceWidget      *_3DWorld;
112
113   DECLARE_EVENT_TABLE( );
114 };
115
116 #endif // __WX__3D__SURF__WDG__