VTK  9.2.20230603
vtkInteractorStyleRubberBand2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleRubberBand2D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
92 #ifndef vtkInteractorStyleRubberBand2D_h
93 #define vtkInteractorStyleRubberBand2D_h
94 
95 #include "vtkInteractionStyleModule.h" // For export macro
96 #include "vtkInteractorStyle.h"
97 
98 VTK_ABI_NAMESPACE_BEGIN
100 
101 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
102 {
103 public:
106  void PrintSelf(ostream& os, vtkIndent indent) override;
107 
108  void OnLeftButtonDown() override;
109  void OnLeftButtonUp() override;
110  void OnMiddleButtonDown() override;
111  void OnMiddleButtonUp() override;
112  void OnRightButtonDown() override;
113  void OnRightButtonUp() override;
114  void OnMouseMove() override;
115  void OnMouseWheelForward() override;
116  void OnMouseWheelBackward() override;
117 
119 
122  vtkSetMacro(RenderOnMouseMove, bool);
123  vtkGetMacro(RenderOnMouseMove, bool);
124  vtkBooleanMacro(RenderOnMouseMove, bool);
126 
130  enum
131  {
132  SELECT_NORMAL = 0,
133  SELECT_UNION = 1
134  };
135 
137 
140  vtkGetMacro(Interaction, int);
142 
143  enum
144  {
148  SELECTING
149  };
150 
152 
157  vtkGetVector2Macro(StartPosition, int);
158  vtkGetVector2Macro(EndPosition, int);
160 
161 protected:
164 
165  // The interaction mode
167 
168  // Draws the selection rubber band
170 
171  // The start position of the selection
172  int StartPosition[2];
173 
174  // The end position of the selection
175  int EndPosition[2];
176 
177  // The pixel array for the rubber band
179 
180  // Whether to render when the mouse moves
182 
183 private:
185  void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
186 };
187 
188 VTK_ABI_NAMESPACE_END
189 #endif
a simple class to control print indentation
Definition: vtkIndent.h:120
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