Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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 =========================================================================*/
    00052 #ifndef __vtkWin32RenderWindowInteractor_h
    00053 #define __vtkWin32RenderWindowInteractor_h
    00054
    00055 #include "vtkRenderWindowInteractor.h"
    00056
    00057 class VTK_RENDERING_EXPORT vtkWin32RenderWindowInteractor : public vtkRenderWindowInteractor
    00058 {
    00059 public:
    00061   static vtkWin32RenderWindowInteractor *New();
    00062
    00063   vtkTypeRevisionMacro(vtkWin32RenderWindowInteractor,vtkRenderWindowInteractor);
    00064   void PrintSelf(ostream& os, vtkIndent indent);
    00065
    00067   virtual void Initialize();
    00068
    00070
    00077   virtual void Enable();
    00078   virtual void Disable();
    00080
    00084   virtual void Start();
    00085
    00087
    00092   vtkSetMacro(InstallMessageProc,int);
    00093   vtkGetMacro(InstallMessageProc,int);
    00094   vtkBooleanMacro(InstallMessageProc,int);
    00096
    00101   void TerminateApp(void);
    00102
    00104
    00105   int CreateTimer(int timertype);
    00106   int DestroyTimer(void);
    00108
    00109   //BTX
    00110   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
    00111   friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
    00112
    00114
    00116   virtual void OnMouseMove  (HWND wnd, UINT nFlags, int X, int Y);
    00117   virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
    00118   virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y);
    00119   virtual void OnRButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
    00120   virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y);
    00121   virtual void OnMButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
    00122   virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y);
    00123   virtual void OnLButtonUp  (HWND wnd, UINT nFlags, int X, int Y);
    00124   virtual void OnSize       (HWND wnd, UINT nType,  int X, int Y);
    00125   virtual void OnTimer      (HWND wnd, UINT nIDEvent);
    00126   virtual void OnKeyDown    (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
    00127   virtual void OnKeyUp      (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
    00128   virtual void OnChar       (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
    00129   //ETX
    00131
    00133   /*! Methods to set the default exit method for the class. This method is
    00134       only used if no instance level ExitMethod has been defined.  It is
    00135       provided as a means to control how an interactor is exited given the
    00136       various language bindings (tcl, Win32, etc.). */
    00137   static void SetClassExitMethod(void (*f)(void *), void *arg);
    00138   static void SetClassExitMethodArgDelete(void (*f)(void *));
    00140
    00143   virtual void ExitCallback();
    00144
    00145 protected:
    00146   vtkWin32RenderWindowInteractor();
    00147   ~vtkWin32RenderWindowInteractor();
    00148
    00149   HWND    WindowId;
    00150   UINT    TimerId;
    00151   WNDPROC OldProc;
    00152   int     InstallMessageProc;
    00153
    00154   int     MouseInWindow;
    00155
    00156   //BTX
    00158   /*! Class variables so an exit method can be defined for this class (used
    00159       to set different exit methods for various language bindings, i.e.
    00160       tcl, java, Win32) */
    00161   static void (*ClassExitMethod)(void *);
    00162   static void (*ClassExitMethodArgDelete)(void *);
    00163   static void *ClassExitMethodArg;
    00164   //ETX
    00166
    00167 private:
    00168   vtkWin32RenderWindowInteractor(const vtkWin32RenderWindowInteractor&);  // Not implemented.
    00169   void operator=(const vtkWin32RenderWindowInteractor&);  // Not implemented.
    00170 };
    00171
    00172 #endif
    00173