VTK
vtkTooltipItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTooltipItem.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 =========================================================================*/
15 
26 #ifndef __vtkTooltipItem_h
27 #define __vtkTooltipItem_h
28 
29 #include "vtkContextItem.h"
30 #include "vtkVector.h" // Needed for vtkVector2f
31 #include "vtkStdString.h" // For vtkStdString ivars
32 
33 class vtkPen;
34 class vtkBrush;
35 class vtkTextProperty;
36 
38 {
39 public:
41  virtual void PrintSelf(ostream &os, vtkIndent indent);
42 
44  static vtkTooltipItem *New();
45 
47 
48  vtkSetVector2Macro(Position, float);
49  void SetPosition(const vtkVector2f &pos);
51 
53 
54  vtkGetVector2Macro(Position, float);
55  vtkVector2f GetPositionVector();
57 
59 
60  virtual void SetText(const vtkStdString &title);
61  virtual vtkStdString GetText();
63 
65 
67  vtkGetObjectMacro(Pen, vtkPen);
69 
71 
72  vtkGetObjectMacro(Brush, vtkBrush);
74 
76 
78  vtkGetObjectMacro(TextProperties, vtkTextProperty);
80 
82  virtual void Update();
83 
85  virtual bool Paint(vtkContext2D *painter);
86 
87 //BTX
88 protected:
90  ~vtkTooltipItem();
91 
93  float* Position;
95  vtkTextProperty* TextProperties;
98 
99 private:
100  vtkTooltipItem(const vtkTooltipItem &); // Not implemented.
101  void operator=(const vtkTooltipItem &); // Not implemented.
102 //ETX
103 };
104 
105 #endif //__vtkTooltipItem_h
#define VTK_CHARTS_EXPORT
Wrapper around vtkstd::string to keep symbols short.
Definition: vtkStdString.h:45
vtkVector2f PositionVector
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
vtkTextProperty * TextProperties
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:54
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:35
a simple class to control print indentation
Definition: vtkIndent.h:37
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:37
vtkBrush * Brush
vtkStdString Text
takes care of drawing 2D axes
virtual void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
virtual void Update()