VTK: Interaction/Widgets/vtkTextWidget.h Source File

| VTK 9.3.1

vtkTextWidget.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
31 #ifndef vtkTextWidget_h
32 #define vtkTextWidget_h
33
34 #include "vtkBorderWidget.h"
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkTextRepresentation;
39 class vtkTextActor;
40
41 class VTKINTERACTIONWIDGETS_EXPORT vtkTextWidget : public vtkBorderWidget
42 {
43 public:
47 static vtkTextWidget* New();
48
50
53 vtkTypeMacro(vtkTextWidget, vtkBorderWidget);
54 void PrintSelf(ostream& os, vtkIndent indent) override;
56
62 void SetRepresentation(vtkTextRepresentation* r);
63
65
71 void SetTextActor(vtkTextActor* textActor);
72 vtkTextActor* GetTextActor();
74
78 void CreateDefaultRepresentation() override;
79
80 protected:
81 vtkTextWidget();
82 ~vtkTextWidget() override;
83
84 private:
85 vtkTextWidget(const vtkTextWidget&) = delete;
86 void operator=(const vtkTextWidget&) = delete;
87 };
88
89 VTK_ABI_NAMESPACE_END
90 #endif
vtkBorderWidget
place a border around a 2D rectangular region
Definition: vtkBorderWidget.h:88
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkTextActor
An actor that displays text.
Definition: vtkTextActor.h:55
vtkTextRepresentation
represent text for vtkTextWidget
Definition: vtkTextRepresentation.h:40
vtkTextWidget
widget for placing text on overlay plane
Definition: vtkTextWidget.h:42
vtkTextWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
vtkTextWidget::New
static vtkTextWidget * New()
Instantiate class.
vtkTextWidget::~vtkTextWidget
~vtkTextWidget() override
vtkTextWidget::SetTextActor
void SetTextActor(vtkTextActor *textActor)
Specify a vtkTextActor to manage.
vtkTextWidget::GetTextActor
vtkTextActor * GetTextActor()
Specify a vtkTextActor to manage.
vtkTextWidget::SetRepresentation
void SetRepresentation(vtkTextRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkTextWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkTextWidget::vtkTextWidget
vtkTextWidget()
vtkBorderWidget.h