VTK
vtkAffineWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAffineWidget.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 =========================================================================*/
66 #ifndef vtkAffineWidget_h
67 #define vtkAffineWidget_h
68 
69 #include "vtkInteractionWidgetsModule.h" // For export macro
70 #include "vtkAbstractWidget.h"
71 
73 
74 
76 {
77 public:
79  static vtkAffineWidget *New();
80 
82 
84  void PrintSelf(ostream& os, vtkIndent indent);
86 
88 
92  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
94 
96 
98  {return reinterpret_cast<vtkAffineRepresentation*>(this->WidgetRep);}
100 
103 
107  virtual void SetEnabled(int);
108 
109 protected:
110  vtkAffineWidget();
111  ~vtkAffineWidget();
112 
113  // These are the callbacks for this widget
114  static void SelectAction(vtkAbstractWidget*);
115  static void EndSelectAction(vtkAbstractWidget*);
116  static void MoveAction(vtkAbstractWidget*);
117  static void ModifyEventAction(vtkAbstractWidget*);
118 
119  // helper methods for cursor management
120  void SetCursor(int state);
121 
122  // Manage the state of the widget
125  {
126  Start=0,
127  Active
128  };
129 
130  // Keep track whether key modifier key is pressed
132 
133 private:
134  vtkAffineWidget(const vtkAffineWidget&); //Not implemented
135  void operator=(const vtkAffineWidget&); //Not implemented
136 };
137 
138 #endif
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetCursor(int vtkNotUsed(state))
abstract class for representing affine transformation widgets
virtual void CreateDefaultRepresentation()=0
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
void SetRepresentation(vtkAffineRepresentation *r)
perform affine transformations
define the API for widget / widget representation
static vtkObject * New()
virtual void SetEnabled(int)
vtkAffineRepresentation * GetAffineRepresentation()