VTK
vtkView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkView.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 -------------------------------------------------------------------------*/
49 #ifndef vtkView_h
50 #define vtkView_h
51 
52 #include "vtkViewsCoreModule.h" // For export macro
53 #include "vtkObject.h"
54 
55 class vtkAlgorithmOutput;
56 class vtkCommand;
57 class vtkDataObject;
59 class vtkSelection;
60 class vtkViewTheme;
61 
63 {
64 public:
65  static vtkView *New();
67  void PrintSelf(ostream& os, vtkIndent indent);
68 
71 
74 
81 
88 
95 
101 
104 
107 
110 
114 
117 
120 
122  virtual void Update();
123 
125  virtual void ApplyViewTheme(vtkViewTheme* vtkNotUsed(theme)) { }
126 
127  //BTX
132 
134 
137  {
138  const char* Message;
139  double Progress;
141 
142  public:
143  ViewProgressEventCallData(const char* msg, double progress)
144  {
145  this->Message = msg;
146  this->Progress = progress;
147  }
149  {
150  this->Message = 0;
151  }
152 
154 
155  const char* GetProgressMessage() const
156  { return this->Message; }
158 
160 
161  double GetProgress() const
162  { return this->Progress; }
163  };
164  //ETX
166 
174  void RegisterProgress(vtkObject* algorithm, const char* message=NULL);
175 
177  void UnRegisterProgress(vtkObject* algorithm);
178 
179 //BTX
180 protected:
183 
185 
188  virtual void ProcessEvents(vtkObject* caller, unsigned long eventId,
189  void* callData);
191 
198 
200 
206 
208 
210  vtkSetMacro(ReuseSingleRepresentation, bool);
211  vtkGetMacro(ReuseSingleRepresentation, bool);
212  vtkBooleanMacro(ReuseSingleRepresentation, bool);
215 
216 private:
217  vtkView(const vtkView&); // Not implemented.
218  void operator=(const vtkView&); // Not implemented.
219 
220  class vtkImplementation;
221  vtkImplementation* Implementation;
222 
223  class Command;
224  friend class Command;
225  Command* Observer;
226 
227  class vtkInternal;
228  vtkInternal* Internal;
229 //ETX
230 };
231 
232 #endif
vtkView::RemoveRepresentation
void RemoveRepresentation(vtkDataRepresentation *rep)
vtkCommand
superclass for callback/observer methods
Definition: vtkCommand.h:326
vtkView::ReuseSingleRepresentation
bool ReuseSingleRepresentation
Definition: vtkView.h:212
vtkView::AddRepresentationFromInputConnection
vtkDataRepresentation * AddRepresentationFromInputConnection(vtkAlgorithmOutput *conn)
vtkView::GetNumberOfRepresentations
int GetNumberOfRepresentations()
vtkView::ViewProgressEventCallData::GetProgressMessage
const char * GetProgressMessage() const
Definition: vtkView.h:155
vtkView::ProcessEvents
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
vtkView::SetRepresentation
void SetRepresentation(vtkDataRepresentation *rep)
vtkView::~vtkView
~vtkView()
VTKVIEWSCORE_EXPORT
#define VTKVIEWSCORE_EXPORT
Definition: vtkViewsCoreModule.h:15
vtkView::ViewProgressEventCallData::GetProgress
double GetProgress() const
Definition: vtkView.h:161
vtkViewsCoreModule.h
vtkView::vtkView
vtkView()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkView::RegisterProgress
void RegisterProgress(vtkObject *algorithm, const char *message=NULL)
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkView::AddRepresentationInternal
virtual void AddRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Definition: vtkView.h:203
vtkView::AddRepresentationFromInput
vtkDataRepresentation * AddRepresentationFromInput(vtkDataObject *input)
vtkSelection
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:45
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkView::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkView::SetRepresentationFromInput
vtkDataRepresentation * SetRepresentationFromInput(vtkDataObject *input)
vtkgl::message
GLsizei GLenum GLuint GLuint GLsizei GLchar * message
Definition: vtkgl.h:19240
vtkView
The superclass for all views.
Definition: vtkView.h:63
vtkViewTheme
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:48
vtkNotUsed
#define vtkNotUsed(x)
Definition: vtkSetGet.h:557
vtkView::GetRepresentation
vtkDataRepresentation * GetRepresentation(int index=0)
vtkView::ViewProgressEventCallData::ViewProgressEventCallData
ViewProgressEventCallData(const char *msg, double progress)
Definition: vtkView.h:143
vtkView::ViewProgressEventCallData::~ViewProgressEventCallData
~ViewProgressEventCallData()
Definition: vtkView.h:148
vtkDataRepresentation
The superclass for all representations.
Definition: vtkDataRepresentation.h:72
vtkView::SetRepresentationFromInputConnection
vtkDataRepresentation * SetRepresentationFromInputConnection(vtkAlgorithmOutput *conn)
vtkView::AddRepresentation
void AddRepresentation(vtkDataRepresentation *rep)
vtkView::ViewProgressEventCallData
Definition: vtkView.h:137
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkView::RemoveRepresentation
void RemoveRepresentation(vtkAlgorithmOutput *rep)
vtkView::ApplyViewTheme
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
Definition: vtkView.h:125
vtkView::UnRegisterProgress
void UnRegisterProgress(vtkObject *algorithm)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkView::New
static vtkView * New()
vtkView::GetObserver
vtkCommand * GetObserver()
vtkObject.h
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkView::RemoveAllRepresentations
void RemoveAllRepresentations()
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkView::Update
virtual void Update()
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:39
vtkView::RemoveRepresentationInternal
virtual void RemoveRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Definition: vtkView.h:204
vtkView::IsRepresentationPresent
bool IsRepresentationPresent(vtkDataRepresentation *rep)
vtkX3D::progress
@ progress
Definition: vtkX3D.h:452
vtkView::CreateDefaultRepresentation
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65