VTK  9.0.1
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 =========================================================================*/
38 #ifndef vtkCaptionWidget_h
39 #define vtkCaptionWidget_h
40 
41 #include "vtkBorderWidget.h"
42 #include "vtkInteractionWidgetsModule.h" // For export macro
43 
45 class vtkCaptionActor2D;
46 class vtkHandleWidget;
48 class vtkCaptionAnchorCallback;
49 
50 class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionWidget : public vtkBorderWidget
51 {
52 public:
56  static vtkCaptionWidget* New();
57 
59 
63  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70  void SetEnabled(int enabling) override;
71 
78  {
80  }
81 
83 
91 
95  void CreateDefaultRepresentation() override;
96 
97 protected:
99  ~vtkCaptionWidget() override;
100 
101  // Handles callbacks from the anchor point
102  vtkCaptionAnchorCallback* AnchorCallback;
103 
104  // Widget for the anchor point
106 
107  // Special callbacks for the anchor interaction
111 
112  friend class vtkCaptionAnchorCallback;
113 
114 private:
115  vtkCaptionWidget(const vtkCaptionWidget&) = delete;
116  void operator=(const vtkCaptionWidget&) = delete;
117 };
118 
119 #endif
vtkCaptionWidget::SetEnabled
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the caption leader has its own dedicated widget.
vtkCaptionWidget::AnchorCallback
vtkCaptionAnchorCallback * AnchorCallback
Definition: vtkCaptionWidget.h:102
vtkCaptionWidget::EndAnchorInteraction
void EndAnchorInteraction()
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:73
vtkBorderWidget
place a border around a 2D rectangular region
Definition: vtkBorderWidget.h:82
vtkPointHandleRepresentation3D
represent the position of a point in 3D space
Definition: vtkPointHandleRepresentation3D.h:41
vtkCaptionRepresentation
represents vtkCaptionWidget in the scene
Definition: vtkCaptionRepresentation.h:48
vtkCaptionWidget
widget for placing a caption (text plus leader)
Definition: vtkCaptionWidget.h:51
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:60
vtkCaptionWidget::GetCaptionActor2D
vtkCaptionActor2D * GetCaptionActor2D()
vtkBorderWidget.h
vtkCaptionWidget::New
static vtkCaptionWidget * New()
Instantiate this class.
vtkCaptionWidget::AnchorInteraction
void AnchorInteraction()
vtkCaptionWidget::SetCaptionActor2D
void SetCaptionActor2D(vtkCaptionActor2D *capActor)
Specify a vtkCaptionActor2D to manage.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkCaptionWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkCaptionWidget::~vtkCaptionWidget
~vtkCaptionWidget() override
vtkCaptionWidget::SetRepresentation
void SetRepresentation(vtkCaptionRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkCaptionWidget.h:77
vtkCaptionWidget::HandleWidget
vtkHandleWidget * HandleWidget
Definition: vtkCaptionWidget.h:105
vtkCaptionWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCaptionActor2D
draw text label associated with a point
Definition: vtkCaptionActor2D.h:75
vtkCaptionWidget::vtkCaptionWidget
vtkCaptionWidget()
vtkCaptionWidget::StartAnchorInteraction
void StartAnchorInteraction()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)