Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 =========================================================================*/
00047 #ifndef __vtkWin32RenderWindowInteractor_h
00048 #define __vtkWin32RenderWindowInteractor_h
00049 
00050 #include "vtkRenderWindowInteractor.h"
00051 
00052 class VTK_RENDERING_EXPORT vtkWin32RenderWindowInteractor : public vtkRenderWindowInteractor 
00053 {
00054 public:
00056   static vtkWin32RenderWindowInteractor *New();
00057 
00058   vtkTypeRevisionMacro(vtkWin32RenderWindowInteractor,vtkRenderWindowInteractor);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062   virtual void Initialize();
00063 
00065 
00072   virtual void Enable();
00073   virtual void Disable();
00075 
00079   virtual void Start();
00080 
00082 
00087   vtkSetMacro(InstallMessageProc,int);
00088   vtkGetMacro(InstallMessageProc,int);
00089   vtkBooleanMacro(InstallMessageProc,int);
00091 
00096   void TerminateApp(void);
00097 
00099 
00100   int CreateTimer(int timertype);
00101   int DestroyTimer(void);
00103 
00104   //BTX
00105   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
00106   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
00107 
00109 
00111   virtual void OnMouseMove  (HWND wnd, UINT nFlags, int X, int Y);
00112   virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
00113   virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00114   virtual void OnRButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00115   virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00116   virtual void OnMButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00117   virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00118   virtual void OnLButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00119   virtual void OnSize       (HWND wnd, UINT nType,  int X, int Y);
00120   virtual void OnTimer      (HWND wnd, UINT nIDEvent);
00121   virtual void OnKeyDown    (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00122   virtual void OnKeyUp      (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00123   virtual void OnChar       (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00124   virtual void OnMouseWheelForward (HWND wnd, UINT nFlags, int X, int Y);
00125   virtual void OnMouseWheelBackward(HWND wnd, UINT nFlags, int X, int Y);
00126   //ETX
00128 
00130 
00134   static void SetClassExitMethod(void (*f)(void *), void *arg);
00135   static void SetClassExitMethodArgDelete(void (*f)(void *));
00137 
00140   virtual void ExitCallback();
00141 
00142 protected:
00143   vtkWin32RenderWindowInteractor();
00144   ~vtkWin32RenderWindowInteractor();
00145 
00146   HWND    WindowId;
00147   UINT    TimerId;
00148   WNDPROC OldProc;
00149   int     InstallMessageProc;
00150 
00151   int     MouseInWindow;
00152 
00153   //BTX
00155 
00158   static void (*ClassExitMethod)(void *);
00159   static void (*ClassExitMethodArgDelete)(void *);
00160   static void *ClassExitMethodArg;
00161   //ETX
00163 
00164 private:
00165   vtkWin32RenderWindowInteractor(const vtkWin32RenderWindowInteractor&);  // Not implemented.
00166   void operator=(const vtkWin32RenderWindowInteractor&);  // Not implemented.
00167 };
00168 
00169 #endif
00170