00001 00002 // Name: wxGuiTest/VtkWxGuiTesting/VtkWxGuiTestHelper.h 00003 // Author: Reinhold Fuereder 00004 // Created: 2004 00005 // Copyright: (c) 2005 Reinhold Fuereder 00006 // Licence: wxWindows licence 00007 // 00008 // $Id$ 00010 00011 #ifndef VTKWXGUITESTHELPER_H 00012 #define VTKWXGUITESTHELPER_H 00013 00014 #ifdef __GNUG__ 00015 #pragma interface "VtkWxGuiTestHelper.h" 00016 #endif 00017 00018 #include <wxGuiTest/Common.h> 00019 00020 #include <map> 00021 00022 class wxVTKRenderWindowInteractor; 00023 00024 namespace wxTst { 00025 00026 class WxVtkInteractorEventRecorder; 00027 00028 00032 class VtkWxGuiTestHelper 00033 { 00034 public: 00035 typedef std::map < wxString, WxVtkInteractorEventRecorder * > RecorderMap; 00036 RecorderMap m_recorderMap; 00037 00038 public: 00044 static VtkWxGuiTestHelper * GetInstance (); 00045 00046 00050 static void Destroy (); 00051 00052 00058 static void SetUseWxVtkInteractionRecording (bool use); 00059 00060 00066 static bool GetUseWxVtkInteractionRecording (); 00067 00068 00080 virtual void RegisterForRecording (wxVTKRenderWindowInteractor *wxVtkRwi, 00081 const wxString &recorderId, const wxString &wxVtkId); 00082 00083 00091 virtual WxVtkInteractorEventRecorder * GetWxVtkRecorder ( 00092 const wxString &recorderId) const; 00093 00094 00100 virtual RecorderMap & GetWxVtkRecorders (); 00101 00102 protected: 00106 VtkWxGuiTestHelper (); 00107 00108 00112 virtual ~VtkWxGuiTestHelper (); 00113 00114 private: 00115 static VtkWxGuiTestHelper *ms_instance; 00116 00117 static bool ms_useWxVtkInteractionRecording; 00118 00119 private: 00120 // No copy and assignment constructor: 00121 VtkWxGuiTestHelper (const VtkWxGuiTestHelper &rhs); 00122 VtkWxGuiTestHelper & operator= (const VtkWxGuiTestHelper &rhs); 00123 }; 00124 00125 } // End namespace wxTst 00126 00127 #endif // VTKWXGUITESTHELPER_H