00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkContextBufferId.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 00024 #ifndef __vtkContextBufferId_h 00025 #define __vtkContextBufferId_h 00026 00027 #include "vtkObject.h" 00028 00029 class vtkIntArray; 00030 00031 class VTK_CHARTS_EXPORT vtkContextBufferId : public vtkObject 00032 { 00033 public: 00034 vtkTypeRevisionMacro(vtkContextBufferId, vtkObject); 00035 virtual void PrintSelf(ostream &os, vtkIndent indent); 00036 00038 static vtkContextBufferId *New(); 00039 00041 00042 vtkGetMacro(Width,int); 00044 00046 00047 vtkSetMacro(Width,int); 00049 00051 00052 vtkGetMacro(Height,int); 00054 00056 00057 vtkSetMacro(Height,int); 00059 00062 void Allocate(); 00063 00065 bool IsAllocated() const; 00066 00068 00071 void SetValue(vtkIdType i, 00072 int value); 00074 00077 int GetValue(vtkIdType i); 00078 00083 vtkIdType GetPickedItem(int x, int y); 00084 00085 protected: 00086 vtkContextBufferId(); 00087 virtual ~vtkContextBufferId(); 00088 00089 int Width; 00090 int Height; 00091 vtkIntArray *IdArray; 00092 00093 private: 00094 vtkContextBufferId(const vtkContextBufferId &); // Not implemented. 00095 void operator=(const vtkContextBufferId &); // Not implemented. 00096 }; 00097 00098 #endif // #ifndef __vtkContextBufferId_h