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 "vtkAbstractWidget.h"
70 
72 
73 
75 {
76 public:
78  static vtkAffineWidget *New();
79 
81 
83  void PrintSelf(ostream& os, vtkIndent indent);
85 
87 
91  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
93 
95 
97  {return reinterpret_cast<vtkAffineRepresentation*>(this->WidgetRep);}
99 
102 
106  virtual void SetEnabled(int);
107 
108 protected:
109  vtkAffineWidget();
110  ~vtkAffineWidget();
111 
112  // These are the callbacks for this widget
113  static void SelectAction(vtkAbstractWidget*);
114  static void EndSelectAction(vtkAbstractWidget*);
115  static void MoveAction(vtkAbstractWidget*);
116  static void ModifyEventAction(vtkAbstractWidget*);
117 
118  // helper methods for cursor management
119  void SetCursor(int state);
120 
121 //BTX - manage the state of the widget
124  {
125  Start=0,
126  Active
127  };
128 //ETX
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
a simple class to control print indentation
Definition: vtkIndent.h:37
void SetRepresentation(vtkAffineRepresentation *r)
#define VTK_WIDGETS_EXPORT
perform affine transformations
define the API for widget / widget representation
static vtkObject * New()
virtual void SetEnabled(int)
vtkAffineRepresentation * GetAffineRepresentation()