VTK  9.0.1
vtkTextWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTextWidget.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 =========================================================================*/
31 #ifndef vtkTextWidget_h
32 #define vtkTextWidget_h
33 
35 class vtkTextActor;
36 
37 #include "vtkBorderWidget.h"
38 #include "vtkInteractionWidgetsModule.h" // For export macro
39 
40 class VTKINTERACTIONWIDGETS_EXPORT vtkTextWidget : public vtkBorderWidget
41 {
42 public:
46  static vtkTextWidget* New();
47 
49 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
62  {
63  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
64  }
65 
67 
73  void SetTextActor(vtkTextActor* textActor);
74  vtkTextActor* GetTextActor();
76 
80  void CreateDefaultRepresentation() override;
81 
82 protected:
83  vtkTextWidget();
84  ~vtkTextWidget() override;
85 
86 private:
87  vtkTextWidget(const vtkTextWidget&) = delete;
88  void operator=(const vtkTextWidget&) = delete;
89 };
90 
91 #endif
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
place a border around a 2D rectangular region
void SetRepresentation(vtkTextRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
Definition: vtkTextWidget.h:61
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
widget for placing text on overlay plane
Definition: vtkTextWidget.h:40
static vtkBorderWidget * New()
Method to instantiate class.
represent text for vtkTextWidget
An actor that displays text.
Definition: vtkTextActor.h:50
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetWidgetRepresentation(vtkWidgetRepresentation *r)