VTK
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 -------------------------------------------------------------------------*/
42 #ifndef vtkInteractorStyleRubberBand2D_h
43 #define vtkInteractorStyleRubberBand2D_h
44 
45 #include "vtkInteractionStyleModule.h" // For export macro
46 #include "vtkInteractorStyle.h"
47 
49 
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
57  virtual void OnLeftButtonDown();
58  virtual void OnLeftButtonUp();
59  virtual void OnMiddleButtonDown();
60  virtual void OnMiddleButtonUp();
61  virtual void OnRightButtonDown();
62  virtual void OnRightButtonUp();
63  virtual void OnMouseMove();
64  virtual void OnMouseWheelForward();
65  virtual void OnMouseWheelBackward();
66 
68 
69  vtkSetMacro(RenderOnMouseMove, bool);
70  vtkGetMacro(RenderOnMouseMove, bool);
71  vtkBooleanMacro(RenderOnMouseMove, bool);
73 
74  //BTX
76 
77  enum
78  {
79  SELECT_NORMAL = 0,
80  SELECT_UNION = 1
81  };
82  //ETX
84 
86 
87  vtkGetMacro(Interaction, int);
89 
90  //BTX
91  enum
92  {
96  SELECTING
97  };
98  //ETX
99 
101 
105  vtkGetVector2Macro(StartPosition,int);
106  vtkGetVector2Macro(EndPosition,int);
108 
109 protected:
112 
113  // The interaction mode
115 
116  // Draws the selection rubber band
118 
119  // The end position of the selection
120  int StartPosition[2];
121 
122  // The start position of the selection
123  int EndPosition[2];
124 
125  // The pixel array for the rubber band
127 
128  // Whether to render when the mouse moves
130 
131 private:
133  void operator=(const vtkInteractorStyleRubberBand2D&); // Not implemented
134 };
135 
136 #endif
vtkInteractorStyleRubberBand2D::PixelArray
vtkUnsignedCharArray * PixelArray
Definition: vtkInteractorStyleRubberBand2D.h:126
vtkInteractorStyleRubberBand2D::OnRightButtonUp
virtual void OnRightButtonUp()
vtkInteractorStyle.h
vtkGetVector2Macro
#define vtkGetVector2Macro(name, type)
Definition: vtkSetGet.h:270
vtkInteractorStyleRubberBand2D::New
static vtkInteractorStyleRubberBand2D * New()
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:49
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkInteractorStyleRubberBand2D::OnLeftButtonDown
virtual void OnLeftButtonDown()
vtkInteractorStyleRubberBand2D
A rubber band interactor for a 2D view.
Definition: vtkInteractorStyleRubberBand2D.h:51
VTKINTERACTIONSTYLE_EXPORT
#define VTKINTERACTIONSTYLE_EXPORT
Definition: vtkInteractionStyleModule.h:15
vtkInteractorStyleRubberBand2D::RenderOnMouseMove
bool RenderOnMouseMove
Definition: vtkInteractorStyleRubberBand2D.h:129
vtkInteractorStyleRubberBand2D::OnMiddleButtonDown
virtual void OnMiddleButtonDown()
vtkInteractorStyleRubberBand2D::RedrawRubberBand
void RedrawRubberBand()
vtkInteractionStyleModule.h
vtkInteractorStyleRubberBand2D::OnRightButtonDown
virtual void OnRightButtonDown()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkInteractorStyleRubberBand2D::vtkInteractorStyleRubberBand2D
vtkInteractorStyleRubberBand2D()
vtkInteractorStyleRubberBand2D::NONE
@ NONE
Definition: vtkInteractorStyleRubberBand2D.h:93
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:136
vtkInteractorStyleRubberBand2D::OnLeftButtonUp
virtual void OnLeftButtonUp()
vtkInteractorStyleRubberBand2D::OnMouseWheelForward
virtual void OnMouseWheelForward()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkInteractorStyleRubberBand2D::ZOOMING
@ ZOOMING
Definition: vtkInteractorStyleRubberBand2D.h:95
vtkInteractorStyleRubberBand2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkInteractorStyleRubberBand2D::PANNING
@ PANNING
Definition: vtkInteractorStyleRubberBand2D.h:94
vtkInteractorStyleRubberBand2D::Interaction
int Interaction
Definition: vtkInteractorStyleRubberBand2D.h:114
vtkInteractorStyleRubberBand2D::~vtkInteractorStyleRubberBand2D
~vtkInteractorStyleRubberBand2D()
vtkInteractorStyleRubberBand2D::OnMouseMove
virtual void OnMouseMove()
vtkInteractorStyleRubberBand2D::OnMiddleButtonUp
virtual void OnMiddleButtonUp()
vtkInteractorStyleRubberBand2D::OnMouseWheelBackward
virtual void OnMouseWheelBackward()