File: vtkSMTooltipSelectionPipeline.h

package info (click to toggle)
paraview 5.0.0%2Bdfsg1-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 225,112 kB
  • sloc: cpp: 2,432,495; ansic: 204,338; python: 97,967; xml: 79,887; tcl: 46,936; fortran: 26,923; yacc: 4,926; java: 4,413; perl: 3,108; sh: 2,775; lex: 1,934; f90: 748; asm: 471; pascal: 228; makefile: 192; objc: 17
file content (100 lines) | stat: -rw-r--r-- 3,468 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*=========================================================================

 Program:   Visualization Toolkit
 Module:    vtkSMTooltipSelectionPipeline.h

 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
 All rights reserved.
 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

 This software is distributed WITHOUT ANY WARRANTY; without even
 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.  See the above copyright notice for more information.

 =========================================================================*/
// .NAME vtkSMTooltipSelectionPipeline -- Pipeline for point tooltip mode
//
// .SECTION Description
// Point tooltip mode enables the user to inspect points (coordinates,
// data array values) by hovering the mouse cursor over a point.
// This is a global object that holds the pipeline for showing the point
// tooltip mode.
//
// .SECTION See Also
// vtkSMPreselectionPipeline vtkSMInteractiveSelectionPipeline


#ifndef vtkSMTooltipSelectionPipeline_h
#define vtkSMTooltipSelectionPipeline_h

#include "vtkPVServerManagerDefaultModule.h" //needed for exports
#include "vtkSMPreselectionPipeline.h"

#include <string> // STL Header

class vtkDataObject;
class vtkDataSet;

class VTKPVSERVERMANAGERDEFAULT_EXPORT vtkSMTooltipSelectionPipeline :
  public vtkSMPreselectionPipeline
{
public:
  static vtkSMTooltipSelectionPipeline* New();
  vtkTypeMacro(vtkSMTooltipSelectionPipeline,vtkSMPreselectionPipeline);
  void PrintSelf(ostream& os, vtkIndent indent );
  static vtkSMTooltipSelectionPipeline* GetInstance();

  // Description:
  // Re-implemented from vtkSMPreselectionPipeline
  virtual void Hide(vtkSMRenderViewProxy* view);
  virtual void Show(vtkSMSourceProxy* sourceRepresentation,
    vtkSMSourceProxy* selection, vtkSMRenderViewProxy* view);

  // Description:
  // Return true if a tooltip can be displayed according to the context,
  // otherwise return false. The argument showTooltip is true if the tooltip
  // must be shown, false if the tooltip must be hidden.
  bool CanDisplayTooltip(bool& showTooltip);

  // Description:
  // Get information about the tooltip to be displayed.
  // Return false if the method failed computing information.
  bool GetTooltipInfo(double tooltipPos[2], std::string& tooltipText);

protected:
  vtkSMTooltipSelectionPipeline();
  ~vtkSMTooltipSelectionPipeline();

  // Description:
  // Re-implemented from vtkSMPreselectionPipeline
  void ClearCache();

  // Description:
  // Connect the ClientServerMoveData filter to the pipeline to get
  // the selection on the client side.
  vtkDataObject* ConnectPVMoveSelectionToClient(
    vtkSMSourceProxy* source, unsigned int sourceOutputPort);

  // Description:
  // Get the id of the selected point.
  bool GetCurrentSelectionId(vtkSMRenderViewProxy* view, vtkIdType& selId);

  // Description:
  // Extract dataset from the dataObject, which can be either directly a dataset 
  // or a composite dataset containing only one dataset.
  vtkDataSet* FindDataSet(vtkDataObject* dataObject, 
    bool& compositeFound, std::string& compositeName);

  vtkSMSourceProxy* MoveSelectionToClient;
  vtkIdType PreviousSelectionId;
  bool SelectionFound;
  bool TooltipEnabled;

private:
  // Not implemented
  vtkSMTooltipSelectionPipeline(
    const vtkSMTooltipSelectionPipeline&); // Not implemented
  void operator=(const vtkSMTooltipSelectionPipeline&); // Not implemented
};

#endif