]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Interaction/SphereWidget.h
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/cpPlugins
[cpPlugins.git] / lib / cpExtensions / Interaction / SphereWidget.h
1 #ifndef __CPEXTENSIONS__INTERACTION__SphereWidget__H__
2 #define __CPEXTENSIONS__INTERACTION__SphereWidget__H__
3
4 #include <cpExtensions/cpExtensions_Export.h>
5 #include <cpExtensions/Interaction/BaseInteractorStyle.h>
6 #include <vtkSphereWidget.h>
7
8 namespace cpExtensions
9 {
10   namespace Interaction
11   {
12     /**
13      */
14     class cpExtensions_EXPORT SphereWidget
15       : public vtkSphereWidget
16     {
17     public:
18       typedef SphereWidget Self;
19       vtkTypeMacro( SphereWidget, vtkSphereWidget );
20
21       typedef cpExtensions::Interaction::BaseInteractorStyle TBaseStyle;
22       typedef TBaseStyle::TMouseCommand TMouseCommand;
23       typedef TBaseStyle::TKeyCommand TKeyCommand;
24
25     public:
26       static Self* New( );
27
28       virtual void SetInteractor( vtkRenderWindowInteractor* rwi );
29       void SetCenter(double* center);
30       
31
32     protected:
33       SphereWidget( );
34       virtual ~SphereWidget( );
35
36       static void _Click(
37         void* data, const TBaseStyle::ButtonID& button,
38         int* idx, double* pos, bool alt, bool ctr, bool sft
39         );
40       static void _DoubleClick(
41         void* data, const TBaseStyle::ButtonID& button,
42         int* idx, double* pos, bool alt, bool ctr, bool sft
43         );
44       static void _MouseMove(
45         void* data, const TBaseStyle::ButtonID& button,
46         int* idx, double* pos, bool alt, bool ctr, bool sft
47         );
48      
49       static void _KeyPress(void* data, const char& key);
50        
51       static void SetCenter(void* data, double* center);
52
53     private:
54       // Purposely not implemented
55       SphereWidget( const Self& );
56       Self& operator=( const Self& );
57     };
58
59   } // ecapseman
60
61 } // ecapseman
62
63 #endif // __CPEXTENSIONS__INTERACTION__SphereWidget__H__
64
65 // eof - $RCSfile$