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 -------------------------------------------------------------------------*/
92 #ifndef vtkInteractorStyleRubberBand2D_h
93 #define vtkInteractorStyleRubberBand2D_h
94 
95 #include "vtkInteractionStyleModule.h" // For export macro
96 #include "vtkInteractorStyle.h"
97 
99 
100 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
101 {
102 public:
105  void PrintSelf(ostream& os, vtkIndent indent) override;
106 
107  void OnLeftButtonDown() override;
108  void OnLeftButtonUp() override;
109  void OnMiddleButtonDown() override;
110  void OnMiddleButtonUp() override;
111  void OnRightButtonDown() override;
112  void OnRightButtonUp() override;
113  void OnMouseMove() override;
114  void OnMouseWheelForward() override;
115  void OnMouseWheelBackward() override;
116 
118 
121  vtkSetMacro(RenderOnMouseMove, bool);
122  vtkGetMacro(RenderOnMouseMove, bool);
123  vtkBooleanMacro(RenderOnMouseMove, bool);
125 
129  enum
130  {
131  SELECT_NORMAL = 0,
132  SELECT_UNION = 1
133  };
134 
136 
139  vtkGetMacro(Interaction, int);
141 
142  enum
143  {
147  SELECTING
148  };
149 
151 
156  vtkGetVector2Macro(StartPosition, int);
157  vtkGetVector2Macro(EndPosition, int);
159 
160 protected:
163 
164  // The interaction mode
166 
167  // Draws the selection rubber band
169 
170  // The start position of the selection
171  int StartPosition[2];
172 
173  // The end position of the selection
174  int EndPosition[2];
175 
176  // The pixel array for the rubber band
178 
179  // Whether to render when the mouse moves
181 
182 private:
184  void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
185 };
186 
187 #endif
vtkInteractorStyleRubberBand2D::PixelArray
vtkUnsignedCharArray * PixelArray
Definition: vtkInteractorStyleRubberBand2D.h:177
vtkInteractorStyle.h
vtkInteractorStyleRubberBand2D::New
static vtkInteractorStyleRubberBand2D * New()
vtkInteractorStyleRubberBand2D::OnLeftButtonUp
void OnLeftButtonUp() override
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:145
vtkInteractorStyleRubberBand2D::OnLeftButtonDown
void OnLeftButtonDown() override
vtkInteractorStyleRubberBand2D
A rubber band interactor for a 2D view.
Definition: vtkInteractorStyleRubberBand2D.h:101
vtkInteractorStyleRubberBand2D::RenderOnMouseMove
bool RenderOnMouseMove
Definition: vtkInteractorStyleRubberBand2D.h:180
vtkInteractorStyleRubberBand2D::NONE
@ NONE
Definition: vtkInteractorStyleRubberBand2D.h:144
vtkInteractorStyleRubberBand2D::OnRightButtonUp
void OnRightButtonUp() override
vtkInteractorStyleRubberBand2D::PANNING
@ PANNING
Definition: vtkInteractorStyleRubberBand2D.h:145
vtkInteractorStyleRubberBand2D::RedrawRubberBand
void RedrawRubberBand()
vtkInteractorStyleRubberBand2D::OnRightButtonDown
void OnRightButtonDown() override
vtkInteractorStyleRubberBand2D::OnMouseWheelForward
void OnMouseWheelForward() override
vtkInteractorStyleRubberBand2D::OnMiddleButtonDown
void OnMiddleButtonDown() override
vtkInteractorStyleRubberBand2D::ZOOMING
@ ZOOMING
Definition: vtkInteractorStyleRubberBand2D.h:146
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkInteractorStyleRubberBand2D::vtkInteractorStyleRubberBand2D
vtkInteractorStyleRubberBand2D()
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:207
vtkInteractorStyleRubberBand2D::OnMiddleButtonUp
void OnMiddleButtonUp() override
vtkInteractorStyleRubberBand2D::OnMouseMove
void OnMouseMove() override
Generic event bindings can be overridden in subclasses.
vtkInteractorStyleRubberBand2D::Interaction
int Interaction
Definition: vtkInteractorStyleRubberBand2D.h:165
vtkInteractorStyleRubberBand2D::~vtkInteractorStyleRubberBand2D
~vtkInteractorStyleRubberBand2D() override
vtkInteractorStyleRubberBand2D::OnMouseWheelBackward
void OnMouseWheelBackward() override
vtkInteractorStyleRubberBand2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.