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 "vtkBorderWidget.h" 00047 00048 class vtkCaptionRepresentation; 00049 class vtkCaptionActor2D; 00050 class vtkHandleWidget; 00051 class vtkPointHandleRepresentation3D; 00052 class vtkCaptionAnchorCallback; 00053 00054 00055 class VTK_WIDGETS_EXPORT vtkCaptionWidget : public vtkBorderWidget 00056 { 00057 public: 00059 static vtkCaptionWidget *New(); 00060 00062 00063 vtkTypeMacro(vtkCaptionWidget,vtkBorderWidget); 00064 void PrintSelf(ostream& os, vtkIndent indent); 00066 00069 virtual void SetEnabled(int enabling); 00070 00072 00075 void SetRepresentation(vtkCaptionRepresentation *r) 00076 {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));} 00078 00080 00084 void SetCaptionActor2D(vtkCaptionActor2D *capActor); 00085 vtkCaptionActor2D *GetCaptionActor2D(); 00087 00089 void CreateDefaultRepresentation(); 00090 00091 protected: 00092 vtkCaptionWidget(); 00093 ~vtkCaptionWidget(); 00094 00095 // Handles callbacks from the anchor point 00096 vtkCaptionAnchorCallback *AnchorCallback; 00097 00098 // Widget for the anchor point 00099 vtkHandleWidget *HandleWidget; 00100 00101 // Special callbacks for the anchor interaction 00102 void StartAnchorInteraction(); 00103 void AnchorInteraction(); 00104 void EndAnchorInteraction(); 00105 00106 //BTX 00107 friend class vtkCaptionAnchorCallback; 00108 //ETX 00109 00110 private: 00111 vtkCaptionWidget(const vtkCaptionWidget&); //Not implemented 00112 void operator=(const vtkCaptionWidget&); //Not implemented 00113 }; 00114 00115 #endif