VTK  9.3.0
vtkParallelopipedWidget.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
32#ifndef vtkParallelopipedWidget_h
33#define vtkParallelopipedWidget_h
34
35#include "vtkAbstractWidget.h"
36#include "vtkInteractionWidgetsModule.h" // For export macro
37
38VTK_ABI_NAMESPACE_BEGIN
40class vtkHandleWidget;
41class vtkWidgetSet;
42
43class VTKINTERACTIONWIDGETS_EXPORT vtkParallelopipedWidget : public vtkAbstractWidget
44{
45
46 friend class vtkWidgetSet;
47
48public:
53
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
62 void SetEnabled(int) override;
63
70 {
71 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
72 }
73
78 {
79 return reinterpret_cast<vtkParallelopipedRepresentation*>(this->WidgetRep);
80 }
81
83
87 vtkSetMacro(EnableChairCreation, vtkTypeBool);
88 vtkGetMacro(EnableChairCreation, vtkTypeBool);
89 vtkBooleanMacro(EnableChairCreation, vtkTypeBool);
91
96
102
103protected:
106
113
114 // Control whether chairs can be created
116
121
122 // helper methods for cursor management
123 void SetCursor(int state) override;
124
125 // To break reference count loops
126 void ReportReferences(vtkGarbageCollector* collector) override;
127
128 // The positioning handle widgets
130
135 {
136 RequestResizeEvent = 10000,
138 RequestChairModeEvent
139 };
140
142
143private:
145 void operator=(const vtkParallelopipedWidget&) = delete;
146};
147
148VTK_ABI_NAMESPACE_END
149#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:29
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...
int vtkTypeBool
Definition vtkABI.h:64