VTK  9.3.0
vtkInteractorStyleRubberBand2D.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
36 #ifndef vtkInteractorStyleRubberBand2D_h
37 #define vtkInteractorStyleRubberBand2D_h
38 
39 #include "vtkInteractionStyleModule.h" // For export macro
40 #include "vtkInteractorStyle.h"
41 
42 VTK_ABI_NAMESPACE_BEGIN
44 
45 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
46 {
47 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
52  void OnLeftButtonDown() override;
53  void OnLeftButtonUp() override;
54  void OnMiddleButtonDown() override;
55  void OnMiddleButtonUp() override;
56  void OnRightButtonDown() override;
57  void OnRightButtonUp() override;
58  void OnMouseMove() override;
59  void OnMouseWheelForward() override;
60  void OnMouseWheelBackward() override;
61 
63 
66  vtkSetMacro(RenderOnMouseMove, bool);
67  vtkGetMacro(RenderOnMouseMove, bool);
68  vtkBooleanMacro(RenderOnMouseMove, bool);
70 
74  enum
75  {
76  SELECT_NORMAL = 0,
77  SELECT_UNION = 1
78  };
79 
81 
84  vtkGetMacro(Interaction, int);
86 
87  enum
88  {
92  SELECTING
93  };
94 
96 
101  vtkGetVector2Macro(StartPosition, int);
102  vtkGetVector2Macro(EndPosition, int);
104 
105 protected:
108 
109  // The interaction mode
111 
112  // Draws the selection rubber band
114 
115  // The start position of the selection
116  int StartPosition[2];
117 
118  // The end position of the selection
119  int EndPosition[2];
120 
121  // The pixel array for the rubber band
123 
124  // Whether to render when the mouse moves
126 
127 private:
129  void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
130 };
131 
132 VTK_ABI_NAMESPACE_END
133 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
A rubber band interactor for a 2D view.
static vtkInteractorStyleRubberBand2D * New()
void OnRightButtonDown() override
void OnMiddleButtonUp() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void OnLeftButtonDown() override
void OnMouseMove() override
Generic event bindings can be overridden in subclasses.
~vtkInteractorStyleRubberBand2D() override
void OnMouseWheelBackward() override
void OnMouseWheelForward() override
void OnMiddleButtonDown() override
provide event-driven interface to the rendering window (defines trackball mode)
dynamic, self-adjusting array of unsigned char