VTK  9.3.1
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
27#ifndef vtkInteractorStyleRubberBand2D_h
28#define vtkInteractorStyleRubberBand2D_h
29
30#include "vtkInteractionStyleModule.h" // For export macro
31#include "vtkInteractorStyle.h"
32
33VTK_ABI_NAMESPACE_BEGIN
35
36class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43 void OnLeftButtonDown() override;
44 void OnLeftButtonUp() override;
45 void OnMiddleButtonDown() override;
46 void OnMiddleButtonUp() override;
47 void OnRightButtonDown() override;
48 void OnRightButtonUp() override;
49 void OnMouseMove() override;
50 void OnMouseWheelForward() override;
51 void OnMouseWheelBackward() override;
52
54
57 vtkSetMacro(RenderOnMouseMove, bool);
58 vtkGetMacro(RenderOnMouseMove, bool);
59 vtkBooleanMacro(RenderOnMouseMove, bool);
61
65 enum
66 {
67 SELECT_NORMAL = 0,
68 SELECT_UNION = 1
69 };
70
72
75 vtkGetMacro(Interaction, int);
77
78 enum
79 {
83 SELECTING
84 };
85
87
92 vtkGetVector2Macro(StartPosition, int);
93 vtkGetVector2Macro(EndPosition, int);
95
96protected:
99
100 // The interaction mode
102
103 // Draws the selection rubber band
105
106 // The start position of the selection
107 int StartPosition[2];
108
109 // The end position of the selection
110 int EndPosition[2];
111
112 // The pixel array for the rubber band
114
115 // Whether to render when the mouse moves
117
118private:
120 void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
121};
122
123VTK_ABI_NAMESPACE_END
124#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