00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkCocoaRenderWindowInteractor.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00025 #ifndef __vtkCocoaRenderWindowInteractor_h 00026 #define __vtkCocoaRenderWindowInteractor_h 00027 00028 #include "vtkRenderWindowInteractor.h" 00029 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 #ifdef __cplusplus 00036 }; 00037 #endif 00038 00039 00040 00041 class VTK_RENDERING_EXPORT vtkCocoaRenderWindowInteractor : public vtkRenderWindowInteractor { 00042 public: 00044 static vtkCocoaRenderWindowInteractor *New(); 00045 00046 vtkTypeRevisionMacro(vtkCocoaRenderWindowInteractor,vtkRenderWindowInteractor); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00050 virtual void Initialize(); 00051 00053 00060 virtual void Enable(); 00061 virtual void Disable(); 00063 00067 virtual void Start(); 00068 00070 00075 vtkSetMacro(InstallMessageProc,int); 00076 vtkGetMacro(InstallMessageProc,int); 00077 vtkBooleanMacro(InstallMessageProc,int); 00079 00084 void TerminateApp(void); 00085 00087 00088 int CreateTimer(int timertype); 00089 int DestroyTimer(void); 00091 00093 00097 static void SetClassExitMethod(void (*f)(void *), void *arg); 00098 static void SetClassExitMethodArgDelete(void (*f)(void *)); 00100 00103 virtual void ExitCallback(); 00104 00105 // int GetButtonDown(); 00106 // void SetButtonDown(int button); 00107 00108 protected: 00109 vtkCocoaRenderWindowInteractor(); 00110 ~vtkCocoaRenderWindowInteractor(); 00111 00112 void *WindowId; 00113 void *ApplicationId; 00114 int TimerId; 00115 void *OldProc; 00116 int InstallMessageProc; 00117 00118 //BTX 00120 00123 static void (*ClassExitMethod)(void *); 00124 static void (*ClassExitMethodArgDelete)(void *); 00125 static void *ClassExitMethodArg; 00126 //ETX 00128 00129 private: 00130 vtkCocoaRenderWindowInteractor(const vtkCocoaRenderWindowInteractor&); // Not implemented. 00131 void operator=(const vtkCocoaRenderWindowInteractor&); // Not implemented. 00132 }; 00133 00134 #endif 00135 00136