VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkContextBufferId.h 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 00024 #ifndef __vtkContextBufferId_h 00025 #define __vtkContextBufferId_h 00026 00027 #include "vtkRenderingContext2DModule.h" // For export macro 00028 #include "vtkAbstractContextBufferId.h" 00029 00030 class vtkIntArray; 00031 00032 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextBufferId : public vtkAbstractContextBufferId 00033 { 00034 public: 00035 vtkTypeMacro(vtkContextBufferId, vtkAbstractContextBufferId); 00036 virtual void PrintSelf(ostream &os, vtkIndent indent); 00037 00039 static vtkContextBufferId *New(); 00040 00043 virtual void Allocate(); 00044 00046 virtual bool IsAllocated() const; 00047 00049 00052 virtual void SetValues(int srcXmin, 00053 int srcYmin); 00055 00060 virtual vtkIdType GetPickedItem(int x, int y); 00061 00062 protected: 00063 vtkContextBufferId(); 00064 virtual ~vtkContextBufferId(); 00065 00067 00070 void SetValue(vtkIdType i, 00071 int value); 00073 00076 int GetValue(vtkIdType i); 00077 00078 vtkIntArray *IdArray; 00079 00080 private: 00081 vtkContextBufferId(const vtkContextBufferId &); // Not implemented. 00082 void operator=(const vtkContextBufferId &); // Not implemented. 00083 }; 00084 00085 #endif // #ifndef __vtkContextBufferId_h