VTK  9.5.2
vtkHoverWidget.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
60
61#ifndef vtkHoverWidget_h
62#define vtkHoverWidget_h
63
64#include "vtkAbstractWidget.h"
65#include "vtkInteractionWidgetsModule.h" // For export macro
66#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
67
68VTK_ABI_NAMESPACE_BEGIN
69class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkHoverWidget : public vtkAbstractWidget
70{
71public:
76
78
82 void PrintSelf(ostream& os, vtkIndent indent) override;
84
86
91 vtkSetClampMacro(TimerDuration, int, 1, 100000);
92 vtkGetMacro(TimerDuration, int);
94
99 void SetEnabled(int) override;
100
106 void CreateDefaultRepresentation() override { this->WidgetRep = nullptr; }
107
108protected:
110 ~vtkHoverWidget() override;
111
112 // The state of the widget
113
114 enum
115 {
116 Start = 0,
119 };
120
122
123 // Callback interface to execute events
127
128 // Subclasses of this class invoke these methods. If a non-zero
129 // value is returned, a subclass is handling the event.
130 virtual int SubclassHoverAction() { return 0; }
131 virtual int SubclassEndHoverAction() { return 0; }
132 virtual int SubclassSelectAction() { return 0; }
133
135
141
142private:
143 vtkHoverWidget(const vtkHoverWidget&) = delete;
144 void operator=(const vtkHoverWidget&) = delete;
145};
146
147VTK_ABI_NAMESPACE_END
148#endif
vtkWidgetRepresentation * WidgetRep
virtual int SubclassSelectAction()
int TimerId
Helper methods for creating and destroying timers.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
static vtkHoverWidget * New()
Instantiate this class.
void CreateDefaultRepresentation() override
A default representation, of which there is none, is created.
static void HoverAction(vtkAbstractWidget *)
int TimerDuration
Helper methods for creating and destroying timers.
~vtkHoverWidget() override
static void MoveAction(vtkAbstractWidget *)
static void SelectAction(vtkAbstractWidget *)
void SetEnabled(int) override
The method for activating and deactivating this widget.
virtual int SubclassEndHoverAction()
virtual int SubclassHoverAction()
a simple class to control print indentation
Definition vtkIndent.h:29
#define VTK_MARSHALAUTO