VTK  9.0.20201028
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 =========================================================================*/
44 #ifndef vtkCaptionWidget_h
45 #define vtkCaptionWidget_h
46 
47 #include "vtkBorderWidget.h"
48 #include "vtkInteractionWidgetsModule.h" // For export macro
49 
51 class vtkCaptionActor2D;
52 class vtkHandleWidget;
54 class vtkCaptionAnchorCallback;
55 
56 class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionWidget : public vtkBorderWidget
57 {
58 public:
62  static vtkCaptionWidget* New();
63 
65 
69  void PrintSelf(ostream& os, vtkIndent indent) override;
71 
76  void SetEnabled(int enabling) override;
77 
84  {
85  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
86  }
87 
89 
94  void SetCaptionActor2D(vtkCaptionActor2D* capActor);
95  vtkCaptionActor2D* GetCaptionActor2D();
97 
101  void CreateDefaultRepresentation() override;
102 
103 protected:
105  ~vtkCaptionWidget() override;
106 
107  // Handles callbacks from the anchor point
108  vtkCaptionAnchorCallback* AnchorCallback;
109 
110  // Widget for the anchor point
112 
113  // Special callbacks for the anchor interaction
114  void StartAnchorInteraction();
115  void AnchorInteraction();
116  void EndAnchorInteraction();
117 
118  friend class vtkCaptionAnchorCallback;
119 
120 private:
121  vtkCaptionWidget(const vtkCaptionWidget&) = delete;
122  void operator=(const vtkCaptionWidget&) = delete;
123 };
124 
125 #endif
vtkCaptionWidget::AnchorCallback
vtkCaptionAnchorCallback * AnchorCallback
Definition: vtkCaptionWidget.h:108
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:78
vtkBorderWidget
place a border around a 2D rectangular region
Definition: vtkBorderWidget.h:87
vtkBorderWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkPointHandleRepresentation3D
represent the position of a point in 3D space
Definition: vtkPointHandleRepresentation3D.h:40
vtkCaptionRepresentation
represents vtkCaptionWidget in the scene
Definition: vtkCaptionRepresentation.h:47
vtkCaptionWidget
widget for placing a caption (text plus leader)
Definition: vtkCaptionWidget.h:56
vtkBorderWidget.h
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkCaptionWidget::SetRepresentation
void SetRepresentation(vtkCaptionRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkCaptionWidget.h:83
vtkCaptionWidget::HandleWidget
vtkHandleWidget * HandleWidget
Definition: vtkCaptionWidget.h:111
vtkAbstractWidget::SetEnabled
void SetEnabled(int) override
Methods for activating this widget.
vtkCaptionActor2D
draw text label associated with a point
Definition: vtkCaptionActor2D.h:74
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)