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

Rendering/vtkCarbonRenderWindowInteractor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCarbonRenderWindowInteractor.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 =========================================================================*/
00028 #ifndef __vtkCarbonRenderWindowInteractor_h
00029 #define __vtkCarbonRenderWindowInteractor_h
00030 
00031 #include "vtkRenderWindowInteractor.h"
00032 
00033 #include <Carbon/Carbon.h> // Needed for Carbon types
00034 
00035 
00036 class VTK_RENDERING_EXPORT vtkCarbonRenderWindowInteractor : public vtkRenderWindowInteractor {
00037 public:
00039   static vtkCarbonRenderWindowInteractor *New();
00040 
00041   vtkTypeRevisionMacro(vtkCarbonRenderWindowInteractor,vtkRenderWindowInteractor);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045   virtual void Initialize();
00046 
00048 
00055   virtual void Enable();
00056   virtual void Disable();
00058 
00062   virtual void Start();
00063 
00065 
00070   vtkSetMacro(InstallMessageProc,int);
00071   vtkGetMacro(InstallMessageProc,int);
00072   vtkBooleanMacro(InstallMessageProc,int);
00074 
00079   void TerminateApp(void);
00080 
00082 
00083   int CreateTimer(int timertype);
00084   int DestroyTimer(void);
00086 
00088 
00092   static void SetClassExitMethod(void (*f)(void *), void *arg);
00093   static void SetClassExitMethodArgDelete(void (*f)(void *));
00095 
00098   virtual void ExitCallback();
00099   
00100 //  int GetButtonDown();
00101 //  void SetButtonDown(int button);
00102 
00103 protected:
00104   vtkCarbonRenderWindowInteractor();
00105   ~vtkCarbonRenderWindowInteractor();
00106 
00107   WindowPtr         WindowId;
00108   EventLoopTimerRef TimerId;
00109   EventHandlerUPP   OldProc;
00110   int               InstallMessageProc;
00111 
00112 
00113   //BTX
00115 
00118   static void (*ClassExitMethod)(void *);
00119   static void (*ClassExitMethodArgDelete)(void *);
00120   static void *ClassExitMethodArg;
00121   //ETX
00123   
00124 private:
00125   vtkCarbonRenderWindowInteractor(const vtkCarbonRenderWindowInteractor&);  // Not implemented.
00126   void operator=(const vtkCarbonRenderWindowInteractor&);  // Not implemented.
00127 };
00128 
00129 #endif
00130 
00131