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

Fl_VTK_Window.H

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: Fl_VTK_Window.H,v 1.22 2004/06/15 18:40:25 xpxqx Exp $ 00004 * 00005 * Copyright (c) 2002 - 2004 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkfltk.sourceforge.net/Copyright.html 00009 * 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 */ 00016 #ifndef Fl_VTK_WINDOW_H_ 00017 # define Fl_VTK_WINDOW_H_ 00018 # include "vtkFLTKConfigure.h" 00019 // FLTK 00020 # include <FL/Fl_Gl_Window.H> 00021 00022 // hack alert!!! ... for VTK event handler callback (not currently used) 00023 // all subclasses have type() >= this 00024 # define VTK_WINDOW_TYPE (FL_WINDOW+2) 00025 # define VTK_WINDOW_XCLASS "vtkfltk, Vtkfltk" 00026 00027 class vtkProp; 00028 class vtkCamera; 00029 class vtkRenderer; 00030 class vtkRendererCollection; 00031 class vtkRenderWindowInteractor; 00032 class vtkRenderWindow; 00033 class vtkObjectFactory; 00034 00054 class VTK_FLTK_EXPORT Fl_VTK_Window : public Fl_Gl_Window 00055 { 00056 // constructor internals 00057 void Fl_VTK_Window_ (vtkRenderWindowInteractor* = 0); 00058 void Fl_VTK_Window_ (vtkRenderWindow*); 00059 static vtkObjectFactory* Factory; 00060 00061 protected: 00062 // Fl_Gl_Window overrides 00063 virtual void flush (void); 00064 virtual void draw (void); 00065 virtual int handle (int event); 00066 00067 friend class vtkFLTKRenderWindow; 00068 friend class vtkFLTKOpenGLRenderWindow; 00069 friend class vtkFLTKRenderWindowInteractor; 00070 00072 virtual void resize_ (int x, int y, int w, int h) 00073 { this->Fl_Gl_Window::resize(x, y, w, h); } 00074 00075 public: 00077 virtual void resize (int x, int y, int w, int h); 00078 00080 void Update (void); 00081 00084 virtual void SetInteractor (vtkRenderWindowInteractor*); 00085 virtual vtkRenderWindowInteractor* GetInteractor (void); 00090 virtual void SetRenderWindow (vtkRenderWindow*); 00091 virtual vtkRenderWindow* GetRenderWindow (void); 00095 virtual vtkRendererCollection* GetRenderers (void); 00096 00098 virtual vtkRenderer* GetDefaultRenderer (void); 00099 00101 virtual vtkCamera* GetDefaultCamera (void); 00102 00104 virtual void AddProp (vtkProp* prop); 00105 00107 virtual void RemoveProp (vtkProp* prop); 00108 00109 public: 00110 Fl_VTK_Window (int w = 300, int h = 300, const char* label = ""); 00111 Fl_VTK_Window (int x, int y, int w, int h, const char* label = ""); 00112 Fl_VTK_Window (vtkRenderWindowInteractor* o, 00113 int w = 300, int h = 300, const char* label = ""); 00114 Fl_VTK_Window (vtkRenderWindowInteractor* o, 00115 int x, int y, int w, int h, const char* label = ""); 00116 00117 ~Fl_VTK_Window(); 00118 00120 virtual const char* GetClassName (void) { return "Fl_VTK_Window"; } 00121 00124 void SetDebug (int a) { this->Debug = a; } 00125 int GetDebug (void) const { return this->Debug; } 00126 void DebugOn (void) { this->SetDebug(1); } 00127 void DebugOff (void) { this->SetDebug(0); } 00131 static const char* GetEventAsString (int event); 00132 00134 static int desired_mode (int& doubleBuffer, int& stereo, int& multiSample); 00135 00136 protected: 00137 Fl_VTK_Window (vtkRenderWindow* o, 00138 int w = 300, int h = 300, const char* label = ""); 00139 Fl_VTK_Window (vtkRenderWindow* o, 00140 int x, int y, int w, int h, const char* label = ""); 00141 00142 vtkRenderWindowInteractor* Interactor; 00143 vtkRenderWindow* RenderWindow; 00144 00145 vtkRenderer* QueuedRenderer; 00146 00147 int Debug; 00148 00149 static void ClassInitialize (void); 00150 static void ClassFinalize (void); 00151 00152 friend vtkObjectFactory* FlVtkWindowCheckForVtkFLTKObjectFactory (void); 00153 00154 public: 00155 class Init; 00156 friend class Init; 00157 class Init 00158 { 00159 friend class Fl_VTK_Window; 00160 public: 00161 Init (void); 00162 ~Init(); 00163 00164 private: 00165 static long TranslationUnits; 00166 }; 00167 00168 private: 00169 Fl_VTK_Window (const Fl_VTK_Window&); // Not implemented. 00170 void operator= (const Fl_VTK_Window&); // Not implemented. 00171 }; 00172 00176 static Fl_VTK_Window::Init FlVtkWindowInitInstance; 00177 00178 #endif /* Fl_VTK_WINDOW_H_ */ 00179 /* 00180 * End of: $Id: Fl_VTK_Window.H,v 1.22 2004/06/15 18:40:25 xpxqx Exp $. 00181 * 00182 */

Generated on Tue Aug 10 04:24:12 2004 for vtkFLTK by doxygen 1.3.7