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 =========================================================================*/
41 #ifndef vtkParallelopipedWidget_h
42 #define vtkParallelopipedWidget_h
43 
44 #include "vtkInteractionWidgetsModule.h" // For export macro
45 #include "vtkAbstractWidget.h"
46 
48 class vtkHandleWidget;
49 class vtkWidgetSet;
50 
51 class VTKINTERACTIONWIDGETS_EXPORT vtkParallelopipedWidget : public vtkAbstractWidget
52 {
53 
54  friend class vtkWidgetSet;
55 
56 public:
60  static vtkParallelopipedWidget *New();
61 
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
70  void SetEnabled(int) override;
71 
78  {
79  this->Superclass::SetWidgetRepresentation(
80  reinterpret_cast<vtkWidgetRepresentation*>(r));
81  }
82 
87  {return reinterpret_cast<vtkParallelopipedRepresentation*>(this->WidgetRep);}
88 
90 
94  vtkSetMacro(EnableChairCreation,vtkTypeBool);
95  vtkGetMacro(EnableChairCreation,vtkTypeBool);
96  vtkBooleanMacro(EnableChairCreation,vtkTypeBool);
98 
102  void CreateDefaultRepresentation() override;
103 
108  void SetProcessEvents(vtkTypeBool) override;
109 
110 protected:
112  ~vtkParallelopipedWidget() override;
113 
114  static void RequestResizeCallback (vtkAbstractWidget* );
115  static void RequestResizeAlongAnAxisCallback (vtkAbstractWidget* );
116  static void RequestChairModeCallback (vtkAbstractWidget* );
117  static void TranslateCallback (vtkAbstractWidget* );
118  static void OnMouseMoveCallback (vtkAbstractWidget* );
119  static void OnLeftButtonUpCallback (vtkAbstractWidget* );
120 
121  // Control whether chairs can be created
123 
125  void BeginTranslateAction ( vtkParallelopipedWidget *dispatcher);
126  void TranslateAction ( vtkParallelopipedWidget *dispatcher);
128 
129  // helper methods for cursor management
130  void SetCursor(int state) override;
131 
132  // To break reference count loops
133  void ReportReferences(vtkGarbageCollector* collector) override;
134 
135  // The positioning handle widgets
137 
142  {
143  RequestResizeEvent = 10000,
145  RequestChairModeEvent
146  };
147 
149 
150 private:
152  void operator=(const vtkParallelopipedWidget&) = delete;
153 };
154 
155 #endif
vtkAbstractWidget::SetCursor
virtual void SetCursor(int vtkNotUsed(state))
Definition: vtkAbstractWidget.h:178
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:73
vtkAbstractWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget.h
vtkObjectBase::ReportReferences
virtual void ReportReferences(vtkGarbageCollector *)
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkParallelopipedWidget::WidgetEventIds
WidgetEventIds
Events invoked by this widget.
Definition: vtkParallelopipedWidget.h:141
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:63
vtkParallelopipedWidget
a widget to manipulate 3D parallelopipeds
Definition: vtkParallelopipedWidget.h:51
vtkAbstractWidget::CreateDefaultRepresentation
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkWidgetSet
Synchronize a collection on vtkWidgets drawn on different renderwindows using the Callback - Dispatch...
Definition: vtkWidgetSet.h:111
vtkParallelopipedWidget::GetParallelopipedRepresentation
vtkParallelopipedRepresentation * GetParallelopipedRepresentation()
Return the representation as a vtkParallelopipedRepresentation.
Definition: vtkParallelopipedWidget.h:86
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkParallelopipedWidget::EnableChairCreation
vtkTypeBool EnableChairCreation
Definition: vtkParallelopipedWidget.h:122
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:96
vtkAbstractWidget::SetEnabled
void SetEnabled(int) override
Methods for activating this widget.
vtkParallelopipedWidget::HandleWidgets
vtkHandleWidget ** HandleWidgets
Definition: vtkParallelopipedWidget.h:136
vtkParallelopipedWidget::SetRepresentation
void SetRepresentation(vtkParallelopipedRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkParallelopipedWidget.h:77
vtkAbstractWidget::SetProcessEvents
virtual void SetProcessEvents(vtkTypeBool)
Methods to change whether the widget responds to interaction.
vtkParallelopipedWidget::RequestResizeAlongAnAxisEvent
Definition: vtkParallelopipedWidget.h:144
vtkParallelopipedRepresentation
Default representation for vtkParallelopipedWidget.
Definition: vtkParallelopipedRepresentation.h:50
vtkParallelopipedWidget::WidgetSet
vtkWidgetSet * WidgetSet
Definition: vtkParallelopipedWidget.h:148
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69