VTK  9.5.2
vtkSeedWidget.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
99
100#ifndef vtkSeedWidget_h
101#define vtkSeedWidget_h
102
103#include "vtkAbstractWidget.h"
104#include "vtkInteractionWidgetsModule.h" // For export macro
105#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
106
107VTK_ABI_NAMESPACE_BEGIN
109class vtkHandleWidget;
110class vtkSeedList;
112
113class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkSeedWidget : public vtkAbstractWidget
114{
115public:
120
122
126 void PrintSelf(ostream& os, vtkIndent indent) override;
128
134 void SetEnabled(int) override;
135
141
147
157
162 {
163 return reinterpret_cast<vtkSeedRepresentation*>(this->WidgetRep);
164 }
165
170
176
186 virtual void CompleteInteraction();
187
192 virtual void RestartInteraction();
193
202
206 void DeleteSeed(int n);
207
212
214
217 vtkGetMacro(WidgetState, int);
219
220 // The state of the widget
221
222 enum
223 {
224 Start = 1,
228 };
229
230protected:
232 ~vtkSeedWidget() override;
233
235
236 // Callback interface to capture events when
237 // placing the widget.
243
244 // The positioning handle widgets
245 vtkSeedList* Seeds;
246
247 // Manipulating or defining ?
249
250private:
251 vtkSeedWidget(const vtkSeedWidget&) = delete;
252 void operator=(const vtkSeedWidget&) = delete;
253};
254
255VTK_ABI_NAMESPACE_END
256#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
abstract class for representing widget handles
a general widget for moving handles
a simple class to control print indentation
Definition vtkIndent.h:108
platform-independent render window interaction including picking and frame rate control.
abstract specification for renderers
represent the vtkSeedWidget
virtual void CompleteInteraction()
Method to be called when the seed widget should stop responding to the place point interaction.
void DeleteSeed(int n)
Delete the nth seed.
static void EndSelectAction(vtkAbstractWidget *)
~vtkSeedWidget() override
vtkHandleWidget * GetSeed(int n)
Get the nth seed.
void SetProcessEvents(vtkTypeBool) override
Methods to change the whether the widget responds to interaction.
vtkSeedList * Seeds
static void CompletedAction(vtkAbstractWidget *)
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
void SetEnabled(int) override
The method for activating and deactivating this widget.
virtual void RestartInteraction()
Method to be called when the seed widget should start responding to the interaction.
static void MoveAction(vtkAbstractWidget *)
void SetInteractor(vtkRenderWindowInteractor *) override
Set the interactor.
static void AddPointAction(vtkAbstractWidget *)
static vtkSeedWidget * New()
Instantiate this class.
void SetCurrentRenderer(vtkRenderer *) override
Set the current renderer.
static void DeleteAction(vtkAbstractWidget *)
vtkSeedRepresentation * GetSeedRepresentation()
Return the representation as a vtkSeedRepresentation.
virtual vtkHandleWidget * CreateNewHandle()
Use this method to programmatically create a new handle.
void SetRepresentation(vtkSeedRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO