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
33#ifndef vtkInteractorStyleRubberBand2D_h
34#define vtkInteractorStyleRubberBand2D_h
35
36#include "vtkInteractionStyleModule.h" // For export macro
37#include "vtkInteractorStyle.h"
38
39VTK_ABI_NAMESPACE_BEGIN
41
42class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
49 void OnLeftButtonDown() override;
50 void OnLeftButtonUp() override;
51 void OnMiddleButtonDown() override;
52 void OnMiddleButtonUp() override;
53 void OnRightButtonDown() override;
54 void OnRightButtonUp() override;
55 void OnMouseMove() override;
56 void OnMouseWheelForward() override;
57 void OnMouseWheelBackward() override;
58
60
63 vtkSetMacro(RenderOnMouseMove, bool);
64 vtkGetMacro(RenderOnMouseMove, bool);
65 vtkBooleanMacro(RenderOnMouseMove, bool);
67
71 enum
72 {
73 SELECT_NORMAL = 0,
74 SELECT_UNION = 1
75 };
76
78
81 vtkGetMacro(Interaction, int);
83
84 enum
85 {
89 SELECTING
90 };
91
93
98 vtkGetVector2Macro(StartPosition, int);
99 vtkGetVector2Macro(EndPosition, int);
101
102protected:
105
106 // The interaction mode
108
109 // Draws the selection rubber band
111
112 // The start position of the selection
113 int StartPosition[2];
114
115 // The end position of the selection
116 int EndPosition[2];
117
118 // The pixel array for the rubber band
120
121 // Whether to render when the mouse moves
123
124private:
126 void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
127};
128
129VTK_ABI_NAMESPACE_END
130#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