VTK
vtkParallelopipedWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParallelopipedWidget.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 =========================================================================*/
46 #ifndef __vtkParallelopipedWidget_h
47 #define __vtkParallelopipedWidget_h
48 
49 #include "vtkAbstractWidget.h"
50 
52 class vtkHandleWidget;
53 class vtkWidgetSet;
54 
56 {
57  //BTX
58  friend class vtkWidgetSet;
59  //ETX
60 public:
62  static vtkParallelopipedWidget *New();
63 
65  void PrintSelf(ostream& os, vtkIndent indent);
66 
71  virtual void SetEnabled(int);
72 
74 
77  void SetRepresentation(vtkParallelopipedRepresentation *r)
78  {
79  this->Superclass::SetWidgetRepresentation(
80  reinterpret_cast<vtkWidgetRepresentation*>(r));
81  }
83 
85 
86  vtkParallelopipedRepresentation *GetParallelopipedRepresentation()
87  {return reinterpret_cast<vtkParallelopipedRepresentation*>(this->WidgetRep);}
89 
91 
93  vtkSetMacro(EnableChairCreation,int);
94  vtkGetMacro(EnableChairCreation,int);
95  vtkBooleanMacro(EnableChairCreation,int);
97 
100 
103  virtual void SetProcessEvents(int);
104 
105 protected:
108 
109  static void RequestResizeCallback (vtkAbstractWidget* );
110  static void RequestResizeAlongAnAxisCallback (vtkAbstractWidget* );
111  static void RequestChairModeCallback (vtkAbstractWidget* );
112  static void TranslateCallback (vtkAbstractWidget* );
113  static void OnMouseMoveCallback (vtkAbstractWidget* );
114  static void OnLeftButtonUpCallback (vtkAbstractWidget* );
115 
116  // Control whether chairs can be created
118 
120  void BeginTranslateAction ( vtkParallelopipedWidget *dispatcher);
121  void TranslateAction ( vtkParallelopipedWidget *dispatcher);
123 
124  // helper methods for cursor management
125  void SetCursor(int state);
126 
127  // To break reference count loops
128  virtual void ReportReferences(vtkGarbageCollector* collector);
129 
130  // The positioning handle widgets
132 
133  //BTX
135 
137  {
138  RequestResizeEvent = 10000,
140  RequestChairModeEvent
141  };
142  //ETX
144 
146 
147 private:
148  vtkParallelopipedWidget(const vtkParallelopipedWidget&); //Not implemented
149  void operator=(const vtkParallelopipedWidget&); //Not implemented
150 };
151 
152 #endif