SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
vtkSMTKEncodeSelection.h
1 //=========================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //=========================================================================
10 #ifndef smtk_extension_paraview_appcomponents_vtkSMTKEncodeSelection_h
11 #define smtk_extension_paraview_appcomponents_vtkSMTKEncodeSelection_h
12 
13 #include "smtk/extension/paraview/appcomponents/smtkPQComponentsExtModule.h"
14 
15 #include "vtkPVEncodeSelectionForServer.h"
16 
17 #include <memory>
18 
20 class pqSMTKWrapper;
21 namespace smtk
22 {
23 namespace resource
24 {
25 class Resource;
26 }
27 namespace view
28 {
29 class Selection;
30 }
31 } // namespace smtk
32 
42 class SMTKPQCOMPONENTSEXT_EXPORT vtkSMTKEncodeSelection : public vtkPVEncodeSelectionForServer
43 {
44 public:
45  static vtkSMTKEncodeSelection* New();
46  vtkTypeMacro(vtkSMTKEncodeSelection, vtkPVEncodeSelectionForServer);
47 
49  vtkSMTKEncodeSelection& operator=(const vtkSMTKEncodeSelection&) = delete;
50 
51  bool ProcessSelection(
52  vtkSelection* rawSelection,
53  vtkSMRenderViewProxy* viewProxy,
54  bool multipleSelectionsAllowed,
55  vtkCollection* selectedRepresentations,
56  vtkCollection* selectionSources,
57  int modifier,
58  bool selectBlocks) override;
59 
60 protected:
62  ~vtkSMTKEncodeSelection() override;
63 
65  void ProcessRawSelection(
66  vtkSelection* rawSelection,
67  vtkSMRenderViewProxy* viewProxy,
68  int modifier,
69  bool selectBlocks);
70 
71  bool ProcessResource(
72  pqSMTKWrapper* wrapper,
73  const std::shared_ptr<smtk::resource::Resource>& resource,
74  const std::shared_ptr<smtk::view::Selection>& smtkSelection,
75  vtkSMTKResourceRepresentation* resourceRep,
76  vtkSelection* rawSelection,
77  vtkSMRenderViewProxy* vtkNotUsed(viewProxy),
78  int modifier,
79  bool selectBlocks);
80 };
81 
82 #endif // smtk_extension_paraview_appcomponents_vtkSMTKEncodeSelection_h
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
vtkSMTKEncodeSelection
Intercept ParaView selections.
Definition: vtkSMTKEncodeSelection.h:42
vtkSMTKResourceRepresentation
Representation of an SMTK Resource.
Definition: vtkSMTKResourceRepresentation.h:94