VTK
dox/Interaction/Widgets/vtkCaptionWidget.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCaptionWidget.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00043 #ifndef __vtkCaptionWidget_h
00044 #define __vtkCaptionWidget_h
00045 
00046 #include "vtkInteractionWidgetsModule.h" // For export macro
00047 #include "vtkBorderWidget.h"
00048 
00049 class vtkCaptionRepresentation;
00050 class vtkCaptionActor2D;
00051 class vtkHandleWidget;
00052 class vtkPointHandleRepresentation3D;
00053 class vtkCaptionAnchorCallback;
00054 
00055 
00056 class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionWidget : public vtkBorderWidget
00057 {
00058 public:
00060   static vtkCaptionWidget *New();
00061 
00063 
00064   vtkTypeMacro(vtkCaptionWidget,vtkBorderWidget);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00070   virtual void SetEnabled(int enabling);
00071 
00073 
00076   void SetRepresentation(vtkCaptionRepresentation *r)
00077     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00079 
00081 
00085   void SetCaptionActor2D(vtkCaptionActor2D *capActor);
00086   vtkCaptionActor2D *GetCaptionActor2D();
00088 
00090   void CreateDefaultRepresentation();
00091 
00092 protected:
00093   vtkCaptionWidget();
00094   ~vtkCaptionWidget();
00095 
00096   // Handles callbacks from the anchor point
00097   vtkCaptionAnchorCallback *AnchorCallback;
00098 
00099   // Widget for the anchor point
00100   vtkHandleWidget *HandleWidget;
00101 
00102   // Special callbacks for the anchor interaction
00103   void StartAnchorInteraction();
00104   void AnchorInteraction();
00105   void EndAnchorInteraction();
00106 
00107 //BTX
00108   friend class vtkCaptionAnchorCallback;
00109 //ETX
00110 
00111 private:
00112   vtkCaptionWidget(const vtkCaptionWidget&);  //Not implemented
00113   void operator=(const vtkCaptionWidget&);  //Not implemented
00114 };
00115 
00116 #endif