VTK
9.0.3
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
=========================================================================*/
70
#ifndef vtkHoverWidget_h
71
#define vtkHoverWidget_h
72
73
#include "
vtkAbstractWidget.h
"
74
#include "vtkInteractionWidgetsModule.h"
// For export macro
75
76
class
VTKINTERACTIONWIDGETS_EXPORT
vtkHoverWidget
:
public
vtkAbstractWidget
77
{
78
public
:
82
static
vtkHoverWidget
*
New
();
83
85
88
vtkTypeMacro(
vtkHoverWidget
,
vtkAbstractWidget
);
89
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
91
93
98
vtkSetClampMacro(TimerDuration,
int
, 1, 100000);
99
vtkGetMacro(TimerDuration,
int
);
101
106
void
SetEnabled
(
int
)
override
;
107
113
void
CreateDefaultRepresentation
()
override
{ this->WidgetRep =
nullptr
; }
114
115
protected
:
116
vtkHoverWidget
();
117
~vtkHoverWidget
()
override
;
118
119
// The state of the widget
120
121
enum
122
{
123
Start = 0,
124
Timing
,
125
TimedOut
126
};
127
128
int
WidgetState
;
129
130
// Callback interface to execute events
131
static
void
MoveAction
(
vtkAbstractWidget
*);
132
static
void
HoverAction
(
vtkAbstractWidget
*);
133
static
void
SelectAction
(
vtkAbstractWidget
*);
134
135
// Subclasses of this class invoke these methods. If a non-zero
136
// value is returned, a subclass is handling the event.
137
virtual
int
SubclassHoverAction
() {
return
0; }
138
virtual
int
SubclassEndHoverAction
() {
return
0; }
139
virtual
int
SubclassSelectAction
() {
return
0; }
140
142
145
int
TimerId
;
146
int
TimerDuration
;
148
149
private
:
150
vtkHoverWidget
(
const
vtkHoverWidget
&) =
delete
;
151
void
operator=(
const
vtkHoverWidget
&) =
delete
;
152
};
153
154
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkHoverWidget
invoke a vtkTimerEvent when hovering
Definition:
vtkHoverWidget.h:77
vtkHoverWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkHoverWidget.h:139
vtkHoverWidget::vtkHoverWidget
vtkHoverWidget()
vtkHoverWidget::TimerId
int TimerId
Helper methods for creating and destroying timers.
Definition:
vtkHoverWidget.h:145
vtkHoverWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHoverWidget::WidgetState
int WidgetState
Definition:
vtkHoverWidget.h:128
vtkHoverWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
A default representation, of which there is none, is created.
Definition:
vtkHoverWidget.h:113
vtkHoverWidget::HoverAction
static void HoverAction(vtkAbstractWidget *)
vtkHoverWidget::TimerDuration
int TimerDuration
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:138
vtkHoverWidget::Timing
@ Timing
Definition:
vtkHoverWidget.h:124
vtkHoverWidget::SubclassHoverAction
virtual int SubclassHoverAction()
Definition:
vtkHoverWidget.h:137
vtkHoverWidget::New
static vtkHoverWidget * New()
Instantiate this class.
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:34
vtkAbstractWidget.h
Generated on Sat Nov 6 2021 08:35:25 for VTK by
1.9.1