VTK
vtkAbstractContextBufferId.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractContextBufferId.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
38 #ifndef vtkAbstractContextBufferId_h
39 #define vtkAbstractContextBufferId_h
40 
41 #include "vtkRenderingContext2DModule.h" // For export macro
42 #include "vtkObject.h"
43 
44 class vtkRenderWindow;
45 
46 class VTKRENDERINGCONTEXT2D_EXPORT vtkAbstractContextBufferId : public vtkObject
47 {
48 public:
50  virtual void PrintSelf(ostream &os, vtkIndent indent);
51 
53 
55 
58  vtkGetMacro(Width,int);
60 
62 
65  vtkSetMacro(Width,int);
67 
69 
72  vtkGetMacro(Height,int);
74 
76 
79  vtkSetMacro(Height,int);
81 
83 
86  virtual void SetContext(vtkRenderWindow *context) = 0;
87  virtual vtkRenderWindow *GetContext() = 0;
89 
94  virtual bool IsSupported() = 0;
95 
101  virtual void Allocate()=0;
102 
106  virtual bool IsAllocated() const=0;
107 
113  virtual void SetValues(int srcXmin,
114  int srcYmin)=0;
115 
124  virtual vtkIdType GetPickedItem(int x, int y)=0;
125 
130  virtual void ReleaseGraphicsResources();
131 
132 protected:
135 
136  int Width;
137  int Height;
138 
139 private:
140  vtkAbstractContextBufferId(const vtkAbstractContextBufferId &) VTK_DELETE_FUNCTION;
141  void operator=(const vtkAbstractContextBufferId &) VTK_DELETE_FUNCTION;
142 };
143 
144 #endif // #ifndef vtkAbstractContextBufferId_h
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkAbstractContextBufferId::~vtkAbstractContextBufferId
virtual ~vtkAbstractContextBufferId()
vtkAbstractContextBufferId::vtkAbstractContextBufferId
vtkAbstractContextBufferId()
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkAbstractContextBufferId::GetPickedItem
virtual vtkIdType GetPickedItem(int x, int y)=0
Return item under abscissa x and ordinate y.
vtkAbstractContextBufferId
2D array of ids, used for picking.
Definition: vtkAbstractContextBufferId.h:47
vtkAbstractContextBufferId::IsAllocated
virtual bool IsAllocated() const =0
Tell if the buffer has been allocated.
vtkAbstractContextBufferId::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources()
Release any graphics resources that are being consumed by this object.
vtkAbstractContextBufferId::SetContext
virtual void SetContext(vtkRenderWindow *context)=0
Set/Get the OpenGL context owning the texture object resource.
vtkAbstractContextBufferId::IsSupported
virtual bool IsSupported()=0
Returns if the context supports the required extensions.
vtkAbstractContextBufferId::GetContext
virtual vtkRenderWindow * GetContext()=0
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkObject.h
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAbstractContextBufferId::Height
int Height
Definition: vtkAbstractContextBufferId.h:137
vtkAbstractContextBufferId::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:87
vtkAbstractContextBufferId::Allocate
virtual void Allocate()=0
Allocate the memory for at least Width*Height elements.
vtkAbstractContextBufferId::Width
int Width
Definition: vtkAbstractContextBufferId.h:136
vtkAbstractContextBufferId::SetValues
virtual void SetValues(int srcXmin, int srcYmin)=0
Copy the contents of the current read buffer to the internal structure starting at lower left corner ...
vtkAbstractContextBufferId::New
static vtkAbstractContextBufferId * New()