VTK  9.3.20240418
vtkContextView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
131 #ifndef vtkContextView_h
132 #define vtkContextView_h
133 
134 #include "vtkRenderViewBase.h"
135 #include "vtkSmartPointer.h" // Needed for SP ivars
136 #include "vtkViewsContext2DModule.h" // For export macro
137 
138 VTK_ABI_NAMESPACE_BEGIN
139 class vtkContext2D;
140 class vtkContextScene;
141 
142 class VTKVIEWSCONTEXT2D_EXPORT vtkContextView : public vtkRenderViewBase
143 {
144 public:
145  void PrintSelf(ostream& os, vtkIndent indent) override;
147 
148  static vtkContextView* New();
149 
153  virtual void SetContext(vtkContext2D* context);
154 
159 
163  virtual void SetScene(vtkContextScene* scene);
164 
169 
170 protected:
172  ~vtkContextView() override;
173 
176 
177 private:
178  vtkContextView(const vtkContextView&) = delete;
179  void operator=(const vtkContextView&) = delete;
180 };
181 
182 VTK_ABI_NAMESPACE_END
183 #endif
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:69
Provides a 2D scene for vtkContextItem objects.
provides a view of the vtkContextScene.
virtual vtkContextScene * GetScene()
Get the scene of the view.
virtual void SetContext(vtkContext2D *context)
Set the vtkContext2D for the view.
static vtkContextView * New()
~vtkContextView() override
vtkSmartPointer< vtkContextScene > Scene
virtual void SetScene(vtkContextScene *scene)
Set the scene object for the view.
vtkSmartPointer< vtkContext2D > Context
virtual vtkContext2D * GetContext()
Get the vtkContext2D for the view.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:108
A base view containing a renderer.