Drake Designer
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
vtkFrameWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 // .NAME vtkFrameWidget - A widget for manipulating an orthonormal frame
15 // .SECTION Description
16 // This widget allows the translation and rotation of an orthonormal frame
17 //
18 // .SECTION See Also
19 // vtkFrameWidgetRepresentation vtkFrameWidgetRepresentation
20 
21 #ifndef __vtkFrameWidget_h
22 #define __vtkFrameWidget_h
23 
24 #include "vtkAbstractWidget.h"
25 
26 #include <vtkDRCFiltersModule.h>
27 
29 
30 class VTKDRCFILTERS_EXPORT vtkFrameWidget : public vtkAbstractWidget
31 {
32 public:
33  // Description:
34  // Instantiate the object.
35  static vtkFrameWidget *New();
36 
37  // Description:
38  // Standard class methods for type information and printing.
39  vtkTypeMacro(vtkFrameWidget,vtkAbstractWidget);
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
42 
43  // Description:
44  // Create the default widget representation if one is not set. By default,
45  // this is an instance of the vtkFrameWidgetRepresentation class.
46  void CreateDefaultRepresentation();
47 
48  // Description:
49  // Enable rotation about the frame handles.
50  vtkBooleanMacro(HandleRotationEnabled, bool);
51  vtkSetMacro(HandleRotationEnabled, bool);
52  vtkGetMacro(HandleRotationEnabled, bool);
53 
54 protected:
56  ~vtkFrameWidget();
57 
58  void OnEndInteraction();
59  void OnMouseMove();
60  void OnTranslate();
61  void OnRotate();
62  void UpdateMouseHover();
63 
66  enum _WidgetState {Start=0,Active};
67 
68  static void TranslateAction(vtkAbstractWidget*);
69  static void EndTranslateAction(vtkAbstractWidget*);
70  static void RotateAction(vtkAbstractWidget*);
71  static void EndRotateAction(vtkAbstractWidget*);
72  static void MoveAction(vtkAbstractWidget*);
73 
74 private:
75  vtkFrameWidget(const vtkFrameWidget&); //Not implemented
76  void operator=(const vtkFrameWidget&); //Not implemented
77 };
78 
79 #endif
bool HandleRotationEnabled
#define VTKDRCFILTERS_EXPORT