VTK  9.3.20240425
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
76#ifndef vtkInteractorStyleRubberBand2D_h
77#define vtkInteractorStyleRubberBand2D_h
78
79#include "vtkInteractionStyleModule.h" // For export macro
80#include "vtkInteractorStyle.h"
81#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
82
83VTK_ABI_NAMESPACE_BEGIN
85
86class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALAUTO vtkInteractorStyleRubberBand2D
87 : public vtkInteractorStyle
88{
89public:
92 void PrintSelf(ostream& os, vtkIndent indent) override;
93
94 void OnLeftButtonDown() override;
95 void OnLeftButtonUp() override;
96 void OnMiddleButtonDown() override;
97 void OnMiddleButtonUp() override;
98 void OnRightButtonDown() override;
99 void OnRightButtonUp() override;
100 void OnMouseMove() override;
101 void OnMouseWheelForward() override;
102 void OnMouseWheelBackward() override;
103
105
108 vtkSetMacro(RenderOnMouseMove, bool);
109 vtkGetMacro(RenderOnMouseMove, bool);
110 vtkBooleanMacro(RenderOnMouseMove, bool);
112
116 enum
117 {
118 SELECT_NORMAL = 0,
119 SELECT_UNION = 1
120 };
121
123
126 vtkGetMacro(Interaction, int);
128
129 enum
130 {
134 SELECTING
135 };
136
138
143 vtkGetVector2Macro(StartPosition, int);
144 vtkGetVector2Macro(EndPosition, int);
146
147protected:
150
151 // The interaction mode
153
154 // Draws the selection rubber band
156
157 // The start position of the selection
158 int StartPosition[2];
159
160 // The end position of the selection
161 int EndPosition[2];
162
163 // The pixel array for the rubber band
165
166 // Whether to render when the mouse moves
168
169private:
171 void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
172};
173
174VTK_ABI_NAMESPACE_END
175#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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
#define VTK_MARSHALAUTO