VTK
vtkGraphLayoutView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphLayoutView.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 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
47 #ifndef vtkGraphLayoutView_h
48 #define vtkGraphLayoutView_h
49 
50 #include "vtkViewsInfovisModule.h" // For export macro
51 #include "vtkRenderView.h"
52 
56 class vtkViewTheme;
57 
59 {
60 public:
63  void PrintSelf(ostream& os, vtkIndent indent);
64 
66 
67  void SetVertexLabelArrayName(const char* name);
68  const char* GetVertexLabelArrayName();
70 
72 
73  void SetEdgeLabelArrayName(const char* name);
74  const char* GetEdgeLabelArrayName();
76 
78 
79  void SetVertexLabelVisibility(bool vis);
81  vtkBooleanMacro(VertexLabelVisibility, bool);
83 
85 
89  vtkBooleanMacro(HideVertexLabelsOnInteraction, bool);
91 
93 
94  void SetEdgeVisibility(bool vis);
96  vtkBooleanMacro(EdgeVisibility, bool);
98 
100 
101  void SetEdgeLabelVisibility(bool vis);
103  vtkBooleanMacro(EdgeLabelVisibility, bool);
105 
107 
111  vtkBooleanMacro(HideEdgeLabelsOnInteraction, bool);
113 
115 
117  void SetVertexColorArrayName(const char* name);
118  const char* GetVertexColorArrayName();
120 
122 
123  void SetColorVertices(bool vis);
125  vtkBooleanMacro(ColorVertices, bool);
127 
129 
130  void SetEdgeColorArrayName(const char* name);
131  const char* GetEdgeColorArrayName();
133 
135 
136  void SetColorEdges(bool vis);
138  vtkBooleanMacro(ColorEdges, bool);
140 
142 
143  void SetEdgeSelection(bool vis);
145  vtkBooleanMacro(EdgeSelection, bool);
147 
149 
150  void SetEnabledEdgesArrayName(const char* name);
153 
155 
156  void SetEnableEdgesByArray(bool vis);
159 
161 
165 
167 
168  void SetEnableVerticesByArray(bool vis);
171 
173 
174  void SetScalingArrayName(const char* name);
175  const char* GetScalingArrayName();
177 
179 
180  void SetScaledGlyphs(bool arg);
182  vtkBooleanMacro(ScaledGlyphs, bool);
184 
186 
198  void SetLayoutStrategy(const char* name);
200  { this->SetLayoutStrategy("Random"); }
202  { this->SetLayoutStrategy("Force Directed"); }
204  { this->SetLayoutStrategy("Simple 2D"); }
206  { this->SetLayoutStrategy("Clustering 2D"); }
208  { this->SetLayoutStrategy("Community 2D"); }
210  { this->SetLayoutStrategy("Fast 2D"); }
212  { this->SetLayoutStrategy("Pass Through"); }
214  { this->SetLayoutStrategy("Circular"); }
216  { this->SetLayoutStrategy("Tree"); }
218  { this->SetLayoutStrategy("Cosmic Tree"); }
220  { this->SetLayoutStrategy("Cone"); }
222  { this->SetLayoutStrategy("Span Tree"); }
223  const char* GetLayoutStrategyName();
225 
227 
233 
235 
239  void SetEdgeLayoutStrategy(const char* name);
241  { this->SetEdgeLayoutStrategy("Arc Parallel"); }
243  { this->SetEdgeLayoutStrategy("Pass Through"); }
246 
248 
254 
258  void AddIconType(char *type, int index);
259 
262 
265  void SetIconAlignment(int alignment);
266 
268 
269  void SetIconVisibility(bool b);
271  vtkBooleanMacro(IconVisibility, bool);
273 
275 
276  void SetIconArrayName(const char* name);
277  const char* GetIconArrayName();
279 
281 
282  void SetGlyphType(int type);
285 
287 
288  virtual void SetVertexLabelFontSize(const int size);
289  virtual int GetVertexLabelFontSize();
291 
293 
294  virtual void SetEdgeLabelFontSize(const int size);
295  virtual int GetEdgeLabelFontSize();
297 
299 
303 
305 
309 
312 
316  virtual int IsLayoutComplete();
317 
322  virtual void UpdateLayout();
323 
324 protected:
327 
329 
333  // Called to process events. Overrides behavior in vtkRenderView.
334  virtual void ProcessEvents(vtkObject* caller, unsigned long eventId, void* callData);
336 
337 private:
338  vtkGraphLayoutView(const vtkGraphLayoutView&); // Not implemented.
339  void operator=(const vtkGraphLayoutView&); // Not implemented.
340  bool VertexLabelsRequested;
341  bool EdgeLabelsRequested;
342  bool Interacting;
343 };
344 
345 #endif
vtkGraphLayoutView::GetHideEdgeLabelsOnInteraction
bool GetHideEdgeLabelsOnInteraction()
vtkGraphLayoutView::GetHideVertexLabelsOnInteraction
bool GetHideVertexLabelsOnInteraction()
vtkGraphLayoutView::SetScaledGlyphs
void SetScaledGlyphs(bool arg)
vtkGraphLayoutView::SetVertexLabelFontSize
virtual void SetVertexLabelFontSize(const int size)
vtkGraphLayoutView::GetGlyphType
int GetGlyphType()
vtkViewsInfovisModule.h
vtkGraphLayoutView::New
static vtkGraphLayoutView * New()
vtkGraphLayoutView::SetEdgeVisibility
void SetEdgeVisibility(bool vis)
vtkGraphLayoutView::SetLayoutStrategyToRandom
void SetLayoutStrategyToRandom()
Definition: vtkGraphLayoutView.h:199
vtkRenderView
A view containing a renderer.
Definition: vtkRenderView.h:64
vtkGraphLayoutView::SetEdgeLabelFontSize
virtual void SetEdgeLabelFontSize(const int size)
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkGraphLayoutView::SetHideVertexLabelsOnInteraction
void SetHideVertexLabelsOnInteraction(bool vis)
vtkGraphLayoutView::ZoomToSelection
void ZoomToSelection()
vtkRenderView::Interacting
bool Interacting
Definition: vtkRenderView.h:257
vtkGraphLayoutView::GetVertexLabelVisibility
bool GetVertexLabelVisibility()
vtkGraphLayoutView::SetEdgeLayoutStrategy
void SetEdgeLayoutStrategy(const char *name)
vtkGraphLayoutView::SetLayoutStrategyToClustering2D
void SetLayoutStrategyToClustering2D()
Definition: vtkGraphLayoutView.h:205
vtkGraphLayoutStrategy
abstract superclass for all graph layout strategies
Definition: vtkGraphLayoutStrategy.h:45
VTKVIEWSINFOVIS_EXPORT
#define VTKVIEWSINFOVIS_EXPORT
Definition: vtkViewsInfovisModule.h:15
vtkGraphLayoutView::SetLayoutStrategyToCommunity2D
void SetLayoutStrategyToCommunity2D()
Definition: vtkGraphLayoutView.h:207
vtkGraphLayoutView::GetColorEdges
bool GetColorEdges()
vtkGraphLayoutView::~vtkGraphLayoutView
~vtkGraphLayoutView()
vtkgl::s
GLdouble s
Definition: vtkgl.h:11594
vtkGraphLayoutView::SetScalingArrayName
void SetScalingArrayName(const char *name)
vtkGraphLayoutView::SetIconAlignment
void SetIconAlignment(int alignment)
vtkGraphLayoutView::SetColorVertices
void SetColorVertices(bool vis)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkGraphLayoutView::SetLayoutStrategyToForceDirected
void SetLayoutStrategyToForceDirected()
Definition: vtkGraphLayoutView.h:201
vtkGraphLayoutView::IsLayoutComplete
virtual int IsLayoutComplete()
vtkGraphLayoutView::GetVertexScalarBarVisibility
bool GetVertexScalarBarVisibility()
vtkGraphLayoutView::SetHideEdgeLabelsOnInteraction
void SetHideEdgeLabelsOnInteraction(bool vis)
vtkGraphLayoutView::SetVertexScalarBarVisibility
void SetVertexScalarBarVisibility(bool vis)
vtkGraphLayoutView::GetIconVisibility
bool GetIconVisibility()
vtkGraphLayoutView::SetEdgeLabelArrayName
void SetEdgeLabelArrayName(const char *name)
vtkRenderView.h
vtkGraphLayoutView::CreateDefaultRepresentation
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)
vtkRenderedGraphRepresentation
Definition: vtkRenderedGraphRepresentation.h:70
vtkGraphLayoutView::GetScalingArrayName
const char * GetScalingArrayName()
vtkGraphLayoutView::SetEdgeLayoutStrategyToPassThrough
void SetEdgeLayoutStrategyToPassThrough()
Definition: vtkGraphLayoutView.h:242
vtkGraphLayoutView::SetLayoutStrategyToCircular
void SetLayoutStrategyToCircular()
Definition: vtkGraphLayoutView.h:213
vtkGraphLayoutView::ClearIconTypes
void ClearIconTypes()
vtkGraphLayoutView
Lays out and displays a graph.
Definition: vtkGraphLayoutView.h:59
vtkGraphLayoutView::GetEdgeLabelFontSize
virtual int GetEdgeLabelFontSize()
vtkGraphLayoutView::UpdateLayout
virtual void UpdateLayout()
vtkGraphLayoutView::SetLayoutStrategyToPassThrough
void SetLayoutStrategyToPassThrough()
Definition: vtkGraphLayoutView.h:211
vtkGraphLayoutView::SetEnabledVerticesArrayName
void SetEnabledVerticesArrayName(const char *name)
vtkGraphLayoutView::GetEdgeLayoutStrategy
vtkEdgeLayoutStrategy * GetEdgeLayoutStrategy()
vtkGraphLayoutView::SetEnableEdgesByArray
void SetEnableEdgesByArray(bool vis)
vtkViewTheme
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:48
vtkgl::name
GLuint const GLchar * name
Definition: vtkgl.h:11983
vtkGraphLayoutView::GetEdgeVisibility
bool GetEdgeVisibility()
vtkGraphLayoutView::SetEnabledEdgesArrayName
void SetEnabledEdgesArrayName(const char *name)
vtkGraphLayoutView::SetEdgeColorArrayName
void SetEdgeColorArrayName(const char *name)
vtkDataRepresentation
The superclass for all representations.
Definition: vtkDataRepresentation.h:72
vtkGraphLayoutView::GetEnableVerticesByArray
int GetEnableVerticesByArray()
vtkGraphLayoutView::GetGraphRepresentation
virtual vtkRenderedGraphRepresentation * GetGraphRepresentation()
vtkGraphLayoutView::GetEnabledEdgesArrayName
const char * GetEnabledEdgesArrayName()
vtkGraphLayoutView::SetVertexColorArrayName
void SetVertexColorArrayName(const char *name)
vtkGraphLayoutView::SetIconArrayName
void SetIconArrayName(const char *name)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGraphLayoutView::SetLayoutStrategy
void SetLayoutStrategy(vtkGraphLayoutStrategy *s)
vtkGraphLayoutView::GetEdgeLabelVisibility
bool GetEdgeLabelVisibility()
vtkGraphLayoutView::GetEdgeSelection
bool GetEdgeSelection()
vtkGraphLayoutView::SetGlyphType
void SetGlyphType(int type)
vtkGraphLayoutView::SetLayoutStrategy
void SetLayoutStrategy(const char *name)
vtkGraphLayoutView::ProcessEvents
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
vtkGraphLayoutView::GetEdgeScalarBarVisibility
bool GetEdgeScalarBarVisibility()
vtkGraphLayoutView::SetVertexLabelArrayName
void SetVertexLabelArrayName(const char *name)
vtkGraphLayoutView::SetLayoutStrategyToTree
void SetLayoutStrategyToTree()
Definition: vtkGraphLayoutView.h:215
vtkGraphLayoutView::GetVertexColorArrayName
const char * GetVertexColorArrayName()
vtkGraphLayoutView::GetEdgeColorArrayName
const char * GetEdgeColorArrayName()
vtkGraphLayoutView::GetVertexLabelArrayName
const char * GetVertexLabelArrayName()
vtkGraphLayoutView::GetEnabledVerticesArrayName
const char * GetEnabledVerticesArrayName()
vtkGraphLayoutView::SetLayoutStrategyToCone
void SetLayoutStrategyToCone()
Definition: vtkGraphLayoutView.h:219
vtkGraphLayoutView::GetIconArrayName
const char * GetIconArrayName()
vtkGraphLayoutView::GetEnableEdgesByArray
int GetEnableEdgesByArray()
vtkGraphLayoutView::SetEdgeLabelVisibility
void SetEdgeLabelVisibility(bool vis)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkGraphLayoutView::SetIconVisibility
void SetIconVisibility(bool b)
vtkGraphLayoutView::GetLayoutStrategy
vtkGraphLayoutStrategy * GetLayoutStrategy()
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkGraphLayoutView::SetEdgeLayoutStrategy
void SetEdgeLayoutStrategy(vtkEdgeLayoutStrategy *s)
vtkGraphLayoutView::SetLayoutStrategyToFast2D
void SetLayoutStrategyToFast2D()
Definition: vtkGraphLayoutView.h:209
vtkGraphLayoutView::SetEdgeScalarBarVisibility
void SetEdgeScalarBarVisibility(bool vis)
vtkGraphLayoutView::vtkGraphLayoutView
vtkGraphLayoutView()
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:39
vtkGraphLayoutView::SetEdgeLayoutStrategyToArcParallel
void SetEdgeLayoutStrategyToArcParallel()
Definition: vtkGraphLayoutView.h:240
vtkGraphLayoutView::SetColorEdges
void SetColorEdges(bool vis)
vtkGraphLayoutView::GetVertexLabelFontSize
virtual int GetVertexLabelFontSize()
vtkGraphLayoutView::SetLayoutStrategyToSimple2D
void SetLayoutStrategyToSimple2D()
Definition: vtkGraphLayoutView.h:203
vtkGraphLayoutView::GetEdgeLabelArrayName
const char * GetEdgeLabelArrayName()
vtkGraphLayoutView::SetLayoutStrategyToCosmicTree
void SetLayoutStrategyToCosmicTree()
Definition: vtkGraphLayoutView.h:217
vtkEdgeLayoutStrategy
abstract superclass for all edge layout strategies
Definition: vtkEdgeLayoutStrategy.h:36
vtkGraphLayoutView::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkGraphLayoutView::SetLayoutStrategyToSpanTree
void SetLayoutStrategyToSpanTree()
Definition: vtkGraphLayoutView.h:221
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkGraphLayoutView::GetColorVertices
bool GetColorVertices()
vtkGraphLayoutView::SetEnableVerticesByArray
void SetEnableVerticesByArray(bool vis)
vtkGraphLayoutView::GetLayoutStrategyName
const char * GetLayoutStrategyName()
vtkGraphLayoutView::SetVertexLabelVisibility
void SetVertexLabelVisibility(bool vis)
vtkGraphLayoutView::GetScaledGlyphs
bool GetScaledGlyphs()
vtkGraphLayoutView::AddIconType
void AddIconType(char *type, int index)
vtkGraphLayoutView::GetEdgeLayoutStrategyName
const char * GetEdgeLayoutStrategyName()
vtkGraphLayoutView::SetEdgeSelection
void SetEdgeSelection(bool vis)
vtkgl::size
GLsizeiptr size
Definition: vtkgl.h:11843