VTK  9.2.20230322
vtkCaptionWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCaptionWidget.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 =========================================================================*/
63 #ifndef vtkCaptionWidget_h
64 #define vtkCaptionWidget_h
65 
66 #include "vtkBorderWidget.h"
67 #include "vtkInteractionWidgetsModule.h" // For export macro
68 
69 VTK_ABI_NAMESPACE_BEGIN
71 class vtkCaptionActor2D;
72 class vtkHandleWidget;
74 class vtkCaptionAnchorCallback;
75 
76 class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionWidget : public vtkBorderWidget
77 {
78 public:
82  static vtkCaptionWidget* New();
83 
85 
89  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
96  void SetEnabled(int enabling) override;
97 
104  {
106  }
107 
109 
117 
122 
123 protected:
125  ~vtkCaptionWidget() override;
126 
127  // Handles callbacks from the anchor point
128  vtkCaptionAnchorCallback* AnchorCallback;
129 
130  // Widget for the anchor point
132 
133  // Special callbacks for the anchor interaction
137 
138  friend class vtkCaptionAnchorCallback;
139 
140 private:
141  vtkCaptionWidget(const vtkCaptionWidget&) = delete;
142  void operator=(const vtkCaptionWidget&) = delete;
143 };
144 
145 VTK_ABI_NAMESPACE_END
146 #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:120
represent the position of a point in 3D space
abstract class defines interface between the widget and widget representation classes