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
=========================================================================*/
73
#ifndef vtkHoverWidget_h
74
#define vtkHoverWidget_h
75
76
#include "
vtkAbstractWidget.h
"
77
#include "vtkInteractionWidgetsModule.h"
// For export macro
78
79
class
VTKINTERACTIONWIDGETS_EXPORT
vtkHoverWidget
:
public
vtkAbstractWidget
80
{
81
public
:
85
static
vtkHoverWidget
*
New
();
86
88
91
vtkTypeMacro(
vtkHoverWidget
,
vtkAbstractWidget
);
92
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
94
96
101
vtkSetClampMacro(TimerDuration,
int
, 1, 100000);
102
vtkGetMacro(TimerDuration,
int
);
104
109
void
SetEnabled
(
int
)
override
;
110
116
void
CreateDefaultRepresentation
()
override
{ this->WidgetRep =
nullptr
; }
117
118
protected
:
119
vtkHoverWidget
();
120
~vtkHoverWidget
()
override
;
121
122
// The state of the widget
123
124
enum
125
{
126
Start = 0,
127
Timing
,
128
TimedOut
129
};
130
131
int
WidgetState
;
132
133
// Callback interface to execute events
134
static
void
MoveAction
(
vtkAbstractWidget
*);
135
static
void
HoverAction
(
vtkAbstractWidget
*);
136
static
void
SelectAction
(
vtkAbstractWidget
*);
137
138
// Subclasses of this class invoke these methods. If a non-zero
139
// value is returned, a subclass is handling the event.
140
virtual
int
SubclassHoverAction
() {
return
0; }
141
virtual
int
SubclassEndHoverAction
() {
return
0; }
142
virtual
int
SubclassSelectAction
() {
return
0; }
143
145
148
int
TimerId
;
149
int
TimerDuration
;
151
152
private
:
153
vtkHoverWidget
(
const
vtkHoverWidget
&) =
delete
;
154
void
operator=(
const
vtkHoverWidget
&) =
delete
;
155
};
156
157
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:66
vtkHoverWidget
invoke a vtkTimerEvent when hovering
Definition
vtkHoverWidget.h:80
vtkHoverWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkHoverWidget.h:142
vtkHoverWidget::vtkHoverWidget
vtkHoverWidget()
vtkHoverWidget::TimerId
int TimerId
Helper methods for creating and destroying timers.
Definition
vtkHoverWidget.h:148
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:131
vtkHoverWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
A default representation, of which there is none, is created.
Definition
vtkHoverWidget.h:116
vtkHoverWidget::HoverAction
static void HoverAction(vtkAbstractWidget *)
vtkHoverWidget::TimerDuration
int TimerDuration
Helper methods for creating and destroying timers.
Definition
vtkHoverWidget.h:149
vtkHoverWidget::Timing
@ Timing
Definition
vtkHoverWidget.h:127
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:141
vtkHoverWidget::SubclassHoverAction
virtual int SubclassHoverAction()
Definition
vtkHoverWidget.h:140
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:34
vtkAbstractWidget.h
Generated on Sat Jul 22 2023 00:00:00 for VTK by
1.9.7