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 "vtkBorderWidget.h"
47 
49 class vtkCaptionActor2D;
50 class vtkHandleWidget;
52 class vtkCaptionAnchorCallback;
53 
54 
56 {
57 public:
59  static vtkCaptionWidget *New();
60 
62 
64  void PrintSelf(ostream& os, vtkIndent indent);
66 
69  virtual void SetEnabled(int enabling);
70 
72 
76  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
78 
80 
84  void SetCaptionActor2D(vtkCaptionActor2D *capActor);
85  vtkCaptionActor2D *GetCaptionActor2D();
87 
90 
91 protected:
94 
95  // Handles callbacks from the anchor point
96  vtkCaptionAnchorCallback *AnchorCallback;
97 
98  // Widget for the anchor point
100 
101  // Special callbacks for the anchor interaction
102  void StartAnchorInteraction();
103  void AnchorInteraction();
104  void EndAnchorInteraction();
105 
106 //BTX
107  friend class vtkCaptionAnchorCallback;
108 //ETX
109 
110 private:
111  vtkCaptionWidget(const vtkCaptionWidget&); //Not implemented
112  void operator=(const vtkCaptionWidget&); //Not implemented
113 };
114 
115 #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
represents vtkCaptionWidget in the scene
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkCaptionAnchorCallback * AnchorCallback
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_WIDGETS_EXPORT
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
draw text label associated with a point
virtual void SetEnabled(int)