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

vtkWin32RenderWindowInteractor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWin32RenderWindowInteractor.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 =========================================================================*/
00035 #ifndef __vtkWin32RenderWindowInteractor_h
00036 #define __vtkWin32RenderWindowInteractor_h
00037 
00038 #include "vtkRenderWindowInteractor.h"
00039 #include "vtkWindows.h" // For windows API.
00040 
00041 class VTK_RENDERING_EXPORT vtkWin32RenderWindowInteractor : public vtkRenderWindowInteractor 
00042 {
00043 public:
00045   static vtkWin32RenderWindowInteractor *New();
00046 
00047   vtkTypeRevisionMacro(vtkWin32RenderWindowInteractor,vtkRenderWindowInteractor);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051   virtual void Initialize();
00052 
00054 
00061   virtual void Enable();
00062   virtual void Disable();
00064 
00068   virtual void Start();
00069 
00071 
00076   vtkSetMacro(InstallMessageProc,int);
00077   vtkGetMacro(InstallMessageProc,int);
00078   vtkBooleanMacro(InstallMessageProc,int);
00080 
00085   void TerminateApp(void);
00086 
00088 
00089   int CreateTimer(int timertype);
00090   int DestroyTimer(void);
00092 
00093   //BTX
00094   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
00095   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
00096 
00098 
00100   virtual void OnMouseMove  (HWND wnd, UINT nFlags, int X, int Y);
00101   virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
00102   virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
00103   virtual void OnRButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00104   virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
00105   virtual void OnMButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00106   virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
00107   virtual void OnLButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00108   virtual void OnSize       (HWND wnd, UINT nType,  int X, int Y);
00109   virtual void OnTimer      (HWND wnd, UINT nIDEvent);
00110   virtual void OnKeyDown    (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00111   virtual void OnKeyUp      (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00112   virtual void OnChar       (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00113   virtual void OnMouseWheelForward (HWND wnd, UINT nFlags, int X, int Y);
00114   virtual void OnMouseWheelBackward(HWND wnd, UINT nFlags, int X, int Y);
00115   //ETX
00117 
00119 
00123   static void SetClassExitMethod(void (*f)(void *), void *arg);
00124   static void SetClassExitMethodArgDelete(void (*f)(void *));
00126 
00129   virtual void ExitCallback();
00130 
00131 protected:
00132   vtkWin32RenderWindowInteractor();
00133   ~vtkWin32RenderWindowInteractor();
00134 
00135   HWND    WindowId;
00136   UINT    TimerId;
00137   WNDPROC OldProc;
00138   int     InstallMessageProc;
00139 
00140   int     MouseInWindow;
00141 
00142   //BTX
00144 
00147   static void (*ClassExitMethod)(void *);
00148   static void (*ClassExitMethodArgDelete)(void *);
00149   static void *ClassExitMethodArg;
00150   //ETX
00152 
00153 private:
00154   vtkWin32RenderWindowInteractor(const vtkWin32RenderWindowInteractor&);  // Not implemented.
00155   void operator=(const vtkWin32RenderWindowInteractor&);  // Not implemented.
00156 };
00157 
00158 #endif
00159 

Generated on Mon Jan 21 23:07:36 2008 for VTK by  doxygen 1.4.3-20050530