Evita  0.16
evRenderWindowInteractor.h
Go to the documentation of this file.
1 /*
2  *
3  * EVITA: Efficient Visualization of Terascale Datasets
4  * Copyright (C) 2000-2016 Team Evita
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
19  * MA 02139, USA.
20  *
21  */
22 
23 /*
24  * evRenderWindowInteractor.h was derived from
25  * vtkFlRenderWindowInteractor.h by Charl P. Botha and others, and is
26  * incorporated into Evita under the auspices of the GPL. The original
27  * header-comment documentation follows.
28  *
29  */
30 
31 /*
32  * vtkFlRenderWindowInteractor - class to enable VTK to render to and interact
33  * with a FLTK window.
34  *
35  * Copyright (c) 2001 Charl P. Botha <cpbotha@ieee.org> http://cpbotha.net/
36  * Based on original code and concept copyright (c) 2000,2001 David Pont
37  *
38  * This library is free software; you can redistribute it and/or
39  * modify it under the terms of the GNU Lesser General Public
40  * License as published by the Free Software Foundation; either
41  * version 2 of the License, or (at your option) any later version.
42  *
43  * This library is distributed in the hope that it will be useful,
44  * but WITHOUT ANY WARRANTY; without even the implied warranty of
45  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
46  * Lesser General Public License for more details.
47  *
48  * You should have received a copy of the GNU Lesser General Public
49  * License along with this library; if not, write to the Free Software
50  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51  *
52  * See the .cxx for more notes.
53  *
54  */
55 
56 #ifndef _evRenderWindowInteractor_h
57 #define _evRenderWindowInteractor_h
58 
59 #include <FL/Fl.H>
60 #include <FL/Fl_Gl_Window.H>
61 
62 #include <vtkAutoInit.h>
63 VTK_MODULE_INIT(vtkRenderingOpenGL);
64 VTK_MODULE_INIT(vtkRenderingVolumeOpenGL);
65 VTK_MODULE_INIT(vtkInteractionStyle);
66 #include <vtkRenderWindowInteractor.h>
67 
68 
69 class evRenderWindowInteractor : public Fl_Gl_Window, public vtkRenderWindowInteractor {
70  protected:
71  // Fl_Gl_Window overrides
72  void flush(void);
73  void draw( void );
74  void resize( int x, int y, int w, int h );
75  int handle( int event );
76 
77  public:
78  // ctors
80  evRenderWindowInteractor( int x, int y, int w, int h, const char *l );
81  // vtk ::New()
82  static evRenderWindowInteractor * New();
83  // dtor
85 
86  // vtkRenderWindowInteractor overrides
87  void Initialize();
88  void Enable();
89  void Disable();
90  void Start();
91  void SetRenderWindow(vtkRenderWindow *aren);
92  void UpdateSize(int x, int y);
93  int CreateTimer(int timertype);
94  int DestroyTimer();
95  void OnTimer(void);
96  void TerminateApp();
97  };
98 
99 #endif
void resize(int x, int y, int w, int h)
int CreateTimer(int timertype)
Definition: evRenderWindowInteractor.h:69
void SetRenderWindow(vtkRenderWindow *aren)
static evRenderWindowInteractor * New()
void UpdateSize(int x, int y)
VTK_MODULE_INIT(vtkRenderingOpenGL)