vtkSMContextViewProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkSMContextViewProxy_h
12 #define vtkSMContextViewProxy_h
13 
14 #include "vtkNew.h" // needed for vtkInteractorObserver.
15 #include "vtkRemotingViewsModule.h" //needed for exports
16 #include "vtkSMViewProxy.h"
17 
19 class vtkContextView;
21 class vtkRenderWindow;
23 class vtkSelection;
25 
27 {
28 public:
29  static vtkSMContextViewProxy* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
36  vtkContextView* GetContextView();
37 
41  virtual vtkAbstractContextItem* GetContextItem();
42 
47  vtkRenderWindow* GetRenderWindow() override;
48 
55  void SetupInteractor(vtkRenderWindowInteractor* iren) override;
56 
61 
65  virtual void ResetDisplay();
66 
74  bool CanDisplayData(vtkSMSourceProxy* producer, int outputPort) override;
75 
79  const char* GetRepresentationType(vtkSMSourceProxy* producer, int outputPort) override;
80 
81  vtkSelection* GetCurrentSelection();
82 
83 protected:
85  ~vtkSMContextViewProxy() override;
86 
87  void CreateVTKObjects() override;
88 
93  void OnInteractionEvent();
94 
100  void OnForwardInteractionEvent(vtkObject*, unsigned long, void*);
101 
106  void OnLeftButtonReleaseEvent();
107 
112  void PostRender(bool interactive) override;
113 
117  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
118 
124  vtkTypeUInt32 PreRender(bool interactive) override;
125 
130 
140 
147 
148 private:
150  void operator=(const vtkSMContextViewProxy&) = delete;
151 
156  void CopyAxisRangesFromChart();
157 
159  vtkNew<vtkEventForwarderCommand> EventForwarder;
160 };
161 
162 #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...