VTK  9.1.0
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 "vtkAbstractWidget.h"
45#include "vtkInteractionWidgetsModule.h" // For export macro
46
48class vtkHandleWidget;
49class vtkWidgetSet;
50
51class VTKINTERACTIONWIDGETS_EXPORT vtkParallelopipedWidget : public vtkAbstractWidget
52{
53
54 friend class vtkWidgetSet;
55
56public:
61
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
70 void SetEnabled(int) override;
71
78 {
79 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
80 }
81
86 {
87 return reinterpret_cast<vtkParallelopipedRepresentation*>(this->WidgetRep);
88 }
89
91
95 vtkSetMacro(EnableChairCreation, vtkTypeBool);
96 vtkGetMacro(EnableChairCreation, vtkTypeBool);
97 vtkBooleanMacro(EnableChairCreation, vtkTypeBool);
99
104
110
111protected:
114
121
122 // Control whether chairs can be created
124
129
130 // helper methods for cursor management
131 void SetCursor(int state) override;
132
133 // To break reference count loops
134 void ReportReferences(vtkGarbageCollector* collector) override;
135
136 // The positioning handle widgets
138
143 {
144 RequestResizeEvent = 10000,
146 RequestChairModeEvent
147 };
148
150
151private:
153 void operator=(const vtkParallelopipedWidget&) = delete;
154};
155
156#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
Detect and break reference loops.
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:113
Default representation for vtkParallelopipedWidget.
a widget to manipulate 3D parallelopipeds
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRepresentation(vtkParallelopipedRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static vtkParallelopipedWidget * New()
Instantiate the object.
void ReportReferences(vtkGarbageCollector *collector) override
vtkParallelopipedRepresentation * GetParallelopipedRepresentation()
Return the representation as a vtkParallelopipedRepresentation.
void BeginTranslateAction(vtkParallelopipedWidget *dispatcher)
void SetProcessEvents(vtkTypeBool) override
Methods to change the whether the widget responds to interaction.
void TranslateAction(vtkParallelopipedWidget *dispatcher)
static void RequestResizeCallback(vtkAbstractWidget *)
static void OnLeftButtonUpCallback(vtkAbstractWidget *)
WidgetEventIds
Events invoked by this widget.
static void RequestResizeAlongAnAxisCallback(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
void SetCursor(int state) override
static void TranslateCallback(vtkAbstractWidget *)
static void OnMouseMoveCallback(vtkAbstractWidget *)
static void RequestChairModeCallback(vtkAbstractWidget *)
void SetEnabled(int) override
Override the superclass method.
~vtkParallelopipedWidget() override
abstract class defines interface between the widget and widget representation classes
Synchronize a collection on vtkWidgets drawn on different renderwindows using the Callback - Dispatch...
Definition: vtkWidgetSet.h:114
int vtkTypeBool
Definition: vtkABI.h:69