VTK
9.2.6
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Interaction
Widgets
vtkHoverWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkHoverWidget.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
=========================================================================*/
92
#ifndef vtkHoverWidget_h
93
#define vtkHoverWidget_h
94
95
#include "
vtkAbstractWidget.h
"
96
#include "vtkInteractionWidgetsModule.h"
// For export macro
97
98
class
VTKINTERACTIONWIDGETS_EXPORT
vtkHoverWidget
:
public
vtkAbstractWidget
99
{
100
public
:
104
static
vtkHoverWidget
*
New
();
105
107
110
vtkTypeMacro(
vtkHoverWidget
,
vtkAbstractWidget
);
111
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
113
115
120
vtkSetClampMacro(TimerDuration,
int
, 1, 100000);
121
vtkGetMacro(TimerDuration,
int
);
123
128
void
SetEnabled
(
int
)
override
;
129
135
void
CreateDefaultRepresentation
()
override
{ this->WidgetRep =
nullptr
; }
136
137
protected
:
138
vtkHoverWidget
();
139
~vtkHoverWidget
()
override
;
140
141
// The state of the widget
142
143
enum
144
{
145
Start = 0,
146
Timing
,
147
TimedOut
148
};
149
150
int
WidgetState
;
151
152
// Callback interface to execute events
153
static
void
MoveAction
(
vtkAbstractWidget
*);
154
static
void
HoverAction
(
vtkAbstractWidget
*);
155
static
void
SelectAction
(
vtkAbstractWidget
*);
156
157
// Subclasses of this class invoke these methods. If a non-zero
158
// value is returned, a subclass is handling the event.
159
virtual
int
SubclassHoverAction
() {
return
0; }
160
virtual
int
SubclassEndHoverAction
() {
return
0; }
161
virtual
int
SubclassSelectAction
() {
return
0; }
162
164
167
int
TimerId
;
168
int
TimerDuration
;
170
171
private
:
172
vtkHoverWidget
(
const
vtkHoverWidget
&) =
delete
;
173
void
operator=(
const
vtkHoverWidget
&) =
delete
;
174
};
175
176
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkHoverWidget
invoke a vtkTimerEvent when hovering
Definition:
vtkHoverWidget.h:99
vtkHoverWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkHoverWidget.h:161
vtkHoverWidget::vtkHoverWidget
vtkHoverWidget()
vtkHoverWidget::TimerId
int TimerId
Helper methods for creating and destroying timers.
Definition:
vtkHoverWidget.h:167
vtkHoverWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
vtkHoverWidget::New
static vtkHoverWidget * New()
Instantiate this class.
vtkHoverWidget::WidgetState
int WidgetState
Definition:
vtkHoverWidget.h:150
vtkHoverWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
A default representation, of which there is none, is created.
Definition:
vtkHoverWidget.h:135
vtkHoverWidget::HoverAction
static void HoverAction(vtkAbstractWidget *)
vtkHoverWidget::TimerDuration
int TimerDuration
Helper methods for creating and destroying timers.
Definition:
vtkHoverWidget.h:168
vtkHoverWidget::Timing
@ Timing
Definition:
vtkHoverWidget.h:146
vtkHoverWidget::~vtkHoverWidget
~vtkHoverWidget() override
vtkHoverWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkHoverWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkHoverWidget::SetEnabled
void SetEnabled(int) override
The method for activating and deactivating this widget.
vtkHoverWidget::SubclassEndHoverAction
virtual int SubclassEndHoverAction()
Definition:
vtkHoverWidget.h:160
vtkHoverWidget::SubclassHoverAction
virtual int SubclassHoverAction()
Definition:
vtkHoverWidget.h:159
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:119
vtkAbstractWidget.h
Generated on Thu Jun 22 2023 11:22:18 for VTK by
1.9.4