VTK  9.1.0
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 -------------------------------------------------------------------------*/
89 #ifndef vtkInteractorStyleRubberBand2D_h
90 #define vtkInteractorStyleRubberBand2D_h
91 
92 #include "vtkInteractionStyleModule.h" // For export macro
93 #include "vtkInteractorStyle.h"
94 
96 
97 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
98 {
99 public:
102  void PrintSelf(ostream& os, vtkIndent indent) override;
103 
104  void OnLeftButtonDown() override;
105  void OnLeftButtonUp() override;
106  void OnMiddleButtonDown() override;
107  void OnMiddleButtonUp() override;
108  void OnRightButtonDown() override;
109  void OnRightButtonUp() override;
110  void OnMouseMove() override;
111  void OnMouseWheelForward() override;
112  void OnMouseWheelBackward() override;
113 
115 
118  vtkSetMacro(RenderOnMouseMove, bool);
119  vtkGetMacro(RenderOnMouseMove, bool);
120  vtkBooleanMacro(RenderOnMouseMove, bool);
122 
126  enum
127  {
128  SELECT_NORMAL = 0,
129  SELECT_UNION = 1
130  };
131 
133 
136  vtkGetMacro(Interaction, int);
138 
139  enum
140  {
144  SELECTING
145  };
146 
148 
153  vtkGetVector2Macro(StartPosition, int);
154  vtkGetVector2Macro(EndPosition, int);
156 
157 protected:
160 
161  // The interaction mode
163 
164  // Draws the selection rubber band
166 
167  // The start position of the selection
168  int StartPosition[2];
169 
170  // The end position of the selection
171  int EndPosition[2];
172 
173  // The pixel array for the rubber band
175 
176  // Whether to render when the mouse moves
178 
179 private:
181  void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
182 };
183 
184 #endif
a simple class to control print indentation
Definition: vtkIndent.h:113
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