1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkIOSGLView.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 // .NAME vtkIOSGLView - IOS OpenGL rendering context
16 //
17 // .SECTION Description
18 // This class is a subclass of IOS's UIView; it uses Objective-C++.
19 // This class overrides several UIView methods.
20 // To provide the usual VTK keyboard user interface, it overrides the
21 // following methods from NSResponder: acceptsFirstResponder, keyDown:,
22 // keyUp:, and flagsChanged:
23 // To provide the usual VTK mouse user interface, it overrides the
24 // following methods from NSResponder: mouseMoved:, mouseEntered:,
25 // mouseExited: scrollWheel:, mouseDown:, rightMouseDown:,
26 // otherMouseDown:, and resetCursorRects.
27 // To be able to render and draw onscreen, it overrides drawRect:
28 // from UIView.
29 
30 // .SECTION See Also
31 // vtkIOSRenderWindow
32 
33 #ifndef vtkIOSGLView_h
34 #define vtkIOSGLView_h
35 
36 #import <UIKit/UIKit.h>
37 
38 // Note: This file should be includable by both pure Objective-C and Objective-C++ source files.
39 // To achieve this, we use the neat technique below:
40 #ifdef __cplusplus
41   // Forward declarations
42   class vtkIOSRenderWindow;
43   class vtkIOSRenderWindowInteractor;
44 
45   // Type declarations
46   typedef vtkIOSRenderWindow *vtkIOSRenderWindowRef;
47   typedef vtkIOSRenderWindowInteractor *vtkIOSRenderWindowInteractorRef;
48 #else
49   // Type declarations
50   typedef void *vtkIOSRenderWindowRef;
51   typedef void *vtkIOSRenderWindowInteractorRef;
52 #endif
53 
54 @interface vtkIOSGLView : UIView
55 {
56   @private
57   vtkIOSRenderWindowRef _myVTKRenderWindow;
58 }
59 
60 - (vtkIOSRenderWindowRef)getVTKRenderWindow;
61 - (void)setVTKRenderWindow:(vtkIOSRenderWindowRef)theVTKRenderWindow;
62 
63 - (vtkIOSRenderWindowInteractorRef)getInteractor;
64 
65 - (void)setupPipeline;
66 
67 @end
68 
69 #endif /* vtkIOSGLView_h */
70 // VTK-HeaderTest-Exclude: vtkIOSGLView.h
71