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 "vtkRenderingContext2DModule.h" // For export macro
30 #include "vtkContextItem.h"
31 #include "vtkVector.h" // Needed for vtkVector2f
32 #include "vtkStdString.h" // For vtkStdString ivars
33 
34 class vtkPen;
35 class vtkBrush;
36 class vtkTextProperty;
37 
39 {
40 public:
42  virtual void PrintSelf(ostream &os, vtkIndent indent);
43 
45  static vtkTooltipItem *New();
46 
48 
49  vtkSetVector2Macro(Position, float);
50  void SetPosition(const vtkVector2f &pos);
52 
54 
55  vtkGetVector2Macro(Position, float);
56  vtkVector2f GetPositionVector();
58 
60 
61  virtual void SetText(const vtkStdString &title);
62  virtual vtkStdString GetText();
64 
66 
68  vtkGetObjectMacro(Pen, vtkPen);
70 
72 
73  vtkGetObjectMacro(Brush, vtkBrush);
75 
77 
79  vtkGetObjectMacro(TextProperties, vtkTextProperty);
81 
83  virtual void Update();
84 
86  virtual bool Paint(vtkContext2D *painter);
87 
88 //BTX
89 protected:
91  ~vtkTooltipItem();
92 
94  float* Position;
99 
100 private:
101  vtkTooltipItem(const vtkTooltipItem &); // Not implemented.
102  void operator=(const vtkTooltipItem &); // Not implemented.
103 //ETX
104 };
105 
106 #endif //vtkTooltipItem_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
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:56
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:36
#define VTKRENDERINGCONTEXT2D_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:38
represent text properties.
vtkBrush * Brush
vtkStdString Text
takes care of drawing 2D axes
virtual void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
virtual void Update()