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-------------------------------------------------------------------------*/
47#ifndef vtkView_h
48#define vtkView_h
49
50#include "vtkViewsCoreModule.h" // For export macro
51#include "vtkObject.h"
52
54class vtkCommand;
55class vtkDataObject;
57class vtkSelection;
58class vtkViewTheme;
59
60class VTKVIEWSCORE_EXPORT vtkView : public vtkObject
61{
62public:
63 static vtkView *New();
64 vtkTypeMacro(vtkView, vtkObject);
65 void PrintSelf(ostream& os, vtkIndent indent);
66
71
76
86
96
105
114
119
124
129
134
139
144
148 virtual void Update();
149
153 virtual void ApplyViewTheme(vtkViewTheme* vtkNotUsed(theme)) { }
154
161
163
168 {
169 const char* Message;
170 double Progress;
172
173 public:
174 ViewProgressEventCallData(const char* msg, double progress)
175 {
176 this->Message = msg;
177 this->Progress = progress;
178 }
180 {
181 this->Message = 0;
182 }
183
187 const char* GetProgressMessage() const
188 { return this->Message; }
189
193 double GetProgress() const
194 { return this->Progress; }
195 };
196
206 void RegisterProgress(vtkObject* algorithm, const char* message=NULL);
207
212
213protected:
216
222 virtual void ProcessEvents(vtkObject* caller, unsigned long eventId,
223 void* callData);
224
232
237 virtual void AddRepresentationInternal(vtkDataRepresentation* vtkNotUsed(rep)) {}
238 virtual void RemoveRepresentationInternal(vtkDataRepresentation* vtkNotUsed(rep)) {}
239
241
245 vtkSetMacro(ReuseSingleRepresentation, bool);
246 vtkGetMacro(ReuseSingleRepresentation, bool);
247 vtkBooleanMacro(ReuseSingleRepresentation, bool);
250
251private:
252 vtkView(const vtkView&) VTK_DELETE_FUNCTION;
253 void operator=(const vtkView&) VTK_DELETE_FUNCTION;
254
255 class vtkImplementation;
256 vtkImplementation* Implementation;
257
258 class Command;
259 friend class Command;
260 Command* Observer;
261
262 class vtkInternal;
263 vtkInternal* Internal;
264
265};
266
267#endif
Proxy object to connect input/output ports.
superclass for callback/observer methods
Definition: vtkCommand.h:342
general representation of visualization data
Definition: vtkDataObject.h:65
The superclass for all representations.
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
A node in a selection tree.
Definition: vtkSelection.h:44
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:49
A ptr to an instance of ViewProgressEventCallData is provided in the call data when vtkCommand::ViewP...
Definition: vtkView.h:168
double GetProgress() const
Get the progress value in range [0.0, 1.0].
Definition: vtkView.h:193
ViewProgressEventCallData(const char *msg, double progress)
Definition: vtkView.h:174
const char * GetProgressMessage() const
Get the message.
Definition: vtkView.h:187
The superclass for all views.
Definition: vtkView.h:61
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
Apply a theme to the view.
Definition: vtkView.h:153
vtkDataRepresentation * SetRepresentationFromInput(vtkDataObject *input)
Convenience method which sets the representation to the specified input and adds it to the view.
vtkDataRepresentation * AddRepresentationFromInput(vtkDataObject *input)
Convenience method which creates a simple representation with the specified input and adds it to the ...
void RemoveRepresentation(vtkAlgorithmOutput *rep)
Removes any representation with this connection from the view.
void UnRegisterProgress(vtkObject *algorithm)
Unregister objects previously registered with RegisterProgress.
virtual void Update()
Update the view.
void RegisterProgress(vtkObject *algorithm, const char *message=NULL)
Meant for use by subclasses and vtkRepresentation subclasses.
vtkCommand * GetObserver()
Returns the observer that the subclasses can use to listen to additional events.
vtkDataRepresentation * AddRepresentationFromInputConnection(vtkAlgorithmOutput *conn)
Convenience method which creates a simple representation with the connection and adds it to the view.
virtual void AddRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Subclass "hooks" for notifying subclasses of vtkView when representations are added or removed.
Definition: vtkView.h:237
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
Called to process events.
int GetNumberOfRepresentations()
Returns the number of representations from first port(0) in this view.
void RemoveAllRepresentations()
Removes all representations from the view.
vtkDataRepresentation * GetRepresentation(int index=0)
The representation at a specified index.
vtkDataRepresentation * SetRepresentationFromInputConnection(vtkAlgorithmOutput *conn)
Convenience method which sets the representation with the connection and adds it to the view.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void RemoveRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Definition: vtkView.h:238
void SetRepresentation(vtkDataRepresentation *rep)
Set the representation to the view.
void RemoveRepresentation(vtkDataRepresentation *rep)
Removes the representation from the view.
bool IsRepresentationPresent(vtkDataRepresentation *rep)
Check to see if a representation is present in the view.
void AddRepresentation(vtkDataRepresentation *rep)
Adds the representation to the view.
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)
Create a default vtkDataRepresentation for the given vtkAlgorithmOutput.
bool ReuseSingleRepresentation
Definition: vtkView.h:248
static vtkView * New()
@ index
Definition: vtkX3D.h:246
@ progress
Definition: vtkX3D.h:452
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.