00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkView.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00046 #ifndef __vtkView_h 00047 #define __vtkView_h 00048 00049 #include "vtkObject.h" 00050 00051 class vtkAlgorithmOutput; 00052 class vtkCollection; 00053 class vtkCommand; 00054 class vtkDataObject; 00055 class vtkDataRepresentation; 00056 class vtkSelection; 00057 class vtkSelectionLink; 00058 class vtkViewTheme; 00059 00060 class VTK_VIEWS_EXPORT vtkView : public vtkObject 00061 { 00062 public: 00063 static vtkView *New(); 00064 vtkTypeRevisionMacro(vtkView, vtkObject); 00065 void PrintSelf(ostream& os, vtkIndent indent); 00066 00068 void AddRepresentation(vtkDataRepresentation* rep); 00069 00075 vtkDataRepresentation* AddRepresentationFromInputConnection(vtkAlgorithmOutput* conn); 00076 00082 vtkDataRepresentation* AddRepresentationFromInput(vtkDataObject* input); 00083 00085 void RemoveRepresentation(vtkDataRepresentation* rep); 00086 00088 void RemoveRepresentation(vtkAlgorithmOutput* rep); 00089 00091 void RemoveAllRepresentations(); 00092 00094 int GetNumberOfRepresentations(); 00095 00097 vtkDataRepresentation* GetRepresentation(int index = 0); 00098 00100 virtual void Update() { } 00101 00103 virtual void ApplyViewTheme(vtkViewTheme* vtkNotUsed(theme)) { } 00104 00105 //BTX 00107 00110 vtkCommand* GetObserver(); 00111 //ETX 00113 00114 protected: 00115 vtkView(); 00116 ~vtkView(); 00117 00119 00122 virtual void ProcessEvents(vtkObject* caller, unsigned long eventId, 00123 void* callData); 00125 00129 virtual void AddInputConnection(vtkAlgorithmOutput* vtkNotUsed(conn)) { } 00130 00134 virtual void RemoveInputConnection(vtkAlgorithmOutput* vtkNotUsed(conn)) { } 00135 00139 virtual void SetSelectionLink(vtkSelectionLink* vtkNotUsed(link)) { } 00140 00141 vtkCollection* Representations; 00142 00143 private: 00144 vtkView(const vtkView&); // Not implemented. 00145 void operator=(const vtkView&); // Not implemented. 00146 00147 //BTX 00148 class Command; 00149 friend class Command; 00150 Command* Observer; 00151 //ETX 00152 }; 00153 00154 #endif