1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkWin32RenderWindowInteractor.h,v $
6 Date: $Date: 2002/02/01 06:30:49 $
7 Version: $Revision: 1.1.1.1 $
9 Copyright (c) 1993-1998 Ken Martin, Will Schroeder, Bill Lorensen.
11 This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
12 The following terms apply to all files associated with the software unless
13 explicitly disclaimed in individual files. This copyright specifically does
14 not apply to the related textbook "The Visualization Toolkit" ISBN
15 013199837-4 published by Prentice Hall which is covered by its own copyright.
17 The authors hereby grant permission to use, copy, and distribute this
18 software and its documentation for any purpose, provided that existing
19 copyright notices are retained in all copies and that this notice is included
20 verbatim in any distributions. Additionally, the authors grant permission to
21 modify this software and its documentation for any purpose, provided that
22 such modifications are not distributed without the explicit consent of the
23 authors and that existing copyright notices are retained in all copies. Some
24 of the algorithms implemented by this software are patented, observe all
25 applicable patent law.
27 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
28 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
29 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
30 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
33 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
34 PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
35 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
36 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
39 =========================================================================*/
40 // .NAME vtkWin32RenderWindowInteractor - provide an event driven interface
42 // .SECTION Description
43 // vtkWin32RenderWindowInteractor is a convenience object that provides event
44 // event bindings to common graphics functions. For example, camera
45 // zoom-in/zoom-out, azimuth, and roll. It is one of the window system
46 // specific subclasses of vtkRenderWindowInteractor.
49 // vtkRenderWindowInteractor vtkWin32OpenGLRenderWindow
51 // .SECTION Event Bindings
52 // Mouse bindings: Button 1 - rotate, Button 2 - pan, Button 3 - zoom
53 // The distance from the center of the renderer viewport determines
54 // how quickly to rotate, pan and zoom.
56 // r - reset camera view
57 // w - turn all actors wireframe
58 // s - turn all actors surface
62 #ifndef __vtkWin32RenderWindowInteractor_h
63 #define __vtkWin32RenderWindowInteractor_h
66 #include "vtkRenderWindowInteractor.h"
68 class VTK_EXPORT vtkWin32RenderWindowInteractor : public vtkRenderWindowInteractor
71 vtkWin32RenderWindowInteractor();
72 ~vtkWin32RenderWindowInteractor();
73 static vtkWin32RenderWindowInteractor *New() {return new vtkWin32RenderWindowInteractor;};
74 const char *GetClassName() {return "vtkWin32RenderWindowInteractor";};
75 void PrintSelf(ostream& os, vtkIndent indent);
77 virtual void Initialize();
79 void UpdateSize(int,int);
86 void StartAnimation();
89 friend LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg,
94 // Methods to set the default exit method for the class. This method is
95 // only used if no instance level ExitMethod has been defined. It is
96 // provided as a means to control how an interactor is exited given
97 // the various language bindings (tcl, Win32, etc.).
98 static void SetClassExitMethod(void (*f)(void *), void *arg);
99 static void SetClassExitMethodArgDelete(void (*f)(void *));
108 // Class variables so an exit method can be defined for this class
109 // (used to set different exit methods for various language bindings,
110 // i.e. tcl, java, Win32)
111 static void (*ClassExitMethod)(void *);
112 static void (*ClassExitMethodArgDelete)(void *);
113 static void *ClassExitMethodArg;