Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Rendering/vtkCocoaRenderWindowInteractor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCocoaRenderWindowInteractor.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00039 #ifndef __vtkCocoaRenderWindowInteractor_h
00040 #define __vtkCocoaRenderWindowInteractor_h
00041 
00042 #include "vtkRenderWindowInteractor.h"
00043 
00044 
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048 
00049 #ifdef __cplusplus
00050 };
00051 #endif
00052 
00053 
00054 
00055 class VTK_RENDERING_EXPORT vtkCocoaRenderWindowInteractor : public vtkRenderWindowInteractor {
00056 public:
00058   static vtkCocoaRenderWindowInteractor *New();
00059 
00060   vtkTypeRevisionMacro(vtkCocoaRenderWindowInteractor,vtkRenderWindowInteractor);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064   virtual void Initialize();
00065 
00067 
00074   virtual void Enable();
00075   virtual void Disable();
00077 
00081   virtual void Start();
00082 
00084 
00089   vtkSetMacro(InstallMessageProc,int);
00090   vtkGetMacro(InstallMessageProc,int);
00091   vtkBooleanMacro(InstallMessageProc,int);
00093 
00098   void TerminateApp(void);
00099 
00101 
00102   int CreateTimer(int timertype);
00103   int DestroyTimer(void);
00105 
00107 
00111   static void SetClassExitMethod(void (*f)(void *), void *arg);
00112   static void SetClassExitMethodArgDelete(void (*f)(void *));
00114 
00117   virtual void ExitCallback();
00118   
00119 //  int GetButtonDown();
00120 //  void SetButtonDown(int button);
00121 
00122 protected:
00123   vtkCocoaRenderWindowInteractor();
00124   ~vtkCocoaRenderWindowInteractor();
00125 
00126   void   *WindowId;
00127   void   *ApplicationId;
00128   int     TimerId;
00129   void   *OldProc;
00130   int     InstallMessageProc;
00131 
00132   //BTX
00134   /*! Class variables so an exit method can be defined for this class (used
00135       to set different exit methods for various language bindings, i.e.
00136       tcl, java, Cocoa) */
00137   static void (*ClassExitMethod)(void *);
00138   static void (*ClassExitMethodArgDelete)(void *);
00139   static void *ClassExitMethodArg;
00140   //ETX
00142   
00143 private:
00144   vtkCocoaRenderWindowInteractor(const vtkCocoaRenderWindowInteractor&);  // Not implemented.
00145   void operator=(const vtkCocoaRenderWindowInteractor&);  // Not implemented.
00146 };
00147 
00148 #endif
00149 
00150