VTK
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 =========================================================================*/
43 #ifndef vtkCaptionWidget_h
44 #define vtkCaptionWidget_h
45 
46 #include "vtkInteractionWidgetsModule.h" // For export macro
47 #include "vtkBorderWidget.h"
48 
50 class vtkCaptionActor2D;
51 class vtkHandleWidget;
53 class vtkCaptionAnchorCallback;
54 
55 
57 {
58 public:
60  static vtkCaptionWidget *New();
61 
63 
65  void PrintSelf(ostream& os, vtkIndent indent);
67 
70  virtual void SetEnabled(int enabling);
71 
73 
77  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
79 
81 
85  void SetCaptionActor2D(vtkCaptionActor2D *capActor);
86  vtkCaptionActor2D *GetCaptionActor2D();
88 
91 
92 protected:
95 
96  // Handles callbacks from the anchor point
97  vtkCaptionAnchorCallback *AnchorCallback;
98 
99  // Widget for the anchor point
101 
102  // Special callbacks for the anchor interaction
103  void StartAnchorInteraction();
104  void AnchorInteraction();
105  void EndAnchorInteraction();
106 
107 //BTX
108  friend class vtkCaptionAnchorCallback;
109 //ETX
110 
111 private:
112  vtkCaptionWidget(const vtkCaptionWidget&); //Not implemented
113  void operator=(const vtkCaptionWidget&); //Not implemented
114 };
115 
116 #endif
widget for placing a caption (text plus leader)
virtual void CreateDefaultRepresentation()
void SetRepresentation(vtkCaptionRepresentation *r)
place a border around a 2D rectangular region
vtkHandleWidget * HandleWidget
represent the position of a point in 3D space
static vtkBorderWidget * New()
a general widget for moving handles
#define VTKINTERACTIONWIDGETS_EXPORT
represents vtkCaptionWidget in the scene
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkCaptionAnchorCallback * AnchorCallback
void PrintSelf(ostream &os, vtkIndent indent)
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
draw text label associated with a point
virtual void SetEnabled(int)