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
79
80#ifndef vtkHoverWidget_h
81#define vtkHoverWidget_h
82
83#include "vtkAbstractWidget.h"
84#include "vtkInteractionWidgetsModule.h" // For export macro
85#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
86
87VTK_ABI_NAMESPACE_BEGIN
88class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkHoverWidget : public vtkAbstractWidget
89{
90public:
95
97
101 void PrintSelf(ostream& os, vtkIndent indent) override;
103
105
110 vtkSetClampMacro(TimerDuration, int, 1, 100000);
111 vtkGetMacro(TimerDuration, int);
113
118 void SetEnabled(int) override;
119
125 void CreateDefaultRepresentation() override { this->WidgetRep = nullptr; }
126
127protected:
129 ~vtkHoverWidget() override;
130
131 // The state of the widget
132
133 enum
134 {
135 Start = 0,
138 };
139
141
142 // Callback interface to execute events
146
147 // Subclasses of this class invoke these methods. If a non-zero
148 // value is returned, a subclass is handling the event.
149 virtual int SubclassHoverAction() { return 0; }
150 virtual int SubclassEndHoverAction() { return 0; }
151 virtual int SubclassSelectAction() { return 0; }
152
154
160
161private:
162 vtkHoverWidget(const vtkHoverWidget&) = delete;
163 void operator=(const vtkHoverWidget&) = delete;
164};
165
166VTK_ABI_NAMESPACE_END
167#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:108
#define VTK_MARSHALAUTO