vtkSMContextViewProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMContextViewProxy.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
23 #ifndef vtkSMContextViewProxy_h
24 #define vtkSMContextViewProxy_h
25 
26 #include "vtkNew.h" // needed for vtkInteractorObserver.
27 #include "vtkRemotingViewsModule.h" //needed for exports
28 #include "vtkSMViewProxy.h"
29 
31 class vtkContextView;
33 class vtkRenderWindow;
35 class vtkSelection;
37 
39 {
40 public:
41  static vtkSMContextViewProxy* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
48  vtkContextView* GetContextView();
49 
53  virtual vtkAbstractContextItem* GetContextItem();
54 
59  vtkRenderWindow* GetRenderWindow() override;
60 
67  void SetupInteractor(vtkRenderWindowInteractor* iren) override;
68 
73 
77  virtual void ResetDisplay();
78 
86  bool CanDisplayData(vtkSMSourceProxy* producer, int outputPort) override;
87 
91  const char* GetRepresentationType(vtkSMSourceProxy* producer, int outputPort) override;
92 
93  vtkSelection* GetCurrentSelection();
94 
95 protected:
97  ~vtkSMContextViewProxy() override;
98 
99  void CreateVTKObjects() override;
100 
105  void OnInteractionEvent();
106 
112  void OnForwardInteractionEvent(vtkObject*, unsigned long, void*);
113 
118  void OnLeftButtonReleaseEvent();
119 
124  void PostRender(bool interactive) override;
125 
129  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
130 
136  vtkTypeUInt32 PreRender(bool interactive) override;
137 
142 
152 
159 
160 private:
162  void operator=(const vtkSMContextViewProxy&) = delete;
163 
168  void CopyAxisRangesFromChart();
169 
171  vtkNew<vtkEventForwarderCommand> EventForwarder;
172 };
173 
174 #endif
virtual const char * GetRepresentationType(vtkSMSourceProxy *producer, int outputPort)
Returns the xml name of the representation proxy to create to show the data produced in this view...
void CreateVTKObjects() override
Called at the end of CreateVTKObjects().
#define VTKREMOTINGVIEWS_EXPORT
virtual void PostRender(bool vtkNotUsed(interactive))
Superclass for all view proxies.
static vtkSMViewProxy * New()
virtual vtkRenderWindow * GetRenderWindow()
Return the vtkRenderWindow used by this view, if any.
void PrintSelf(ostream &os, vtkIndent indent) override
bool XYChartViewBase4Axes
Flag automatically set when Bottom and Right custom axes related property are present in this proxy...
vtkContextView * ChartView
The context view that is used for all context derived charts.
virtual vtkRenderWindowInteractor * GetInteractor()
Returns the interactor.
virtual vtkTypeUInt32 PreRender(bool vtkNotUsed(interactive))
This method is called before executing code that could cause a render on the underlying vtkPVView...
int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element) override
Read attributes from an XML element.
proxy for a VTK source on a server
abstract base class for all Chart Views.
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
virtual bool CanDisplayData(vtkSMSourceProxy *producer, int outputPort)
Returns true if the view can display the data produced by the producer&#39;s port.
virtual void SetupInteractor(vtkRenderWindowInteractor *iren)
A client process need to set the interactor to enable interactivity.
helper class that make it easier to hook vtkRenderWindowInteractor and vtkSMViewProxy.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
bool SkipPlotableCheck
To avoid showing large datasets in context views, that typically rely on delivering all data to the c...