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
24#ifndef vtkInteractorStyleRubberBand2D_h
25#define vtkInteractorStyleRubberBand2D_h
26
27#include "vtkInteractionStyleModule.h" // For export macro
28#include "vtkInteractorStyle.h"
29
30VTK_ABI_NAMESPACE_BEGIN
32
33class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
40 void OnLeftButtonDown() override;
41 void OnLeftButtonUp() override;
42 void OnMiddleButtonDown() override;
43 void OnMiddleButtonUp() override;
44 void OnRightButtonDown() override;
45 void OnRightButtonUp() override;
46 void OnMouseMove() override;
47 void OnMouseWheelForward() override;
48 void OnMouseWheelBackward() override;
49
51
54 vtkSetMacro(RenderOnMouseMove, bool);
55 vtkGetMacro(RenderOnMouseMove, bool);
56 vtkBooleanMacro(RenderOnMouseMove, bool);
58
62 enum
63 {
64 SELECT_NORMAL = 0,
65 SELECT_UNION = 1
66 };
67
69
72 vtkGetMacro(Interaction, int);
74
75 enum
76 {
80 SELECTING
81 };
82
84
89 vtkGetVector2Macro(StartPosition, int);
90 vtkGetVector2Macro(EndPosition, int);
92
93protected:
96
97 // The interaction mode
99
100 // Draws the selection rubber band
102
103 // The start position of the selection
104 int StartPosition[2];
105
106 // The end position of the selection
107 int EndPosition[2];
108
109 // The pixel array for the rubber band
111
112 // Whether to render when the mouse moves
114
115private:
117 void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
118};
119
120VTK_ABI_NAMESPACE_END
121#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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