VTK  9.2.6
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 -------------------------------------------------------------------------*/
52 #ifndef vtkInteractorStyleRubberBand2D_h
53 #define vtkInteractorStyleRubberBand2D_h
54 
55 #include "vtkInteractionStyleModule.h" // For export macro
56 #include "vtkInteractorStyle.h"
57 
59 
60 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
61 {
62 public:
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
67  void OnLeftButtonDown() override;
68  void OnLeftButtonUp() override;
69  void OnMiddleButtonDown() override;
70  void OnMiddleButtonUp() override;
71  void OnRightButtonDown() override;
72  void OnRightButtonUp() override;
73  void OnMouseMove() override;
74  void OnMouseWheelForward() override;
75  void OnMouseWheelBackward() override;
76 
78 
81  vtkSetMacro(RenderOnMouseMove, bool);
82  vtkGetMacro(RenderOnMouseMove, bool);
83  vtkBooleanMacro(RenderOnMouseMove, bool);
85 
89  enum
90  {
91  SELECT_NORMAL = 0,
92  SELECT_UNION = 1
93  };
94 
96 
99  vtkGetMacro(Interaction, int);
101 
102  enum
103  {
107  SELECTING
108  };
109 
111 
116  vtkGetVector2Macro(StartPosition, int);
117  vtkGetVector2Macro(EndPosition, int);
119 
120 protected:
123 
124  // The interaction mode
126 
127  // Draws the selection rubber band
129 
130  // The start position of the selection
131  int StartPosition[2];
132 
133  // The end position of the selection
134  int EndPosition[2];
135 
136  // The pixel array for the rubber band
138 
139  // Whether to render when the mouse moves
141 
142 private:
144  void operator=(const vtkInteractorStyleRubberBand2D&) = delete;
145 };
146 
147 #endif
a simple class to control print indentation
Definition: vtkIndent.h:49
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