VTK
dox/Charts/vtkTooltipItem.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTooltipItem.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 =========================================================================*/
00015 
00026 #ifndef __vtkTooltipItem_h
00027 #define __vtkTooltipItem_h
00028 
00029 #include "vtkContextItem.h"
00030 #include "vtkVector.h" // Needed for vtkVector2f
00031 
00032 class vtkPen;
00033 class vtkBrush;
00034 class vtkTextProperty;
00035 
00036 class VTK_CHARTS_EXPORT vtkTooltipItem : public vtkContextItem
00037 {
00038 public:
00039   vtkTypeMacro(vtkTooltipItem, vtkContextItem);
00040   virtual void PrintSelf(ostream &os, vtkIndent indent);
00041 
00043   static vtkTooltipItem *New();
00044 
00046 
00047   vtkSetVector2Macro(Position, float);
00049 
00051 
00052   vtkGetVector2Macro(Position, float);
00054 
00056 
00057   vtkSetStringMacro(Text);
00058   vtkGetStringMacro(Text);
00060 
00062 
00064   vtkGetObjectMacro(Pen, vtkPen);
00066 
00068 
00069   vtkGetObjectMacro(Brush, vtkBrush);
00071 
00073   virtual void Update();
00074 
00076   virtual bool Paint(vtkContext2D *painter);
00077 
00078 //BTX
00079 protected:
00080   vtkTooltipItem();
00081   ~vtkTooltipItem();
00082 
00083   vtkVector2f PositionVector;
00084   float* Position;
00085   char* Text;
00086   vtkTextProperty* TextProperties;
00087   vtkPen* Pen;
00088   vtkBrush* Brush;
00089 
00090 private:
00091   vtkTooltipItem(const vtkTooltipItem &); // Not implemented.
00092   void operator=(const vtkTooltipItem &);   // Not implemented.
00093 //ETX
00094 };
00095 
00096 #endif //__vtkTooltipItem_h