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 "vtkInteractorStyle.h"
46 
48 
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
56  virtual void OnLeftButtonDown();
57  virtual void OnLeftButtonUp();
58  virtual void OnMiddleButtonDown();
59  virtual void OnMiddleButtonUp();
60  virtual void OnRightButtonDown();
61  virtual void OnRightButtonUp();
62  virtual void OnMouseMove();
63  virtual void OnMouseWheelForward();
64  virtual void OnMouseWheelBackward();
65 
67 
68  vtkSetMacro(RenderOnMouseMove, bool);
69  vtkGetMacro(RenderOnMouseMove, bool);
70  vtkBooleanMacro(RenderOnMouseMove, bool);
72 
73  //BTX
75 
76  enum
77  {
78  SELECT_NORMAL = 0,
79  SELECT_UNION = 1
80  };
81  //ETX
83 
85 
86  vtkGetMacro(Interaction, int);
88 
89  //BTX
90  enum
91  {
95  SELECTING
96  };
97  //ETX
98 
100 
104  vtkGetVector2Macro(StartPosition,int);
105  vtkGetVector2Macro(EndPosition,int);
107 
108 protected:
111 
112  // The interaction mode
114 
115  // Draws the selection rubber band
116  void RedrawRubberBand();
117 
118  // The end position of the selection
119  int StartPosition[2];
120 
121  // The start position of the selection
122  int EndPosition[2];
123 
124  // The pixel array for the rubber band
126 
127  // Whether to render when the mouse moves
129 
130 private:
132  void operator=(const vtkInteractorStyleRubberBand2D&); // Not implemented
133 };
134 
135 #endif
virtual void OnLeftButtonDown()
virtual void OnMiddleButtonDown()
virtual void OnRightButtonDown()
virtual void OnLeftButtonUp()
static vtkInteractorStyle * New()
virtual void OnMiddleButtonUp()
A rubber band interactor for a 2D view.
virtual void OnMouseWheelForward()
virtual void OnRightButtonUp()
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void OnMouseWheelBackward()
dynamic, self-adjusting array of unsigned char
#define VTK_RENDERING_EXPORT
provide event-driven interface to the rendering window (defines trackball mode)
virtual void OnMouseMove()