VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Core/vtkRenderWidget.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004 
00005   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 #ifndef vtkRenderWidget_h
00015 #define vtkRenderWidget_h
00016 
00017 #include "vtkRenderingCoreModule.h" // For export macro
00018 #include "vtkObject.h"
00019 #include "vtkNew.h" // For member variables.
00020 #include "vtkVector.h" // For member variables.
00021 #include <string> // For member variables.
00022 
00023 class vtkAbstractInteractionDevice;
00024 class vtkAbstractRenderDevice;
00025 
00026 class VTKRENDERINGCORE_EXPORT vtkRenderWidget : public vtkObject
00027 {
00028 public:
00029   vtkTypeMacro(vtkRenderWidget ,vtkObject)
00030   void PrintSelf(ostream& os, vtkIndent indent);
00031   static vtkRenderWidget* New();
00032 
00037   void SetPosition(const vtkVector2i &pos);
00038 
00043   vtkVector2i GetPosition() const { return this->Position; }
00044 
00049   void SetSize(const vtkVector2i &size);
00050 
00056   vtkVector2i GetSize() const { return this->Size; }
00057 
00062   void SetName(const std::string &name);
00063 
00068   std::string GetName() const { return this->Name; }
00069 
00073   virtual void Render();
00074 
00080   virtual void MakeCurrent();
00081 
00082   void Initialize();
00083   void Start();
00084 
00085 protected:
00086   vtkRenderWidget();
00087   ~vtkRenderWidget();
00088 
00089   vtkVector2i Position; // Position of the widget in screen coordinates.
00090   vtkVector2i Size; // Position of the widget in screen coordinates.
00091   std::string Name; // The name of the widget.
00092 
00093   vtkNew<vtkAbstractInteractionDevice> InteractionDevice; // Interaction device.
00094   vtkNew<vtkAbstractRenderDevice> RenderDevice; // Render device target.
00095 
00096 private:
00097   vtkRenderWidget(const vtkRenderWidget&);  // Not implemented.
00098   void operator=(const vtkRenderWidget&);  // Not implemented.
00099 };
00100 
00101 #endif