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 "vtkInteractionWidgetsModule.h" // For export macro
50 #include "vtkAbstractWidget.h"
51 
53 class vtkHandleWidget;
54 class vtkWidgetSet;
55 
57 {
58  //BTX
59  friend class vtkWidgetSet;
60  //ETX
61 public:
63  static vtkParallelopipedWidget *New();
64 
66  void PrintSelf(ostream& os, vtkIndent indent);
67 
72  virtual void SetEnabled(int);
73 
75 
79  {
80  this->Superclass::SetWidgetRepresentation(
81  reinterpret_cast<vtkWidgetRepresentation*>(r));
82  }
84 
86 
88  {return reinterpret_cast<vtkParallelopipedRepresentation*>(this->WidgetRep);}
90 
92 
94  vtkSetMacro(EnableChairCreation,int);
95  vtkGetMacro(EnableChairCreation,int);
96  vtkBooleanMacro(EnableChairCreation,int);
98 
101 
104  virtual void SetProcessEvents(int);
105 
106 protected:
109 
110  static void RequestResizeCallback (vtkAbstractWidget* );
111  static void RequestResizeAlongAnAxisCallback (vtkAbstractWidget* );
112  static void RequestChairModeCallback (vtkAbstractWidget* );
113  static void TranslateCallback (vtkAbstractWidget* );
114  static void OnMouseMoveCallback (vtkAbstractWidget* );
115  static void OnLeftButtonUpCallback (vtkAbstractWidget* );
116 
117  // Control whether chairs can be created
119 
121  void BeginTranslateAction ( vtkParallelopipedWidget *dispatcher);
122  void TranslateAction ( vtkParallelopipedWidget *dispatcher);
124 
125  // helper methods for cursor management
126  void SetCursor(int state);
127 
128  // To break reference count loops
129  virtual void ReportReferences(vtkGarbageCollector* collector);
130 
131  // The positioning handle widgets
133 
134  //BTX
136 
138  {
139  RequestResizeEvent = 10000,
141  RequestChairModeEvent
142  };
143  //ETX
145 
147 
148 private:
149  vtkParallelopipedWidget(const vtkParallelopipedWidget&); //Not implemented
150  void operator=(const vtkParallelopipedWidget&); //Not implemented
151 };
152 
153 #endif
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetCursor(int vtkNotUsed(state))
virtual void SetProcessEvents(int)
a general widget for moving handles
virtual void CreateDefaultRepresentation()=0
Synchronize a collection on vtkWidgets drawn on different renderwindows using the Callback - Dispatch...
Definition: vtkWidgetSet.h:112
Detect and break reference loops.
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void ReportReferences(vtkGarbageCollector *)
Default representation for vtkParallelopipedWidget.
vtkParallelopipedRepresentation * GetParallelopipedRepresentation()
define the API for widget / widget representation
a widget to manipulate 3D parallelopipeds
static vtkObject * New()
void SetRepresentation(vtkParallelopipedRepresentation *r)
virtual void SetEnabled(int)