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 =========================================================================*/
44 #ifndef vtkParallelopipedWidget_h
45 #define vtkParallelopipedWidget_h
46 
47 #include "vtkInteractionWidgetsModule.h" // For export macro
48 #include "vtkAbstractWidget.h"
49 
51 class vtkHandleWidget;
52 class vtkWidgetSet;
53 
54 class VTKINTERACTIONWIDGETS_EXPORT vtkParallelopipedWidget : public vtkAbstractWidget
55 {
56 
57  friend class vtkWidgetSet;
58 
59 public:
63  static vtkParallelopipedWidget *New();
64 
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
73  void SetEnabled(int) override;
74 
81  {
82  this->Superclass::SetWidgetRepresentation(
83  reinterpret_cast<vtkWidgetRepresentation*>(r));
84  }
85 
90  {return reinterpret_cast<vtkParallelopipedRepresentation*>(this->WidgetRep);}
91 
93 
97  vtkSetMacro(EnableChairCreation,vtkTypeBool);
98  vtkGetMacro(EnableChairCreation,vtkTypeBool);
99  vtkBooleanMacro(EnableChairCreation,vtkTypeBool);
101 
105  void CreateDefaultRepresentation() override;
106 
111  void SetProcessEvents(vtkTypeBool) override;
112 
113 protected:
115  ~vtkParallelopipedWidget() override;
116 
117  static void RequestResizeCallback (vtkAbstractWidget* );
118  static void RequestResizeAlongAnAxisCallback (vtkAbstractWidget* );
119  static void RequestChairModeCallback (vtkAbstractWidget* );
120  static void TranslateCallback (vtkAbstractWidget* );
121  static void OnMouseMoveCallback (vtkAbstractWidget* );
122  static void OnLeftButtonUpCallback (vtkAbstractWidget* );
123 
124  // Control whether chairs can be created
126 
128  void BeginTranslateAction ( vtkParallelopipedWidget *dispatcher);
129  void TranslateAction ( vtkParallelopipedWidget *dispatcher);
131 
132  // helper methods for cursor management
133  void SetCursor(int state) override;
134 
135  // To break reference count loops
136  void ReportReferences(vtkGarbageCollector* collector) override;
137 
138  // The positioning handle widgets
140 
145  {
146  RequestResizeEvent = 10000,
148  RequestChairModeEvent
149  };
150 
152 
153 private:
155  void operator=(const vtkParallelopipedWidget&) = delete;
156 };
157 
158 #endif
virtual void SetCursor(int vtkNotUsed(state))
WidgetEventIds
Events invoked by this widget.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
a general widget for moving handles
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
Synchronize a collection on vtkWidgets drawn on different renderwindows using the Callback - Dispatch...
Definition: vtkWidgetSet.h:111
Detect and break reference loops.
vtkWidgetRepresentation * WidgetRep
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void ReportReferences(vtkGarbageCollector *)
Default representation for vtkParallelopipedWidget.
vtkParallelopipedRepresentation * GetParallelopipedRepresentation()
Return the representation as a vtkParallelopipedRepresentation.
define the API for widget / widget representation
virtual void SetProcessEvents(vtkTypeBool)
Methods to change whether the widget responds to interaction.
void SetEnabled(int) override
Methods for activating this widget.
a widget to manipulate 3D parallelopipeds
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetRepresentation(vtkParallelopipedRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...