VTK
vtkGraphItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: TestDiagram.cxx
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 =========================================================================*/
33 #ifndef vtkMultiLineItem_h
34 #define vtkMultiLineItem_h
35 
36 #include "vtkViewsInfovisModule.h" // For export macro
37 #include "vtkContextItem.h"
38 
39 #include "vtkVector.h" // For vector types in API
40 #include "vtkColor.h" // For color types in API
41 #include "vtkNew.h" // For vtkNew ivars
42 
43 class vtkGraph;
44 class vtkImageData;
47 class vtkTooltipItem;
48 
50 {
51 public:
52  static vtkGraphItem *New();
54  virtual void PrintSelf(ostream &os, vtkIndent indent);
55 
57 
58  virtual void SetGraph(vtkGraph *graph);
61 
64 
66 
68  virtual void StopLayoutAnimation();
70 
72  virtual void UpdateLayout();
73 
74 protected:
77 
80  virtual bool Paint(vtkContext2D *painter);
81 
85  virtual void RebuildBuffers();
86 
89  virtual void PaintBuffers(vtkContext2D *painter);
90 
97  virtual bool IsDirty();
98 
103 
107 
113 
117  virtual float EdgeWidth(vtkIdType edge, vtkIdType point);
118 
123 
129 
134  virtual float VertexSize(vtkIdType vertex);
135 
139 
144  virtual int VertexMarker(vtkIdType vertex);
145 
151 
155 
157 
158  static void ProcessEvents(vtkObject *caller, unsigned long event,
159  void *clientData, void *callerData);
161 
163  virtual vtkIdType HitVertex(const vtkVector2f &pos);
164 
166 
172  virtual bool MouseWheelEvent(const vtkContextMouseEvent &event, int delta);
174 
176  virtual bool Hit(const vtkContextMouseEvent &event);
177 
179  virtual void PlaceTooltip(vtkIdType v);
180 
181 private:
182  vtkGraphItem(const vtkGraphItem&); // Not implemented
183  void operator=(const vtkGraphItem&); // Not implemented
184 
185  struct Internals;
186  Internals *Internal;
187 
188  vtkGraph *Graph;
189  unsigned long GraphBuildTime;
190  vtkNew<vtkImageData> Sprite;
192  vtkNew<vtkTooltipItem> Tooltip;
193 };
194 
195 #endif
vtkGraphItem::New
static vtkGraphItem * New()
vtkGraphItem::MouseWheelEvent
virtual bool MouseWheelEvent(const vtkContextMouseEvent &event, int delta)
vtkGraphItem::VertexPosition
virtual vtkVector2f VertexPosition(vtkIdType vertex)
vtkContextMouseEvent
data structure to represent mouse events.
Definition: vtkContextMouseEvent.h:40
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkViewsInfovisModule.h
vtkGraphItem::Hit
virtual bool Hit(const vtkContextMouseEvent &event)
vtkGraphItem::StopLayoutAnimation
virtual void StopLayoutAnimation()
vtkGraphItem::MouseButtonReleaseEvent
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &event)
vtkGraphItem::VertexColor
virtual vtkColor4ub VertexColor(vtkIdType vertex)
vtkIncrementalForceLayout
incremental force-directed layout.
Definition: vtkIncrementalForceLayout.h:42
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkGraphItem::vtkGraphItem
vtkGraphItem()
VTKVIEWSINFOVIS_EXPORT
#define VTKVIEWSINFOVIS_EXPORT
Definition: vtkViewsInfovisModule.h:15
vtkGraphItem::MouseButtonPressEvent
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &event)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkGraphItem::EdgeWidth
virtual float EdgeWidth(vtkIdType edge, vtkIdType point)
vtkGraphItem::~vtkGraphItem
~vtkGraphItem()
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkVector.h
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkTooltipItem
takes care of drawing 2D axes
Definition: vtkTooltipItem.h:39
vtkGraphItem::MouseLeaveEvent
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &event)
vtkGraphItem::EdgeColor
virtual vtkColor4ub EdgeColor(vtkIdType edge, vtkIdType point)
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
vtkGraphItem::GetLayout
virtual vtkIncrementalForceLayout * GetLayout()
vtkContextItem.h
vtkGraphItem::EdgePosition
virtual vtkVector2f EdgePosition(vtkIdType edge, vtkIdType point)
vtkgl::event
struct _cl_event * event
Definition: vtkgl.h:14387
vtkGraphItem::MouseEnterEvent
virtual bool MouseEnterEvent(const vtkContextMouseEvent &event)
vtkGraphItem::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &event)
vtkGraphItem::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkGraphItem::NumberOfEdgePoints
virtual vtkIdType NumberOfEdgePoints(vtkIdType edge)
vtkGraphItem::PaintBuffers
virtual void PaintBuffers(vtkContext2D *painter)
vtkGraphItem::VertexTooltip
virtual vtkStdString VertexTooltip(vtkIdType vertex)
vtkGraphItem::NumberOfVertices
virtual vtkIdType NumberOfVertices()
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkGraphItem::Paint
virtual bool Paint(vtkContext2D *painter)
vtkGraphItem::StartLayoutAnimation
virtual void StartLayoutAnimation(vtkRenderWindowInteractor *interactor)
vtkGraphItem::PlaceTooltip
virtual void PlaceTooltip(vtkIdType v)
vtkGraphItem::ProcessEvents
static void ProcessEvents(vtkObject *caller, unsigned long event, void *clientData, void *callerData)
vtkColor.h
vtkGraphItem::HitVertex
virtual vtkIdType HitVertex(const vtkVector2f &pos)
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGraphItem::SetGraph
virtual void SetGraph(vtkGraph *graph)
vtkNew< vtkImageData >
vtkGraphItem::NumberOfEdges
virtual vtkIdType NumberOfEdges()
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:80
vtkGraphItem::RebuildBuffers
virtual void RebuildBuffers()
vtkContextItem
base class for items that are part of a vtkContextScene.
Definition: vtkContextItem.h:34
vtkGraphItem::UpdateLayout
virtual void UpdateLayout()
vtkNew.h
vtkGraphItem::VertexSize
virtual float VertexSize(vtkIdType vertex)
vtkGraphItem::VertexMarker
virtual int VertexMarker(vtkIdType vertex)
vtkColor4ub
Definition: vtkColor.h:209
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:48
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:289
vtkVector2f
Definition: vtkVector.h:277
vtkGraphItem
A 2D graphics item for rendering a graph.
Definition: vtkGraphItem.h:50
vtkGraphItem::IsDirty
virtual bool IsDirty()