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

Rendering/vtkWin32RenderWindowInteractor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWin32RenderWindowInteractor.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 =========================================================================*/
00051 #ifndef __vtkWin32RenderWindowInteractor_h
00052 #define __vtkWin32RenderWindowInteractor_h
00053 
00054 #include "vtkRenderWindowInteractor.h"
00055 
00056 class VTK_RENDERING_EXPORT vtkWin32RenderWindowInteractor : public vtkRenderWindowInteractor 
00057 {
00058 public:
00060   static vtkWin32RenderWindowInteractor *New();
00061 
00062   vtkTypeRevisionMacro(vtkWin32RenderWindowInteractor,vtkRenderWindowInteractor);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00064 
00066   virtual void Initialize();
00067 
00069 
00076   virtual void Enable();
00077   virtual void Disable();
00079 
00083   virtual void Start();
00084 
00086 
00091   vtkSetMacro(InstallMessageProc,int);
00092   vtkGetMacro(InstallMessageProc,int);
00093   vtkBooleanMacro(InstallMessageProc,int);
00095 
00100   void TerminateApp(void);
00101 
00103 
00104   int CreateTimer(int timertype);
00105   int DestroyTimer(void);
00107 
00108   //BTX
00109   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
00110   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
00111 
00113 
00115   virtual void OnMouseMove  (HWND wnd, UINT nFlags, int X, int Y);
00116   virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
00117   virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00118   virtual void OnRButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00119   virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00120   virtual void OnMButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00121   virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00122   virtual void OnLButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
00123   virtual void OnSize       (HWND wnd, UINT nType,  int X, int Y);
00124   virtual void OnTimer      (HWND wnd, UINT nIDEvent);
00125   virtual void OnKeyDown    (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00126   virtual void OnKeyUp      (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00127   virtual void OnChar       (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00128   //ETX
00130 
00132 
00136   static void SetClassExitMethod(void (*f)(void *), void *arg);
00137   static void SetClassExitMethodArgDelete(void (*f)(void *));
00139 
00142   virtual void ExitCallback();
00143 
00144 protected:
00145   vtkWin32RenderWindowInteractor();
00146   ~vtkWin32RenderWindowInteractor();
00147 
00148   HWND    WindowId;
00149   UINT    TimerId;
00150   WNDPROC OldProc;
00151   int     InstallMessageProc;
00152 
00153   int     MouseInWindow;
00154 
00155   //BTX
00157 
00160   static void (*ClassExitMethod)(void *);
00161   static void (*ClassExitMethodArgDelete)(void *);
00162   static void *ClassExitMethodArg;
00163   //ETX
00165 
00166 private:
00167   vtkWin32RenderWindowInteractor(const vtkWin32RenderWindowInteractor&);  // Not implemented.
00168   void operator=(const vtkWin32RenderWindowInteractor&);  // Not implemented.
00169 };
00170 
00171 #endif
00172