VTK  9.3.20240229
vtkCaptionWidget.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
51 #ifndef vtkCaptionWidget_h
52 #define vtkCaptionWidget_h
53 
54 #include "vtkBorderWidget.h"
55 #include "vtkInteractionWidgetsModule.h" // For export macro
56 
57 VTK_ABI_NAMESPACE_BEGIN
59 class vtkCaptionActor2D;
60 class vtkHandleWidget;
62 class vtkCaptionAnchorCallback;
63 
64 class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionWidget : public vtkBorderWidget
65 {
66 public:
70  static vtkCaptionWidget* New();
71 
73 
77  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
84  void SetEnabled(int enabling) override;
85 
92  {
94  }
95 
97 
105 
110 
111 protected:
113  ~vtkCaptionWidget() override;
114 
115  // Handles callbacks from the anchor point
116  vtkCaptionAnchorCallback* AnchorCallback;
117 
118  // Widget for the anchor point
120 
121  // Special callbacks for the anchor interaction
125 
126  friend class vtkCaptionAnchorCallback;
127 
128 private:
129  vtkCaptionWidget(const vtkCaptionWidget&) = delete;
130  void operator=(const vtkCaptionWidget&) = delete;
131 };
132 
133 VTK_ABI_NAMESPACE_END
134 #endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
place a border around a 2D rectangular region
draw text label associated with a point
represents vtkCaptionWidget in the scene
widget for placing a caption (text plus leader)
void AnchorInteraction()
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK class methods.
void StartAnchorInteraction()
static vtkCaptionWidget * New()
Instantiate this class.
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the caption leader has its own dedicated widget.
vtkHandleWidget * HandleWidget
vtkCaptionActor2D * GetCaptionActor2D()
Specify a vtkCaptionActor2D to manage.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRepresentation(vtkCaptionRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
void SetCaptionActor2D(vtkCaptionActor2D *capActor)
Specify a vtkCaptionActor2D to manage.
void EndAnchorInteraction()
vtkCaptionAnchorCallback * AnchorCallback
~vtkCaptionWidget() override
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:108
represent the position of a point in 3D space
abstract class defines interface between the widget and widget representation classes